Skip to content

Commit 8ca7546

Browse files
colemanjskincaidkcgknapp1
authored and
Coleman J S
committed
Initial AdditiveFOAM Release
Co-authored-by: Kincaid, Kellis <[email protected]> Co-authored-by: Knapp, Gerry <[email protected]>
1 parent 68fa8b2 commit 8ca7546

File tree

103 files changed

+7340
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+7340
-0
lines changed

.gitignore

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Editor and misc backup files - anywhere
2+
*~
3+
.*~
4+
.*.swp
5+
*.bak
6+
*.bak[0-9][0-9]
7+
\#*\#
8+
9+
# File-browser settings - anywhere
10+
.directory
11+
12+
# CVS recovered versions - anywhere
13+
.#*
14+
15+
# Objects and archives - anywhere
16+
*.[oa]
17+
*.la
18+
*.so
19+
20+
# Derived files
21+
lex.yy.c
22+
23+
# Corefiles
24+
core
25+
26+
# Dependency files - anywhere
27+
*.dep
28+
29+
# lnInclude (symlink) directories - anywhere
30+
lnInclude
31+
32+
# Build directories - anywhere
33+
linux*Clang*/
34+
linux*Gcc*/
35+
linux*Icc*/
36+
solaris*Gcc*/
37+
SunOS*Gcc*/
38+
platforms/
39+
40+
# Source packages - anywhere
41+
*.tar.bz2
42+
*.tar.gz
43+
*.tar
44+
*.tgz
45+
*.gtgz

CITATION.bib

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@software{john_coleman_2023_doi,
2+
author = {John Coleman},
3+
title = {AdditiveFOAM},
4+
version = {0.0},
5+
date = {June 2023},
6+
publisher = {Zenodo},
7+
url = {},
8+
doi = {}
9+
}

LICENSE

+11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
GNU GENERAL PUBLIC LICENSE
2+
3+
Copyright (C) 2011-2017 OpenFOAM Foundation
4+
Copyright (C) 2023 Oak Ridge National Laboratory
5+
6+
You may use, distribute and copy AdditiveFOAM under the terms
7+
of GNU General Public License version 3, which is displayed below, or
8+
(at your option) any later version.
9+
10+
-------------------------------------------------------------------------
11+
12+
GNU GENERAL PUBLIC LICENSE
213
Version 3, 29 June 2007
314

415
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>

README.md

+117
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
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

Comments
 (0)