ORNL-MDF / 3DThesis

Heat transfer code utilizing a nondimensionalized semi-analytic solution to moving heat sources with a 3D Gaussian power density
BSD 3-Clause "New" or "Revised" License
7 stars 0 forks source link

3dThesis

Heat transfer code utilizing a nondimensionalized semi-analytic solution to moving heat sources with a 3D Gaussian power density

A detailed explanation of the mathematics can be found in Stump and Plotkowski.

Citing

If you use 3dThesis in your work, please cite the Stump and Plotkowski. The original release is available on DOE Code. Subsequent releases are updated on Zenodo.

Acknowledgements

3dThesis has been authored by UT-Battelle, LLC under Contract No. DE-AC05-00OR22725 with the U.S. Department of Energy.

3dThesis was originally co-sponsored by the U.S. Department of Energy, Office of Energy Efficiency and Renewable Energy, Advanced Manufacturing Office and the Office of Electricity Delivery and Energy Reliability (OE) - Transformer Resilience and Advanced Components (TRAC) Program.

License

3dThesis is distributed under an open source 3-clause BSD license.

Build

3dThesis requires a C++ compiler and OpenMP for on-node parallelism. 3dThesis will optionally use MPI if available on the system.

3dThesis primarily support CMake builds. A minimal example build and install looks like:

cd ./3DThesis
cmake \
    -B build \
    -D CMAKE_INSTALL_PREFIX=install
cmake --build build
cmake --install build

An additional example is shown in example_build.sh

3dThesis still supports make, but this support is planned to be removed. Options inside the makefile can be changed as needed for the local hardware. Run make from the commandline in order to build 3dThesis.

Run

By default, 3dThesis will be built within ./build/application. The input files described below can be modified as needed and then 3dThesis can be run on the commandline: ./build/application/3dThesis

Inputs

This section shows how to create a custom simulation with all tunable parameters. If a necessary keyword is not included, often the program will default to values found in the test case. Note when editing files, it is important to begin each group with a brace {, as well as close each group } as in the example files.

When run from the command line, an input file is required (e.g. ./3DThesis ParamInput.txt). If Name is set to TestSim in the input parameter file, then the data for the simulation can be found at TestSim/Data. All the files under Simulation are necessary, the rest are optional. Example input files for different simulation modes can be found in the examples directory.

Simulation Files

This set of files dictate everything having to do with the physics of the simulation, such as the material, the heat source, and the path of the heat source. All the inputs in this section are necessary.

Mode File

This file contains all information about how the simulation is run. There are two types of modes: Solidification and Snapshots. Only one mode can be run at a time.

Solidification

Snapshots

Material File

This file contains all the material constants to be used by the simulation. The CET parameters are not necessary and are used to calculate the equiaxed grain fraction according to the model by Gaumann et al., Acta Materialia, 2001.

Beam File

This file contains information on the energy source, which is a volumetric gaussian. It should be noted that everything input here is equivalent to √6 σ as defined by the D4σ beam diameter. For example, if the standard deviation of an actual beam is 20 µm and radially symmetric, both Width_X and Width_Y should be set to 48.9898e-6.

Shape

Intensity

NOTE: To use multiple heat sources, use an asterisk (*) to denote the wildcard (ex: “Beam.*.txt”). The program will start at “Beam.1.txt” then “Beam.2.txt” and keep going until “Beam.x.txt” does not exist. “Beam.x.txt” would be used with the path parameters found in “Path.x.txt”

Path File

This file dictate where and how the heat source travels. This file and all its components are necessary. An incomplete path file will cause failures. The format is different than other files and is in the form: Mode X(mm) Y(mm) Z(mm) Pmod Vel(m/s)/Time(s)

The Mode dictates how the heat source moves.

Make sure that before a line melt, the starting point is correct! A raster pattern is best represented by alternating mode 1 and 0 where mode 1 is only there to set the start point and would have a Pmod of 0 and a short value for Time(s).

NOTE: To use multiple heat sources, use an asterisk (*) to denote the wildcard (ex: “Path.*.txt”). The program will start at “Path.1.txt” then “Path.2.txt” and keep going until “Path.x.txt” does not exist. “Path.x.txt” would be used with the beam parameters found in “Beam.x.txt”

Option Files

This set of files dictate everything having to do with the numerics of the simulation, such as the domain considered as well as various settings. These files are optional but it is highly recommended to understand how to change these for specific uses as they have a large impact on the speed and accuracy of the simulation. Default behavior is specified.

Domain File

This file contains information about the domain over which to calculate the temperature solution. It contains ways to control the resolution and bounds of the simulation domain but highly recommended to use. Boundary conditions can be set to provide somewhat nearly insulative boundaries using the method of images (just 1 iteration). For very thins walls (<1mm), this may not be enough to provide a completely insulative effect. Keep in mind that each point is calculated independently, so increasing the resolution by a factor of 2 in each direction will slow down the simulation by a factor of 8.

Note: Not specifying Min or Max value results in the unspecified value being calculed via the path file(s) with a domain file 500 µm buffer on each side and a 250 µm simulated depth. Not specifying a Res or Num results in a default resolution of 50 µm.

Output File

This file contains all variables which can be output. A value of 0 indicated to not output the variable whereas a value of 1 indicates that variable should be output. Most variables default to a value of 0. The memory required to run a simulation increases when more outputs are selected; therefore, it is good practice to output only the necessary or desired information.

Settings File

This file contains all the tunable parameters for how the simulation is run. Generally, only MaxThreads (which speeds up the simulation if the hardware being used has at least that many available threads) needs to be changed.

Outputs

Analysis of 3dThesis results can be done with a variety of methods (e.g. Python), but quick visualization is possible with Paraview.

For an example visualization, first run the examples/solidification case and ensure that the run finished successfully. The data should be found in examples/solidification/Data/examples/solidification/Data/solidification.Solidification.Final.0.csv. To view this file in Paraview, open it through the folder icon, in the top left, and then click the apply button. A table of data should appear on the right side of the screen. To visualize this data in 3D, click on the file name on the Pipeline Browser (left side of the screen by default) to select the file, then apply the Table to Points filter under Filters->Alphabetical.

Under the Properties tab (on the left side under the Pipeline Browser by default), three dropdown menus should appear titled “X Column”, “Y Column”, and “Z Column”. Simply change these to be x, y, and z, click apply, and exit out of the tabular view of the data. Now at the top of the screen, locate the dropdown menu that says, “Solid Color.” Change this to G (the thermal solidification gradient). The point size and color scale can be changed using other options in the left menu (under the “Coloring” and “Styling” groups respectively).