Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ jobs:
cd userCase
blockMesh
decomposePar
mpirun -n 6 --oversubscribe --allow-run-as-root additiveFoam -parallel
mpirun -n 8 --oversubscribe --allow-run-as-root additiveFoam -parallel
2 changes: 1 addition & 1 deletion Allwmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cd ${0%/*} || exit 1 # Run from this directory
#------------------------------------------------------------------------------
# AdditiveFOAM build information

GIT_DESCRIBE=$(git describe --tags --always 2>/dev/null) \
GIT_DESCRIBE=$(git describe --tags --always --dirty 2>/dev/null) \
|| GIT_DESCRIBE="undefined"

GIT_SHA1=$(git rev-parse HEAD 2>/dev/null) \
Expand Down
76 changes: 76 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,79 @@
# Release 2.0.0

## Features

- Ported AdditiveFOAM to OpenFOAM-14.
- Added dynamic refinement models and reusable material and heat-source
configuration files.
- Added a general projected heat source with super-Gaussian, nLight AFX, and
tabulated planar profiles and an exponential axial projection.
- Added conversion of PRIMES beam measurements with `primesToAdditiveFoam`.
- Added tabulated-profile inspection and automatic D4Sigma calculation.
- Added model-specific heat-source bounds that retain at least
`1-tolerance` of the analytical source power.
- Added support-based heat-source quadrature.
- Added an adaptive Bayesian workflow with deterministic posterior quadrature
for calibrating the projected heat-source depth distribution.
- Expanded the AMB2018, multi-beam, multi-layer, nLight AFX, and tabulated
tutorials.

## Bug fixes

- Made all heat sources one-sided, consistent with their analytic
normalization.
- Synchronized heat-source depth, shape parameters, normalization, and bounds
once before beam subcycling.
- Preserved the active-power fraction when a solver time step crosses the end
of a scan path.
- Restricted transient source-depth measurements to the planar source support
below the beam plane and removed a modified super-Gaussian endpoint
singularity.
- Added calculation-ROI reconstruction, coordinate-preserving support cropping,
and beam-statistics reporting to `primesToAdditiveFoam`.
- Preserved an explicitly configured Kelly `aspectRatioSwitch` value and
applied `etaMin` as a lower bound on the Kelly absorption curve.

## Upgrade notes

- AdditiveFOAM 2.0 requires OpenFOAM-14. Source the OpenFOAM-14 environment
before sourcing `etc/bashrc` and rebuild AdditiveFOAM with `./Allwmake`.
- The former projected Gaussian, nLight AFX, and tabulated heat-source models
are now profiles selected by `projectedHeatSource`. Their shared axial model
is selected as the `exponential` projection.
- `superGaussian` remains a volumetric `heatSourceModel` and can also be
selected as the planar `profile` of a `projectedHeatSource`. Volumetric
`dimensions` have three components; profile `dimensions` have two.
- The tabulated profile derives its D4Sigma metrics from the beam-profile
table. No user-supplied lateral dimensions are required.
- The `A` and `B` projected-depth coefficients are now named `nSlope` and
`nIntercept` in `exponentialCoeffs`.
- Python 3.10 through 3.12 and the packages in `requirements.txt` are required
only for the calibration and plotting utilities.

## Full Changelog

For a complete list of changes, see the [full changelog](https://github.com/ORNL/AdditiveFOAM/compare/1.2.0...2.0.0).


# Release 1.2.0

## Features

- Added the projected Gaussian heat-source model.
- Added melt-pool-dimension and solidification-data function objects.
- Added optional implicit temperature limiting through the PIMPLE dictionary.
- Added multi-layer scan-path support and updated the ExaCA tutorials.
- Added the top-level build script for solvers and utilities.

## Bug Fixes

- Corrected thermophysical file handling for cases launched with `-case`.

## Full Changelog

For a complete list of changes, see the [full changelog](https://github.com/ORNL/AdditiveFOAM/compare/1.1.0...1.2.0).


# Release 1.1

## Features
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE

Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2023 Oak Ridge National Laboratory
Copyright (C) 2023-2026 Oak Ridge National Laboratory

You may use, distribute and copy AdditiveFOAM under the terms
of GNU General Public License version 3, which is displayed below, or
Expand Down
28 changes: 25 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ The documentation for `AdditiveFOAM` is hosted on [GitHub Pages](https://ornl.gi
### Repository Features
| Link | Description |
|-----------------------------------------------------------|------------------------------------------|
| [solver](applications/solvers/additiveFoam) | Development version of the solver |
| [solver](applications/solvers/additiveFoam) | AdditiveFOAM solver source |
| [tutorials](tutorials) | Tutorial cases |
| [calibration utility](bin/calibrateHeatSource) | Heat-source calibration command |
| [calibration tutorial](tutorials/heatSourceCalibration) | Projected heat-source calibration workflow |

## Installation
[![OpenFOAM-14](https://img.shields.io/badge/OpenFOAM-14-blue.svg)](https://github.com/OpenFOAM/OpenFOAM-14)
Expand Down Expand Up @@ -42,8 +44,28 @@ script from the repository root:
./Allwmake
```

For regular use, source both environments in each new shell or add them to your
shell startup file:
The Python utilities require Python 3.10 through 3.12. To use a dedicated
virtual environment, create it and install the pinned dependencies from the
repository root:

```sh
python3 -m venv .venv
. .venv/bin/activate
python -m pip install -r requirements.txt
python -m pip check
calibrateHeatSource --help
```

To use an existing Python environment instead, activate that environment and
install the same requirements into it:

```sh
python -m pip install -r /path/to/AdditiveFOAM/requirements.txt
python -m pip check
```

The AdditiveFOAM environment does not create or activate a Python environment.
Source the OpenFOAM and AdditiveFOAM environments in each new shell:

```sh
source /path/to/OpenFOAM-14/etc/bashrc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ SourceFiles

\*---------------------------------------------------------------------------*/

#ifndef BC_H
#define BC_H
#ifndef marangoniFvPatchVectorField_H
#define marangoniFvPatchVectorField_H

#include "fvPatchFields.H"
#include "transformFvPatchFields.H"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ mixedTemperatureFvPatchScalarField
valueFraction() = 0.0;

refValue() = scalarField("Tinf", dict, p.size());
fvPatchScalarField::operator=(refValue());
fvPatchScalarField::operator=
(
scalarField("value", iF.dimensions(), dict, p.size())
);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Usage
h | Uniform convection coeff | yes |
emissivity | Uniform surface emissivity | no | transportProperties
Tinf | Ambient temperature | yes |
value | Initial patch temperature | yes |
\endtable

Example of the boundary condition specification:
Expand All @@ -55,6 +56,8 @@ Usage
{
type mixedTemperature;
h 10.0;
Tinf uniform 300;
value uniform 300;
}
\endverbatim

Expand All @@ -63,8 +66,8 @@ SourceFiles

\*---------------------------------------------------------------------------*/

#ifndef BC_H
#define BC_H
#ifndef mixedTemperatureFvPatchScalarField_H
#define mixedTemperatureFvPatchScalarField_H

#include "mixedFvPatchFields.H"
#include "Function1.H"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
\\ / A nd | Copyright (C) 2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2023 Oak Ridge National Laboratory
Copyright (C) 2023-2026 Oak Ridge National Laboratory
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
Expand Down Expand Up @@ -247,7 +247,7 @@ bool Foam::functionObjects::meltPoolDimensions::execute()
// physical boundary : take face point if above iso value
const vectorField& Cf = mesh_.Cf().boundaryField()[patchi];

const scalarField& pif(TPf.patchInternalField());
const scalarField pif(TPf.patchInternalField());

forAll(faceCells, facei)
{
Expand Down
1 change: 1 addition & 0 deletions applications/solvers/additiveFoam/moveMesh.H
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ if (pimple.firstPimpleIter() || pimple.moveMeshOuterCorrectors())
);

// Make the flux relative to the mesh motion
MRF.makeRelative(phi);
fvc::makeRelative(phi, U);
}

