Skip to content
Merged
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
88 changes: 88 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,91 @@
# 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 general planar-profile moment metrics, tabulated-profile inspection,
and automatic `D4Sigma` calculation.
- Added rotated elliptical analytic profiles, `e2` and `secondMoment` radius
definitions, and selectable area-equivalent, major, or minor `D4Sigma`
reference widths.
- 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 axial closure.
- 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 isotherm 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`.
- Sources now use nested `absorption`, `heatSource`, `profile`, `projection`,
and `refinement` dictionaries with a `model` entry instead of `*Coeffs`
dictionaries.
- The former projected Gaussian, nLight AFX, and tabulated heat-source models
are profiles selected by the `projected` model. Their shared axial model is
selected in the `projection` dictionary.
- `superGaussian` remains a volumetric model and is also a planar profile.
`radius` is two-dimensional and `depth` is a separate scalar.
- The tabulated profile derives its D4Sigma metrics from the beam-profile
table. No user-supplied lateral dimensions are required.
- Profile metrics expose `D4Sigma` as `(major minor)`. Reference dimensions
select the scalar width and constant or isotherm depth used by aspect-ratio
closures.
- Aspect-ratio closures use a `D4Sigma` width reference, with selectable
`areaEquivalent`, `major`, or `minor` component, and a `constant` or
`isotherm` depth reference.
- The `A` and `B` projected-depth coefficients are named `nSlope` and
`nIntercept` in the `projection` dictionary.
- 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
10 changes: 8 additions & 2 deletions applications/solvers/additiveFoam/additiveFoam.C
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ Description

#include "fvmDiv.H"
#include "fvmDdt.H"
#include "fvcDdt.H"
#include "fvcFlux.H"
#include "fvcLaplacian.H"
#include "fvcMeshPhi.H"
#include "fvcReconstruct.H"
#include "fvcSnGrad.H"
#include "fvcSurfaceIntegrate.H"
#include "fvcVolumeIntegrate.H"
#include "fvmLaplacian.H"
Expand All @@ -56,7 +62,7 @@ Description
#include "CrankNicolsonDdtScheme.H"

#include "additiveFoamInfo.H"
#include "movingHeatSourceModel.H"
#include "movingHeatSources.H"
#include "thermoPath.H"
#include "interpolateXY.H"

Expand All @@ -82,7 +88,7 @@ int main(int argc, char *argv[])
// Initialize time-stepping controls
scalar DiNum = 0.0;
scalar alphaCoNum = 0.0;
movingHeatSourceModel sources(mesh);
movingHeatSources sources(mesh);

Info<< "\nStarting time loop\n" << endl;

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
18 changes: 14 additions & 4 deletions applications/solvers/additiveFoam/movingHeatSource/Make/files
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,23 @@ pathVector/pathVector.C

movingBeam/movingBeam.C

heatSourceModels/profileMetrics/profileMetrics.C
heatSourceModels/heatSourceModel/heatSourceModel.C
heatSourceModels/heatSourceModel/heatSourceModelNew.C
heatSourceModels/projected/profiles/heatSourceProfile/heatSourceProfile.C
heatSourceModels/projected/profiles/heatSourceProfile/heatSourceProfileNew.C
heatSourceModels/projected/profiles/superGaussian/superGaussianProfile.C
heatSourceModels/projected/profiles/nLightAFX/nLightAFXProfile.C
heatSourceModels/projected/profiles/tabulated/tabulatedProfile.C
heatSourceModels/projected/projections/heatSourceProjection/heatSourceProjection.C
heatSourceModels/projected/projections/heatSourceProjection/heatSourceProjectionNew.C
heatSourceModels/projected/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/projected/projected.C

movingHeatSources/referenceDimensions.C
movingHeatSources/movingHeatSource.C

refinementModels/refinementModel/refinementModel.C
refinementModels/refinementModel/refinementModelNew.C
Expand All @@ -22,6 +32,6 @@ refinementModels/timeStep/timeStep.C
refinementModels/targetCellLoad/targetCellLoad.C
refinementModels/uniformTimeIntervals/uniformTimeIntervals.C

movingHeatSourceModel/movingHeatSourceModel.C
movingHeatSources/movingHeatSources.C

LIB = $(FOAM_USER_LIBBIN)/libmovingBeamModels
Loading
Loading