|
| 1 | +# AdditiveFOAM |
| 2 | +AdditiveFOAM is a free, open source heat and mass transfer software for simulations of Additive Manufacturing (AM) released by Oak Ridge National Laboratory. It is built upon OpenFOAM, a free, open source computational fluid dynamics (CFD) software package released by the OpenFOAM Foundation. |
| 3 | + |
| 4 | +## Citing |
| 5 | +If you use AdditiveFoam in your work, please cite the [source code](CITATION.bib). Also, please consider citing relevant AdditiveFOAM **Publications** listed below. |
| 6 | + |
| 7 | +## Contributors |
| 8 | +- [John Coleman](https://www.ornl.gov/staff-profile/john-s-coleman) |
| 9 | +- [Kellis Kincaid](https://www.ornl.gov/staff-profile/kellis-c-kincaid) |
| 10 | +- [Gerry L. Knapp](https://www.ornl.gov/staff-profile/gerald-l-knapp) |
| 11 | +- [Benjamin Stump](https://www.ornl.gov/staff-profile/benjamin-c-stump) |
| 12 | +- [Alex Plotkowski](https://www.ornl.gov/staff-profile/alex-j-plotkowski) |
| 13 | + |
| 14 | +## Publications |
| 15 | +Some select publications using AdditiveFOAM are provided: |
| 16 | +1. [Coleman et al. "Sensitivity of Thermal Predictions to Uncertain Surface Tension Data in Laser Additive Manufacturing", J. Heat Transfer (2020) HT-19-1539](https://asmedigitalcollection.asme.org/heattransfer/article/doi/10.1115/1.4047916/1085538/Sensitivity-of-Thermal-Predictions-to-Uncertain) |
| 17 | +2. [Knapp et al. "Calibrating uncertain parameters in melt pool simulations of additive manufacturing", Comp. Mat. Sci. (2023) 111904](https://www.sciencedirect.com/science/article/abs/pii/S0927025622006152) |
| 18 | +3. [Rolchigo et al. "ExaCA: A performance portable exascale cellular automata application for alloy solidification modeling", Comp. Mat. Sci. (2022) 111692](https://www.sciencedirect.com/science/article/abs/pii/S0927025622004189) |
| 19 | + |
| 20 | +## Repository Features |
| 21 | +| Link | Description | |
| 22 | +|-----------------------------------------------------------|------------------------------------------| |
| 23 | +| [solver](applications/solvers/additiveFoam) | Development version of the solver | |
| 24 | +| [utilities](applications/utilities) | Utilities for post-processing and code wrappers | |
| 25 | +| [tutorials](tutorials) | Tutorial cases based on [NIST AMB2018](https://www.nist.gov/ambench/amb2018-02-description) single tracks | |
| 26 | + |
| 27 | +## Installation |
| 28 | +AdditiveFOAM is built on source code released by the OpenFOAM Foundation [openfoam.org](https://openfoam.org/), which is accessible to the public through the [OpenFOAM source code repositories at Github](https://github.com/OpenFOAM). The current supported version is **OpenFOAM-10**, which can be compiled from source code following the steps provided by the [OpenFOAM Foundation Documentation](https://openfoam.org/download/source/). |
| 29 | + |
| 30 | +Once **OpenFOAM-10** is compiled, perform the following steps: |
| 31 | + |
| 32 | +1. Clone the AdditiveFOAM repository into the OpenFOAM project installation directory `WM_PROJECT_INST_DIR`: |
| 33 | + ```bash |
| 34 | + cd $WM_PROJECT_INST_DIR |
| 35 | + git clone https://github.com/ORNL/AdditiveFOAM.git |
| 36 | + ``` |
| 37 | +2. Build the `movingHeatSource` library and the `additiveFoam` executable: |
| 38 | + ```bash |
| 39 | + cd $WM_PROJECT_INST_DIR/AdditiveFOAM/applications/solvers/additiveFoam/movingHeatSource |
| 40 | + wmake libso |
| 41 | + cd $WM_PROJECT_INST_DIR/AdditiveFOAM/applications/solvers/additiveFoam |
| 42 | + wmake |
| 43 | + ``` |
| 44 | +## Documentation |
| 45 | +To run an AdditiveFOAM simulation, it is recommended to perform the following steps: |
| 46 | +1. Prepare the case directory structure using a provided template: |
| 47 | + ```bash |
| 48 | + mkdir -p $FOAM_RUN/additivefoam |
| 49 | + cd $FOAM_RUN/additivefoam |
| 50 | + cp -r $WM_PROJECT_INST_DIR/AdditiveFOAM/tutorials/AMB2018-02-B userCase |
| 51 | + cd userCase |
| 52 | + ``` |
| 53 | +2. Modify the necessary input files according to your simulation requirements. These files include: |
| 54 | + |
| 55 | + - `constant/`: Contains configuration and settings that define geometric and material conditions, including: |
| 56 | + |
| 57 | + - `transportProperties`: Sets the transport properties of the material. The thermal conductivity **kappa** and specific heat **Cp** are given as temperature dependent second-order polynomials for each phase in the material. |
| 58 | + |
| 59 | + The available phases are: |
| 60 | + - solid |
| 61 | + - liquid |
| 62 | + - powder |
| 63 | + |
| 64 | + The remaining properties are all assumed constant throughout the simulation. |
| 65 | + |
| 66 | + - `heatSourceDict`: Defines number, types, and paths of moving heat sources in the simulation. |
| 67 | + |
| 68 | + The available heat sources are: |
| 69 | + - superGaussian |
| 70 | + - modifiedSuperGaussian |
| 71 | + |
| 72 | + The available absorption models are: |
| 73 | + - constant |
| 74 | + - [Kelly](https://opg.optica.org/ao/fulltext.cfm?uri=ao-5-6-925&id=14272) |
| 75 | + |
| 76 | + Each heat source model has the ability to be update the depth of the heat source for keyhole modeling, by setting the **transient** flag to **True** and defining an **isoValue** to track the depth of an isotherm contained within the heat source radius. An example of this usage is provided in the [multiBeam](tutorials/multiBeam) tutorial. |
| 77 | + |
| 78 | + - `0/`: Contains the initial fields. The available fields are provided in the files: |
| 79 | + - `T`: temperature |
| 80 | + - `U`: velocity |
| 81 | + - `p_rgh`: reduced pressure |
| 82 | + - `alpha.solid`: solid volume fraction |
| 83 | + - `alpha.powder`: powder volume fraction |
| 84 | + |
| 85 | + - `system/`: Contains simulation configuration files. |
| 86 | + - `controlDict`: Set simulation time settings and numerical parameters. |
| 87 | + - `fvSchemes`: Set the discretization schemes used to solve the governing equations |
| 88 | + - `fvSolution`: Set solution algorithms and convergence criterias. Note: fluid flow can be turned off by setting **nOuterCorrectors** to **0** in the **PIMPLE** dictionary. |
| 89 | + |
| 90 | +3. Run the simulation: |
| 91 | +An example run script which creates a mesh, decomposes the mesh across multiple processors, and runs the AdditiveFOAM case in parallel using MPI is provided in tutorial `Allrun` script. |
| 92 | + |
| 93 | +4. Visualize and post-process the results using **ParaView** |
| 94 | + ```bash |
| 95 | + touch case.foam |
| 96 | + paraview case.foam |
| 97 | + ``` |
| 98 | +### Creating Scan Path Files |
| 99 | +AdditiveFOAM supports a scan path file format that decomposes the laser path into segments that are either a) line sources or b) point sources. |
| 100 | + |
| 101 | +| Column | Description | |
| 102 | +|----------|-----------------------------------------------------------------------------------------------------------------------------| |
| 103 | +| Column 1 | mode = 0 for line source, mode = 1 for point source | |
| 104 | +| Columns 2-4 | (x,y,z) coordinates in meters. <br>For a line (mode = 0), this is the final position of the line raster. <br>For a spot (mode = 1), this is the constant position of the laser | |
| 105 | +| Column 5 | Value for laser power in watts | |
| 106 | +| Column 6 | For a line (mode = 0), this is the velocity of the laser in meters/second. <br>For a point (mode = 1), this is the dwell time of the laser in seconds | |
| 107 | + |
| 108 | +### Exporting ExaCA Data |
| 109 | +One feature of AdditiveFOAM is its ability to export thermal information to [ExaCA](https://github.com/ExascaleAM/ExaCA), a cellular automata (CA) code for grain growth under additive manufacturing conditions. This feature is enabled using the **execute** flag in the `constant/foamToExaCADict` file. The solidification conditions at the specified **isotherm** is tracked in the represenative volume element defined by **box** and a resolution defined by **dx**. It is recommended to track the liquidus isotherm. Users should be warned that this interpolation may cause a significant load-balancing issues if the resolution of the ExaCA data is much finer than that of the AdditiveFOAM mesh, and therefore, this feature should be used selectively. |
| 110 | + |
| 111 | +## License |
| 112 | +AdditiveFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See the file `LICENSE` in this directory or http://www.gnu.org/licenses/, for a description of the GNU General Public License terms under which you can copy the files. |
| 113 | + |
| 114 | +## Contact |
| 115 | +For any questions, issues, or suggestions regarding AdditiveFOAM, you can reach out to the project maintainers through the GitHub repository's issue tracker or by contacting the development team in the **Contributors** links above. |
| 116 | + |
| 117 | +We appreciate your interest in AdditiveFOAM and look forward to your contributions! |
0 commit comments