Expand Down
12 changes: 9 additions & 3 deletions applications/solvers/additiveFoam/movingHeatSource/Make/files
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,17 @@ movingBeam/movingBeam.C

heatSourceModels/heatSourceModel/heatSourceModel.C
heatSourceModels/heatSourceModel/heatSourceModelNew.C
heatSourceModels/projectedHeatSource/profiles/heatSourceProfile/heatSourceProfile.C
heatSourceModels/projectedHeatSource/profiles/heatSourceProfile/heatSourceProfileNew.C
heatSourceModels/projectedHeatSource/profiles/superGaussian/superGaussianProfile.C
heatSourceModels/projectedHeatSource/profiles/nLightAFX/nLightAFXProfile.C
heatSourceModels/projectedHeatSource/profiles/tabulated/tabulatedProfile.C
heatSourceModels/projectedHeatSource/projections/heatSourceProjection/heatSourceProjection.C
heatSourceModels/projectedHeatSource/projections/heatSourceProjection/heatSourceProjectionNew.C
heatSourceModels/projectedHeatSource/projections/exponential/exponential.C
heatSourceModels/superGaussian/superGaussian.C
heatSourceModels/modifiedSuperGaussian/modifiedSuperGaussian.C
heatSourceModels/projectedGaussian/projectedGaussian.C
heatSourceModels/nLightAFX/nLightAFX.C
heatSourceModels/tabulated/tabulated.C
heatSourceModels/projectedHeatSource/projectedHeatSource.C

refinementModels/refinementModel/refinementModel.C
refinementModels/refinementModel/refinementModelNew.C
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2023 Oak Ridge National Laboratory
Copyright (C) 2023-2026 Oak Ridge National Laboratory
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
Expand Down Expand Up @@ -75,9 +75,11 @@ Foam::absorptionModels::Kelly::Kelly
Foam::scalar
Foam::absorptionModels::Kelly::eta
(
const scalar& aspectRatio
scalar aspectRatio
) const
{
aspectRatio = max(aspectRatio, small);

if (aspectRatio > aspectRatioSwitch_)
{
const scalar theta = Foam::atan(1.0 / aspectRatio);
Expand All @@ -97,8 +99,14 @@ Foam::absorptionModels::Kelly::eta
G = 0.5 / (1.0 + aspectRatio);
}

return (eta0_ * (1.0 + (1.0 - eta0_)*(G - F))
/ (1.0 - (1.0 - eta0_)*(1.0 - G))).value();
return max
(
etaMin_.value(),
(
eta0_*(1.0 + (1.0 - eta0_)*(G - F))
/(1.0 - (1.0 - eta0_)*(1.0 - G))
).value()
);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2023 Oak Ridge National Laboratory
Copyright (C) 2023-2026 Oak Ridge National Laboratory
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
Expand Down Expand Up @@ -71,7 +71,7 @@ class Kelly
//- Fresnel absorption of the liquid metal
dimensionedScalar eta0_;

//- Effective absorption in the conduction regime
//- Minimum effective absorption
dimensionedScalar etaMin_;

//- Aspect ratio above which the Kelly multiple-reflection model is used
Expand Down Expand Up @@ -103,7 +103,7 @@ public:
//- Return the absorption as a scalar field
virtual scalar eta
(
const scalar& aspectRatio
scalar aspectRatio
) const;

//- Read the absorption properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2023 Oak Ridge National Laboratory
Copyright (C) 2023-2026 Oak Ridge National Laboratory
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
Expand Down Expand Up @@ -88,7 +88,7 @@ public:
//- Runtime type information
TypeName("absorptionModel");

//- Default heatSourceProperties dictionary name
//- Default heatSourceDict dictionary name
static const word heatSourceDictName;

// Declare run-time constructor selection table
Expand Down Expand Up @@ -140,7 +140,7 @@ public:
//- Return const-access to the absorption
virtual scalar eta
(
const scalar& aspectRatio
scalar aspectRatio
) const = 0;

//- Read the absorption properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2023 Oak Ridge National Laboratory
Copyright (C) 2023-2026 Oak Ridge National Laboratory
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
Expand Down Expand Up @@ -85,7 +85,7 @@ public:
//- Return the absorption as a scalar field
virtual scalar eta
(
const scalar& aspectRatio
scalar aspectRatio
) const
{
return eta_.value();
Expand Down
Loading
Loading