From 8be2512ce5d92dd1c265e185b0e7ac50735edd22 Mon Sep 17 00:00:00 2001 From: John Date: Tue, 14 Jul 2026 10:38:38 -0400 Subject: [PATCH 1/4] v2.0.0 pre-release port to OpenFOAM-14 --- .github/workflows/CI.yml | 30 ++++++++++--------- CHANGELOG.md | 14 +++++++++ README.md | 12 ++++---- applications/solvers/additiveFoam/Allwclean | 2 +- .../marangoni/marangoniFvPatchVectorField.C | 14 ++++----- .../marangoni/marangoniFvPatchVectorField.H | 14 ++++----- .../mixedTemperatureFvPatchScalarField.C | 12 ++++---- .../mixedTemperatureFvPatchScalarField.H | 12 ++++---- applications/solvers/additiveFoam/moveMesh.H | 4 +-- .../absorptionModel/absorptionModel.C | 2 +- .../heatSourceModel/heatSourceModel.C | 2 +- .../refinementModel/refinementModel.C | 2 +- .../primesToAdditiveFoam.C | 1 + bin/runLayers | 18 ++++++----- etc/bashrc | 4 +-- etc/materials/AlSi10Mg.cfg | 2 +- etc/materials/IN625.cfg | 2 +- etc/materials/SS316L.cfg | 2 +- test/marangoni/0/T | 2 +- test/marangoni/0/U | 2 +- test/marangoni/0/alpha.solid | 2 +- test/marangoni/0/p_rgh | 2 +- test/marangoni/constant/g | 2 +- test/marangoni/constant/heatSourceDict | 2 +- test/marangoni/constant/thermoPath | 4 +-- test/marangoni/constant/transportProperties | 2 +- test/marangoni/system/blockMeshDict | 2 +- test/marangoni/system/controlDict | 2 +- test/marangoni/system/decomposeParDict | 2 +- test/marangoni/system/fvSchemes | 2 +- test/marangoni/system/fvSolution | 2 +- tutorials/AMB2018-02-B/0/T | 2 +- tutorials/AMB2018-02-B/0/U | 2 +- tutorials/AMB2018-02-B/0/alpha.solid | 2 +- tutorials/AMB2018-02-B/0/p_rgh | 2 +- tutorials/AMB2018-02-B/README.md | 15 +++++++++- tutorials/AMB2018-02-B/constant/g | 2 +- .../AMB2018-02-B/constant/heatSourceDict | 2 +- .../AMB2018-02-B/constant/transportProperties | 2 +- tutorials/AMB2018-02-B/system/blockMeshDict | 2 +- tutorials/AMB2018-02-B/system/controlDict | 2 +- .../AMB2018-02-B/system/decomposeParDict | 2 +- tutorials/AMB2018-02-B/system/fvSchemes | 2 +- tutorials/AMB2018-02-B/system/fvSolution | 2 +- tutorials/multiBeam/0/T | 2 +- tutorials/multiBeam/0/U | 2 +- tutorials/multiBeam/0/alpha.solid | 2 +- tutorials/multiBeam/0/p_rgh | 2 +- tutorials/multiBeam/README.md | 13 ++++++++ tutorials/multiBeam/constant/g | 2 +- tutorials/multiBeam/constant/heatSourceDict | 2 +- .../multiBeam/constant/transportProperties | 2 +- tutorials/multiBeam/system/blockMeshDict | 2 +- tutorials/multiBeam/system/controlDict | 2 +- tutorials/multiBeam/system/decomposeParDict | 2 +- tutorials/multiBeam/system/fvSchemes | 2 +- tutorials/multiBeam/system/fvSolution | 2 +- tutorials/multiLayerPBF/0/T | 2 +- tutorials/multiLayerPBF/0/U | 2 +- tutorials/multiLayerPBF/0/alpha.powder | 2 +- tutorials/multiLayerPBF/0/alpha.solid | 2 +- tutorials/multiLayerPBF/0/p_rgh | 2 +- tutorials/multiLayerPBF/README.md | 13 ++++++++ .../multiLayerPBF/constant/createScanPathDict | 2 +- tutorials/multiLayerPBF/constant/g | 2 +- .../multiLayerPBF/constant/heatSourceDict | 2 +- .../constant/transportProperties | 2 +- tutorials/multiLayerPBF/system/blockMeshDict | 2 +- tutorials/multiLayerPBF/system/controlDict | 6 ++-- .../multiLayerPBF/system/decomposeParDict | 2 +- .../multiLayerPBF/system/extrudeMeshDict | 2 +- tutorials/multiLayerPBF/system/fvSchemes | 2 +- tutorials/multiLayerPBF/system/fvSolution | 2 +- tutorials/multiLayerPBF/system/mapFieldsDict | 2 +- tutorials/multiLayerPBF/system/setFieldsDict | 20 +++++++------ tutorials/nLightAFX/0/T | 2 +- tutorials/nLightAFX/0/U | 2 +- tutorials/nLightAFX/0/alpha.solid | 2 +- tutorials/nLightAFX/0/p_rgh | 2 +- tutorials/nLightAFX/README.md | 13 ++++++++ tutorials/nLightAFX/constant/g | 2 +- tutorials/nLightAFX/constant/heatSourceDict | 2 +- .../nLightAFX/constant/transportProperties | 2 +- tutorials/nLightAFX/system/blockMeshDict | 2 +- tutorials/nLightAFX/system/controlDict | 2 +- tutorials/nLightAFX/system/decomposeParDict | 2 +- tutorials/nLightAFX/system/fvSchemes | 2 +- tutorials/nLightAFX/system/fvSolution | 2 +- tutorials/tabulated/0/T | 2 +- tutorials/tabulated/0/U | 2 +- tutorials/tabulated/0/alpha.solid | 2 +- tutorials/tabulated/0/p_rgh | 2 +- tutorials/tabulated/README.md | 7 ++++- tutorials/tabulated/constant/g | 2 +- tutorials/tabulated/constant/heatSourceDict | 2 +- .../tabulated/constant/transportProperties | 2 +- tutorials/tabulated/system/blockMeshDict | 2 +- tutorials/tabulated/system/controlDict | 2 +- tutorials/tabulated/system/decomposeParDict | 2 +- tutorials/tabulated/system/fvSchemes | 2 +- tutorials/tabulated/system/fvSolution | 2 +- 101 files changed, 233 insertions(+), 157 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index cd4a7b8e..85a97343 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -7,34 +7,36 @@ on: branches: - main concurrency: - group: ${ {github.event_name }}-${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{github.event_name == 'pull_request'}} + group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: CI: defaults: run: shell: bash -ileo pipefail {0} - strategy: - matrix: - cxx: ['g++'] - cmake_build_type: ['Release'] - - runs-on: ubuntu-latest - container: - image: microfluidica/openfoam:13 - options: --user root + runs-on: ubuntu-24.04 steps: - name: Checkout AdditiveFOAM - uses: actions/checkout@v2 + uses: actions/checkout@v4 + - name: Install OpenFOAM-14 + run: | + sudo apt-get update + sudo apt-get install -y software-properties-common wget + wget -qO- https://dl.openfoam.org/gpg.key \ + | sudo tee /etc/apt/trusted.gpg.d/openfoam.asc > /dev/null + sudo add-apt-repository --yes \ + "http://dl.openfoam.org/ubuntu main dev" + sudo apt-get update + sudo apt-get install -y openfoam14 - name: Build AdditiveFOAM run: | - . /opt/openfoam13/etc/bashrc || true + . /opt/openfoam14/etc/bashrc . ./etc/bashrc test -n "$WM_PROJECT_DIR" ./Allwmake - name: Test AdditiveFOAM run: | - . /opt/openfoam13/etc/bashrc || true + . /opt/openfoam14/etc/bashrc . ./etc/bashrc cp -r tutorials/AMB2018-02-B userCase cd userCase diff --git a/CHANGELOG.md b/CHANGELOG.md index ab881938..6d95d323 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +# Unreleased + +## Compatibility + +- Ported AdditiveFOAM to OpenFOAM-14, including custom boundary conditions, + moving-mesh/MRF integration, utilities, case headers, tutorials, and CI. + +## Bug Fixes + +- Corrected the legacy Marangoni `thermoPath` test data to use the pair syntax + required by the `thermoPath` reader. +- Updated the multi-layer powder initialisation to the OpenFOAM-14 `setFields` + zone syntax. + # Release 1.1 ## Features diff --git a/README.md b/README.md index 59dc9da9..c42d1ee7 100644 --- a/README.md +++ b/README.md @@ -15,13 +15,13 @@ The documentation for `AdditiveFOAM` is hosted on [GitHub Pages](https://ornl.gi | [tutorials](tutorials) | Tutorial cases | ## Installation -[![OpenFOAM-13](https://img.shields.io/badge/OpenFOAM-13-blue.svg)](https://github.com/OpenFOAM/OpenFOAM-13) +[![OpenFOAM-14](https://img.shields.io/badge/OpenFOAM-14-blue.svg)](https://github.com/OpenFOAM/OpenFOAM-14) -AdditiveFOAM requires OpenFOAM-13 from the OpenFOAM Foundation. Install or -build OpenFOAM-13 first, then source the OpenFOAM environment: +AdditiveFOAM requires OpenFOAM-14 from the OpenFOAM Foundation. Install or +build OpenFOAM-14 first, then source the OpenFOAM environment: ```sh -source /path/to/OpenFOAM-13/etc/bashrc +source /path/to/OpenFOAM-14/etc/bashrc ``` Clone AdditiveFOAM, enter the repository, and source the AdditiveFOAM @@ -33,7 +33,7 @@ cd AdditiveFOAM source etc/bashrc ``` -The AdditiveFOAM `etc/bashrc` checks that OpenFOAM-13 is active and sets the required paths. +The AdditiveFOAM `etc/bashrc` checks that OpenFOAM-14 is active and sets the required paths. Build all AdditiveFOAM libraries, solvers, and utilities with the master build script from the repository root: @@ -46,7 +46,7 @@ For regular use, source both environments in each new shell or add them to your shell startup file: ```sh -source /path/to/OpenFOAM-13/etc/bashrc +source /path/to/OpenFOAM-14/etc/bashrc source /path/to/AdditiveFOAM/etc/bashrc ``` diff --git a/applications/solvers/additiveFoam/Allwclean b/applications/solvers/additiveFoam/Allwclean index 761f51e0..b7adb81b 100755 --- a/applications/solvers/additiveFoam/Allwclean +++ b/applications/solvers/additiveFoam/Allwclean @@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory rm -rf Make/gitInfo.H wclean libso functionObjects -wmake libso utilities +wclean libso utilities wclean libso movingHeatSource wclean diff --git a/applications/solvers/additiveFoam/derivedFvPatchFields/marangoni/marangoniFvPatchVectorField.C b/applications/solvers/additiveFoam/derivedFvPatchFields/marangoni/marangoniFvPatchVectorField.C index d7b33ade..cf5f5ba2 100644 --- a/applications/solvers/additiveFoam/derivedFvPatchFields/marangoni/marangoniFvPatchVectorField.C +++ b/applications/solvers/additiveFoam/derivedFvPatchFields/marangoni/marangoniFvPatchVectorField.C @@ -29,7 +29,7 @@ License #include "symmTransformField.H" #include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" +#include "fieldMapper.H" #include "volFields.H" #include "surfaceFields.H" #include "fvcGrad.H" @@ -40,7 +40,7 @@ License Foam::marangoniFvPatchVectorField::marangoniFvPatchVectorField ( const fvPatch& p, - const DimensionedField& iF + const DimensionedField& iF ) : transformFvPatchField(p, iF), @@ -52,7 +52,7 @@ Foam::marangoniFvPatchVectorField::marangoniFvPatchVectorField Foam::marangoniFvPatchVectorField::marangoniFvPatchVectorField ( const fvPatch& p, - const DimensionedField& iF, + const DimensionedField& iF, const dictionary& dict ) : @@ -91,8 +91,8 @@ Foam::marangoniFvPatchVectorField::marangoniFvPatchVectorField ( const marangoniFvPatchVectorField& ptf, const fvPatch& p, - const DimensionedField& iF, - const fvPatchFieldMapper& mapper + const DimensionedField& iF, + const fieldMapper& mapper ) : transformFvPatchVectorField(ptf, p, iF, mapper), @@ -104,7 +104,7 @@ Foam::marangoniFvPatchVectorField::marangoniFvPatchVectorField Foam::marangoniFvPatchVectorField::marangoniFvPatchVectorField ( const marangoniFvPatchVectorField& ptf, - const DimensionedField& iF + const DimensionedField& iF ) : transformFvPatchVectorField(ptf, iF), @@ -118,7 +118,7 @@ Foam::marangoniFvPatchVectorField::marangoniFvPatchVectorField void Foam::marangoniFvPatchVectorField::map ( const fvPatchVectorField& pvf, - const fvPatchFieldMapper& mapper + const fieldMapper& mapper ) { transformFvPatchVectorField::map(pvf, mapper); diff --git a/applications/solvers/additiveFoam/derivedFvPatchFields/marangoni/marangoniFvPatchVectorField.H b/applications/solvers/additiveFoam/derivedFvPatchFields/marangoni/marangoniFvPatchVectorField.H index 7cc0e0f6..c0315233 100644 --- a/applications/solvers/additiveFoam/derivedFvPatchFields/marangoni/marangoniFvPatchVectorField.H +++ b/applications/solvers/additiveFoam/derivedFvPatchFields/marangoni/marangoniFvPatchVectorField.H @@ -75,14 +75,14 @@ public: marangoniFvPatchVectorField ( const fvPatch&, - const DimensionedField& + const DimensionedField& ); //- Construct from patch, internal field and dictionary marangoniFvPatchVectorField ( const fvPatch&, - const DimensionedField&, + const DimensionedField&, const dictionary& ); @@ -92,8 +92,8 @@ public: ( const marangoniFvPatchVectorField&, const fvPatch&, - const DimensionedField&, - const fvPatchFieldMapper& + const DimensionedField&, + const fieldMapper& ); //- Disallow copy without setting internal field reference @@ -106,13 +106,13 @@ public: marangoniFvPatchVectorField ( const marangoniFvPatchVectorField&, - const DimensionedField& + const DimensionedField& ); //- Construct and return a clone setting internal field reference virtual tmp clone ( - const DimensionedField& iF + const DimensionedField& iF ) const { return tmp @@ -130,7 +130,7 @@ public: virtual void map ( const fvPatchVectorField&, - const fvPatchFieldMapper& + const fieldMapper& ); //- Reset the fvPatchField to the given fvPatchField diff --git a/applications/solvers/additiveFoam/derivedFvPatchFields/mixedTemperature/mixedTemperatureFvPatchScalarField.C b/applications/solvers/additiveFoam/derivedFvPatchFields/mixedTemperature/mixedTemperatureFvPatchScalarField.C index 5ea14ec2..6a4975ca 100644 --- a/applications/solvers/additiveFoam/derivedFvPatchFields/mixedTemperature/mixedTemperatureFvPatchScalarField.C +++ b/applications/solvers/additiveFoam/derivedFvPatchFields/mixedTemperature/mixedTemperatureFvPatchScalarField.C @@ -27,7 +27,7 @@ License #include "mixedTemperatureFvPatchScalarField.H" #include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" +#include "fieldMapper.H" #include "volFields.H" #include "surfaceFields.H" #include "IOdictionary.H" @@ -38,7 +38,7 @@ Foam::mixedTemperatureFvPatchScalarField:: mixedTemperatureFvPatchScalarField ( const fvPatch& p, - const DimensionedField& iF, + const DimensionedField& iF, const dictionary& dict ) : @@ -87,8 +87,8 @@ mixedTemperatureFvPatchScalarField ( const mixedTemperatureFvPatchScalarField& ptf, const fvPatch& p, - const DimensionedField& iF, - const fvPatchFieldMapper& mapper + const DimensionedField& iF, + const fieldMapper& mapper ) : mixedFvPatchScalarField(ptf, p, iF, mapper), @@ -102,7 +102,7 @@ Foam::mixedTemperatureFvPatchScalarField:: mixedTemperatureFvPatchScalarField ( const mixedTemperatureFvPatchScalarField& ptf, - const DimensionedField& iF + const DimensionedField& iF ) : mixedFvPatchScalarField(ptf, iF), @@ -117,7 +117,7 @@ mixedTemperatureFvPatchScalarField void Foam::mixedTemperatureFvPatchScalarField::map ( const fvPatchScalarField& ptf, - const fvPatchFieldMapper& mapper + const fieldMapper& mapper ) { mixedFvPatchScalarField::map(ptf, mapper); diff --git a/applications/solvers/additiveFoam/derivedFvPatchFields/mixedTemperature/mixedTemperatureFvPatchScalarField.H b/applications/solvers/additiveFoam/derivedFvPatchFields/mixedTemperature/mixedTemperatureFvPatchScalarField.H index f26f8dc5..6e5329f0 100644 --- a/applications/solvers/additiveFoam/derivedFvPatchFields/mixedTemperature/mixedTemperatureFvPatchScalarField.H +++ b/applications/solvers/additiveFoam/derivedFvPatchFields/mixedTemperature/mixedTemperatureFvPatchScalarField.H @@ -106,7 +106,7 @@ public: mixedTemperatureFvPatchScalarField ( const fvPatch&, - const DimensionedField&, + const DimensionedField&, const dictionary& ); @@ -116,8 +116,8 @@ public: ( const mixedTemperatureFvPatchScalarField&, const fvPatch&, - const DimensionedField&, - const fvPatchFieldMapper& + const DimensionedField&, + const fieldMapper& ); //- Disallow copy without setting internal field reference @@ -130,13 +130,13 @@ public: mixedTemperatureFvPatchScalarField ( const mixedTemperatureFvPatchScalarField&, - const DimensionedField& + const DimensionedField& ); //- Construct and return a clone setting internal field reference virtual tmp clone ( - const DimensionedField& iF + const DimensionedField& iF ) const { return tmp @@ -158,7 +158,7 @@ public: virtual void map ( const fvPatchScalarField&, - const fvPatchFieldMapper& + const fieldMapper& ); //- Reset the fvPatchField to the given fvPatchField diff --git a/applications/solvers/additiveFoam/moveMesh.H b/applications/solvers/additiveFoam/moveMesh.H index 5c479bdb..4df8d27a 100644 --- a/applications/solvers/additiveFoam/moveMesh.H +++ b/applications/solvers/additiveFoam/moveMesh.H @@ -8,9 +8,7 @@ if (pimple.firstPimpleIter() || pimple.moveMeshOuterCorrectors()) gh = (g & mesh.C()) - ghRef; ghf = (g & mesh.Cf()) - ghRef; - MRF.update(); - - if (correctPhi || mesh.topoChanged()) + if (correctPhi || mesh.poly().topoChanged()) { // Calculate absolute flux // from the mapped surface velocity diff --git a/applications/solvers/additiveFoam/movingHeatSource/absorptionModels/absorptionModel/absorptionModel.C b/applications/solvers/additiveFoam/movingHeatSource/absorptionModels/absorptionModel/absorptionModel.C index 3f661029..2e2bed52 100644 --- a/applications/solvers/additiveFoam/movingHeatSource/absorptionModels/absorptionModel/absorptionModel.C +++ b/applications/solvers/additiveFoam/movingHeatSource/absorptionModels/absorptionModel/absorptionModel.C @@ -53,7 +53,7 @@ Foam::IOobject Foam::absorptionModel::createIOobject ( dict.name(), mesh.time().name(), - mesh.thisDb(), + mesh, IOobject::MUST_READ, IOobject::NO_WRITE ); diff --git a/applications/solvers/additiveFoam/movingHeatSource/heatSourceModels/heatSourceModel/heatSourceModel.C b/applications/solvers/additiveFoam/movingHeatSource/heatSourceModels/heatSourceModel/heatSourceModel.C index 20edcf57..aed14633 100644 --- a/applications/solvers/additiveFoam/movingHeatSource/heatSourceModels/heatSourceModel/heatSourceModel.C +++ b/applications/solvers/additiveFoam/movingHeatSource/heatSourceModels/heatSourceModel/heatSourceModel.C @@ -56,7 +56,7 @@ Foam::IOobject Foam::heatSourceModel::createIOobject ( dict.name(), mesh.time().constant(), - mesh.thisDb(), + mesh, IOobject::MUST_READ, IOobject::NO_WRITE ); diff --git a/applications/solvers/additiveFoam/movingHeatSource/refinementModels/refinementModel/refinementModel.C b/applications/solvers/additiveFoam/movingHeatSource/refinementModels/refinementModel/refinementModel.C index a48a7f01..9dc7f4bf 100644 --- a/applications/solvers/additiveFoam/movingHeatSource/refinementModels/refinementModel/refinementModel.C +++ b/applications/solvers/additiveFoam/movingHeatSource/refinementModels/refinementModel/refinementModel.C @@ -53,7 +53,7 @@ Foam::IOobject Foam::refinementModel::createIOobject ( dict.name(), mesh.time().constant(), - mesh.thisDb(), + mesh, IOobject::MUST_READ, IOobject::NO_WRITE ); diff --git a/applications/utilities/heatSourceModels/conversion/primesToAdditiveFoam/primesToAdditiveFoam.C b/applications/utilities/heatSourceModels/conversion/primesToAdditiveFoam/primesToAdditiveFoam.C index a812bad9..9e85c62b 100644 --- a/applications/utilities/heatSourceModels/conversion/primesToAdditiveFoam/primesToAdditiveFoam.C +++ b/applications/utilities/heatSourceModels/conversion/primesToAdditiveFoam/primesToAdditiveFoam.C @@ -19,6 +19,7 @@ Description #include "scalarField.H" #include "stringList.H" #include "HashTable.H" +#include "mathematicalConstants.H" using namespace Foam; diff --git a/bin/runLayers b/bin/runLayers index f9e8761f..c6db0299 100755 --- a/bin/runLayers +++ b/bin/runLayers @@ -192,17 +192,19 @@ do -value system/extrudeMeshDict)" # set powder height to the layer thickness - foamDictionary -entry regions -set \ - "( - boxToCell + foamDictionary -entry zones -set \ + "{ + powder { + type box; box (-1 -1 -$layerThickness) (1 1 1); - fieldValues - ( - volScalarFieldValue alpha.powder 1 - ); + + values + { + alpha.powder 1; + } } - )" system/setFieldsDict + }" system/setFieldsDict application=`getApplication` diff --git a/etc/bashrc b/etc/bashrc index 23546170..106e370e 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | Website: https://openfoam.org -# \\ / A nd | Copyright (C) 2011-2025 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2011-2026 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------ # Copyright (C) 2023-2026 Oak Ridge National Laboratory @@ -35,7 +35,7 @@ export ADDITIVEFOAM_VERSION=2.0.0-dev # OpenFOAM version -export ADDITIVEFOAM_OPENFOAM_VERSION=13 +export ADDITIVEFOAM_OPENFOAM_VERSION=14 if [ -z "${WM_PROJECT_DIR:-}" ] then diff --git a/etc/materials/AlSi10Mg.cfg b/etc/materials/AlSi10Mg.cfg index 169f65a8..f72efca1 100644 --- a/etc/materials/AlSi10Mg.cfg +++ b/etc/materials/AlSi10Mg.cfg @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2026 Oak Ridge National Laboratory diff --git a/etc/materials/IN625.cfg b/etc/materials/IN625.cfg index 735acbf7..90071364 100644 --- a/etc/materials/IN625.cfg +++ b/etc/materials/IN625.cfg @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2026 Oak Ridge National Laboratory diff --git a/etc/materials/SS316L.cfg b/etc/materials/SS316L.cfg index a78ef980..fba3946a 100644 --- a/etc/materials/SS316L.cfg +++ b/etc/materials/SS316L.cfg @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2026 Oak Ridge National Laboratory diff --git a/test/marangoni/0/T b/test/marangoni/0/T index 43354fed..e43b711a 100644 --- a/test/marangoni/0/T +++ b/test/marangoni/0/T @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/test/marangoni/0/U b/test/marangoni/0/U index ba95e273..e924103d 100644 --- a/test/marangoni/0/U +++ b/test/marangoni/0/U @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/test/marangoni/0/alpha.solid b/test/marangoni/0/alpha.solid index e10b60ce..c6b0b831 100644 --- a/test/marangoni/0/alpha.solid +++ b/test/marangoni/0/alpha.solid @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/test/marangoni/0/p_rgh b/test/marangoni/0/p_rgh index 38a90769..775f9be3 100644 --- a/test/marangoni/0/p_rgh +++ b/test/marangoni/0/p_rgh @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/test/marangoni/constant/g b/test/marangoni/constant/g index f5d68c6c..1c0c4db5 100644 --- a/test/marangoni/constant/g +++ b/test/marangoni/constant/g @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/test/marangoni/constant/heatSourceDict b/test/marangoni/constant/heatSourceDict index 44eb05fc..db5b9edc 100644 --- a/test/marangoni/constant/heatSourceDict +++ b/test/marangoni/constant/heatSourceDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/test/marangoni/constant/thermoPath b/test/marangoni/constant/thermoPath index 36ddb45a..708bb2ee 100644 --- a/test/marangoni/constant/thermoPath +++ b/test/marangoni/constant/thermoPath @@ -1,4 +1,4 @@ ( -0.0000 1.0000 -1.0000 0.0000 + (0.0000 1.0000) + (1.0000 0.0000) ) diff --git a/test/marangoni/constant/transportProperties b/test/marangoni/constant/transportProperties index 9887a192..e9762a3c 100644 --- a/test/marangoni/constant/transportProperties +++ b/test/marangoni/constant/transportProperties @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/test/marangoni/system/blockMeshDict b/test/marangoni/system/blockMeshDict index c462d7e5..79ba3218 100644 --- a/test/marangoni/system/blockMeshDict +++ b/test/marangoni/system/blockMeshDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/test/marangoni/system/controlDict b/test/marangoni/system/controlDict index 68129992..91be286f 100644 --- a/test/marangoni/system/controlDict +++ b/test/marangoni/system/controlDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/test/marangoni/system/decomposeParDict b/test/marangoni/system/decomposeParDict index 3f6b1de2..8d6b9f48 100644 --- a/test/marangoni/system/decomposeParDict +++ b/test/marangoni/system/decomposeParDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/test/marangoni/system/fvSchemes b/test/marangoni/system/fvSchemes index b40dfd69..24f14a00 100644 --- a/test/marangoni/system/fvSchemes +++ b/test/marangoni/system/fvSchemes @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/test/marangoni/system/fvSolution b/test/marangoni/system/fvSolution index 45e81e44..65c6bbc8 100644 --- a/test/marangoni/system/fvSolution +++ b/test/marangoni/system/fvSolution @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/AMB2018-02-B/0/T b/tutorials/AMB2018-02-B/0/T index b6f3ca38..100dbc46 100644 --- a/tutorials/AMB2018-02-B/0/T +++ b/tutorials/AMB2018-02-B/0/T @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/AMB2018-02-B/0/U b/tutorials/AMB2018-02-B/0/U index 56105c8d..5b96d5f8 100644 --- a/tutorials/AMB2018-02-B/0/U +++ b/tutorials/AMB2018-02-B/0/U @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/AMB2018-02-B/0/alpha.solid b/tutorials/AMB2018-02-B/0/alpha.solid index 48a2bb6d..8c4a4ddc 100644 --- a/tutorials/AMB2018-02-B/0/alpha.solid +++ b/tutorials/AMB2018-02-B/0/alpha.solid @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/AMB2018-02-B/0/p_rgh b/tutorials/AMB2018-02-B/0/p_rgh index 3e50698b..6be923ea 100644 --- a/tutorials/AMB2018-02-B/0/p_rgh +++ b/tutorials/AMB2018-02-B/0/p_rgh @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/AMB2018-02-B/README.md b/tutorials/AMB2018-02-B/README.md index da2ddba1..d1d826d3 100644 --- a/tutorials/AMB2018-02-B/README.md +++ b/tutorials/AMB2018-02-B/README.md @@ -9,6 +9,19 @@ The purpose of this tutorial is to provide a calibrated AMBench baseline case us This tutorial uses the IN625 material configuration from `$ADDITIVEFOAM_ETC/materials/IN625.cfg`. +## Running the tutorial + +Build AdditiveFOAM against OpenFOAM-14, source both environments, and run: + +```sh +source /path/to/OpenFOAM-14/etc/bashrc +source /path/to/AdditiveFOAM/etc/bashrc +cd "$ADDITIVEFOAM_TUTORIALS/AMB2018-02-B" +./Allrun +``` + +Use `./Allclean` to remove generated mesh, decomposition, and result files. + ## Reference This case is based on the AMBenchmark 2018 AMB2018-02 description: @@ -20,7 +33,7 @@ https://www.nist.gov/ambench/amb2018-02-description The model coefficients (absorption and heat source dimensions) were calibrated in: ```text G.L. Knapp, J. Coleman, M. Rolchigo, M. Stoyanov, A. Plotkowski, - Calibrating uncertain parameters in melt pool simulations of additive + Calibrating uncertain parameters in melt pool simulations of additive manufacturing (2023), https://doi.org/10.1016/j.commatsci.2022.111904. ``` diff --git a/tutorials/AMB2018-02-B/constant/g b/tutorials/AMB2018-02-B/constant/g index 58ebb1c2..082543df 100644 --- a/tutorials/AMB2018-02-B/constant/g +++ b/tutorials/AMB2018-02-B/constant/g @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/AMB2018-02-B/constant/heatSourceDict b/tutorials/AMB2018-02-B/constant/heatSourceDict index 975f0df8..441e1b73 100644 --- a/tutorials/AMB2018-02-B/constant/heatSourceDict +++ b/tutorials/AMB2018-02-B/constant/heatSourceDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/AMB2018-02-B/constant/transportProperties b/tutorials/AMB2018-02-B/constant/transportProperties index 8678abc3..1bc38b8e 100644 --- a/tutorials/AMB2018-02-B/constant/transportProperties +++ b/tutorials/AMB2018-02-B/constant/transportProperties @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/AMB2018-02-B/system/blockMeshDict b/tutorials/AMB2018-02-B/system/blockMeshDict index c1eb8d2e..5031ab71 100644 --- a/tutorials/AMB2018-02-B/system/blockMeshDict +++ b/tutorials/AMB2018-02-B/system/blockMeshDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/AMB2018-02-B/system/controlDict b/tutorials/AMB2018-02-B/system/controlDict index bead001d..ff8cb101 100644 --- a/tutorials/AMB2018-02-B/system/controlDict +++ b/tutorials/AMB2018-02-B/system/controlDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/AMB2018-02-B/system/decomposeParDict b/tutorials/AMB2018-02-B/system/decomposeParDict index 3f6b1de2..8d6b9f48 100644 --- a/tutorials/AMB2018-02-B/system/decomposeParDict +++ b/tutorials/AMB2018-02-B/system/decomposeParDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/AMB2018-02-B/system/fvSchemes b/tutorials/AMB2018-02-B/system/fvSchemes index b40dfd69..24f14a00 100644 --- a/tutorials/AMB2018-02-B/system/fvSchemes +++ b/tutorials/AMB2018-02-B/system/fvSchemes @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/AMB2018-02-B/system/fvSolution b/tutorials/AMB2018-02-B/system/fvSolution index 598705fa..3b7bde1f 100644 --- a/tutorials/AMB2018-02-B/system/fvSolution +++ b/tutorials/AMB2018-02-B/system/fvSolution @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiBeam/0/T b/tutorials/multiBeam/0/T index b6f3ca38..100dbc46 100644 --- a/tutorials/multiBeam/0/T +++ b/tutorials/multiBeam/0/T @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiBeam/0/U b/tutorials/multiBeam/0/U index 56105c8d..5b96d5f8 100644 --- a/tutorials/multiBeam/0/U +++ b/tutorials/multiBeam/0/U @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiBeam/0/alpha.solid b/tutorials/multiBeam/0/alpha.solid index 48a2bb6d..8c4a4ddc 100644 --- a/tutorials/multiBeam/0/alpha.solid +++ b/tutorials/multiBeam/0/alpha.solid @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiBeam/0/p_rgh b/tutorials/multiBeam/0/p_rgh index 3e50698b..6be923ea 100644 --- a/tutorials/multiBeam/0/p_rgh +++ b/tutorials/multiBeam/0/p_rgh @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiBeam/README.md b/tutorials/multiBeam/README.md index 74ed9b9b..d5bb231e 100644 --- a/tutorials/multiBeam/README.md +++ b/tutorials/multiBeam/README.md @@ -25,6 +25,19 @@ microns in the hatch direction. Because each beam uses the original AMB2018-02-B laser power, the total applied laser power is twice that of the single-beam baseline. +## Running the tutorial + +Build AdditiveFOAM against OpenFOAM-14, source both environments, and run: + +```sh +source /path/to/OpenFOAM-14/etc/bashrc +source /path/to/AdditiveFOAM/etc/bashrc +cd "$ADDITIVEFOAM_TUTORIALS/multiBeam" +./Allrun +``` + +Use `./Allclean` to remove generated mesh, decomposition, and result files. + ## Reference The baseline case is based on the AMBenchmark 2018 AMB2018-02 description: diff --git a/tutorials/multiBeam/constant/g b/tutorials/multiBeam/constant/g index 58ebb1c2..082543df 100644 --- a/tutorials/multiBeam/constant/g +++ b/tutorials/multiBeam/constant/g @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiBeam/constant/heatSourceDict b/tutorials/multiBeam/constant/heatSourceDict index 00abfcac..1fa2dcb3 100644 --- a/tutorials/multiBeam/constant/heatSourceDict +++ b/tutorials/multiBeam/constant/heatSourceDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiBeam/constant/transportProperties b/tutorials/multiBeam/constant/transportProperties index 8678abc3..1bc38b8e 100644 --- a/tutorials/multiBeam/constant/transportProperties +++ b/tutorials/multiBeam/constant/transportProperties @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiBeam/system/blockMeshDict b/tutorials/multiBeam/system/blockMeshDict index c1eb8d2e..5031ab71 100644 --- a/tutorials/multiBeam/system/blockMeshDict +++ b/tutorials/multiBeam/system/blockMeshDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiBeam/system/controlDict b/tutorials/multiBeam/system/controlDict index bead001d..ff8cb101 100644 --- a/tutorials/multiBeam/system/controlDict +++ b/tutorials/multiBeam/system/controlDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiBeam/system/decomposeParDict b/tutorials/multiBeam/system/decomposeParDict index 3f6b1de2..8d6b9f48 100644 --- a/tutorials/multiBeam/system/decomposeParDict +++ b/tutorials/multiBeam/system/decomposeParDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiBeam/system/fvSchemes b/tutorials/multiBeam/system/fvSchemes index b40dfd69..24f14a00 100644 --- a/tutorials/multiBeam/system/fvSchemes +++ b/tutorials/multiBeam/system/fvSchemes @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiBeam/system/fvSolution b/tutorials/multiBeam/system/fvSolution index 598705fa..3b7bde1f 100644 --- a/tutorials/multiBeam/system/fvSolution +++ b/tutorials/multiBeam/system/fvSolution @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiLayerPBF/0/T b/tutorials/multiLayerPBF/0/T index 7a15634e..23e3f36c 100644 --- a/tutorials/multiLayerPBF/0/T +++ b/tutorials/multiLayerPBF/0/T @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiLayerPBF/0/U b/tutorials/multiLayerPBF/0/U index 56105c8d..5b96d5f8 100644 --- a/tutorials/multiLayerPBF/0/U +++ b/tutorials/multiLayerPBF/0/U @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiLayerPBF/0/alpha.powder b/tutorials/multiLayerPBF/0/alpha.powder index 22cf2b7c..7757f115 100644 --- a/tutorials/multiLayerPBF/0/alpha.powder +++ b/tutorials/multiLayerPBF/0/alpha.powder @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiLayerPBF/0/alpha.solid b/tutorials/multiLayerPBF/0/alpha.solid index bee66a35..c4a404d0 100644 --- a/tutorials/multiLayerPBF/0/alpha.solid +++ b/tutorials/multiLayerPBF/0/alpha.solid @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiLayerPBF/0/p_rgh b/tutorials/multiLayerPBF/0/p_rgh index 3e50698b..6be923ea 100644 --- a/tutorials/multiLayerPBF/0/p_rgh +++ b/tutorials/multiLayerPBF/0/p_rgh @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiLayerPBF/README.md b/tutorials/multiLayerPBF/README.md index 99abf9f4..f6c59f28 100644 --- a/tutorials/multiLayerPBF/README.md +++ b/tutorials/multiLayerPBF/README.md @@ -9,6 +9,19 @@ The purpose of this tutorial is to show how to run repeated layer simulations wi This tutorial uses the IN625 material configuration from `$ADDITIVEFOAM_ETC/materials/IN625.cfg`. +## Running the tutorial + +Build AdditiveFOAM against OpenFOAM-14, source both environments, and run: + +```sh +source /path/to/OpenFOAM-14/etc/bashrc +source /path/to/AdditiveFOAM/etc/bashrc +cd "$ADDITIVEFOAM_TUTORIALS/multiLayerPBF" +./Allrun +``` + +Use `./Allclean` to remove generated layer and result files. + ## Reference The heat source setup follows the dynamic volumetric heat source formulation cited in the tutorial dictionary: diff --git a/tutorials/multiLayerPBF/constant/createScanPathDict b/tutorials/multiLayerPBF/constant/createScanPathDict index 81eb6a6d..070428ee 100644 --- a/tutorials/multiLayerPBF/constant/createScanPathDict +++ b/tutorials/multiLayerPBF/constant/createScanPathDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiLayerPBF/constant/g b/tutorials/multiLayerPBF/constant/g index 58ebb1c2..082543df 100644 --- a/tutorials/multiLayerPBF/constant/g +++ b/tutorials/multiLayerPBF/constant/g @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiLayerPBF/constant/heatSourceDict b/tutorials/multiLayerPBF/constant/heatSourceDict index 49614c19..564cca66 100644 --- a/tutorials/multiLayerPBF/constant/heatSourceDict +++ b/tutorials/multiLayerPBF/constant/heatSourceDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiLayerPBF/constant/transportProperties b/tutorials/multiLayerPBF/constant/transportProperties index 8678abc3..1bc38b8e 100644 --- a/tutorials/multiLayerPBF/constant/transportProperties +++ b/tutorials/multiLayerPBF/constant/transportProperties @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiLayerPBF/system/blockMeshDict b/tutorials/multiLayerPBF/system/blockMeshDict index e0417d12..77b14149 100644 --- a/tutorials/multiLayerPBF/system/blockMeshDict +++ b/tutorials/multiLayerPBF/system/blockMeshDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiLayerPBF/system/controlDict b/tutorials/multiLayerPBF/system/controlDict index 00915d70..23ec8ec1 100644 --- a/tutorials/multiLayerPBF/system/controlDict +++ b/tutorials/multiLayerPBF/system/controlDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile @@ -60,7 +60,7 @@ functions libs ("libadditiveFoamFunctionObjects.so"); type solidificationData; - enabled true; + enabled false; box (-1 -1 -1) (1 1 1); } @@ -70,7 +70,7 @@ functions libs ("libadditiveFoamFunctionObjects.so"); type ExaCA; - enabled true; + enabled false; box (0 -0.0001 -0.0002) (0.002 0.0001 0); dx 2.5e-6; diff --git a/tutorials/multiLayerPBF/system/decomposeParDict b/tutorials/multiLayerPBF/system/decomposeParDict index 3f6b1de2..8d6b9f48 100644 --- a/tutorials/multiLayerPBF/system/decomposeParDict +++ b/tutorials/multiLayerPBF/system/decomposeParDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiLayerPBF/system/extrudeMeshDict b/tutorials/multiLayerPBF/system/extrudeMeshDict index 855b818b..a964d9c5 100644 --- a/tutorials/multiLayerPBF/system/extrudeMeshDict +++ b/tutorials/multiLayerPBF/system/extrudeMeshDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiLayerPBF/system/fvSchemes b/tutorials/multiLayerPBF/system/fvSchemes index b40dfd69..24f14a00 100644 --- a/tutorials/multiLayerPBF/system/fvSchemes +++ b/tutorials/multiLayerPBF/system/fvSchemes @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiLayerPBF/system/fvSolution b/tutorials/multiLayerPBF/system/fvSolution index 93c37fc9..84eea94c 100644 --- a/tutorials/multiLayerPBF/system/fvSolution +++ b/tutorials/multiLayerPBF/system/fvSolution @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiLayerPBF/system/mapFieldsDict b/tutorials/multiLayerPBF/system/mapFieldsDict index 93682837..efe222b8 100644 --- a/tutorials/multiLayerPBF/system/mapFieldsDict +++ b/tutorials/multiLayerPBF/system/mapFieldsDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/multiLayerPBF/system/setFieldsDict b/tutorials/multiLayerPBF/system/setFieldsDict index 21a74b21..ae792705 100644 --- a/tutorials/multiLayerPBF/system/setFieldsDict +++ b/tutorials/multiLayerPBF/system/setFieldsDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile @@ -15,18 +15,20 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -regions -( - boxToCell +zones +{ + powder { + type box; + box (-1 -1 -4e-5) (1 1 1); - fieldValues - ( - volScalarFieldValue alpha.powder 1 - ); + values + { + alpha.powder 1; + } } -); +} // ************************************************************************* // diff --git a/tutorials/nLightAFX/0/T b/tutorials/nLightAFX/0/T index 68fb47f3..b69321e6 100644 --- a/tutorials/nLightAFX/0/T +++ b/tutorials/nLightAFX/0/T @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/nLightAFX/0/U b/tutorials/nLightAFX/0/U index 56105c8d..5b96d5f8 100644 --- a/tutorials/nLightAFX/0/U +++ b/tutorials/nLightAFX/0/U @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/nLightAFX/0/alpha.solid b/tutorials/nLightAFX/0/alpha.solid index 48a2bb6d..8c4a4ddc 100644 --- a/tutorials/nLightAFX/0/alpha.solid +++ b/tutorials/nLightAFX/0/alpha.solid @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/nLightAFX/0/p_rgh b/tutorials/nLightAFX/0/p_rgh index 3e50698b..6be923ea 100644 --- a/tutorials/nLightAFX/0/p_rgh +++ b/tutorials/nLightAFX/0/p_rgh @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/nLightAFX/README.md b/tutorials/nLightAFX/README.md index a025da4b..3ac05dab 100644 --- a/tutorials/nLightAFX/README.md +++ b/tutorials/nLightAFX/README.md @@ -9,6 +9,19 @@ The purpose of this tutorial is to show how ORNL-characterized nLight AFX beam p This tutorial uses the SS316L material configuration from `$ADDITIVEFOAM_ETC/materials/SS316L.cfg`. +## Running the tutorial + +Build AdditiveFOAM against OpenFOAM-14, source both environments, and run: + +```sh +source /path/to/OpenFOAM-14/etc/bashrc +source /path/to/AdditiveFOAM/etc/bashrc +cd "$ADDITIVEFOAM_TUTORIALS/nLightAFX" +./Allrun +``` + +Use `./Allclean` to remove generated mesh, decomposition, and result files. + ## File structure The important files for this tutorial are: diff --git a/tutorials/nLightAFX/constant/g b/tutorials/nLightAFX/constant/g index 58ebb1c2..082543df 100644 --- a/tutorials/nLightAFX/constant/g +++ b/tutorials/nLightAFX/constant/g @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/nLightAFX/constant/heatSourceDict b/tutorials/nLightAFX/constant/heatSourceDict index e787dc6e..03250667 100644 --- a/tutorials/nLightAFX/constant/heatSourceDict +++ b/tutorials/nLightAFX/constant/heatSourceDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/nLightAFX/constant/transportProperties b/tutorials/nLightAFX/constant/transportProperties index c324cd6e..0bbbe948 100644 --- a/tutorials/nLightAFX/constant/transportProperties +++ b/tutorials/nLightAFX/constant/transportProperties @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/nLightAFX/system/blockMeshDict b/tutorials/nLightAFX/system/blockMeshDict index f7c100b8..4ce069bb 100644 --- a/tutorials/nLightAFX/system/blockMeshDict +++ b/tutorials/nLightAFX/system/blockMeshDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/nLightAFX/system/controlDict b/tutorials/nLightAFX/system/controlDict index 47b454f9..eab0ad67 100644 --- a/tutorials/nLightAFX/system/controlDict +++ b/tutorials/nLightAFX/system/controlDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/nLightAFX/system/decomposeParDict b/tutorials/nLightAFX/system/decomposeParDict index 3f6b1de2..8d6b9f48 100644 --- a/tutorials/nLightAFX/system/decomposeParDict +++ b/tutorials/nLightAFX/system/decomposeParDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/nLightAFX/system/fvSchemes b/tutorials/nLightAFX/system/fvSchemes index b40dfd69..24f14a00 100644 --- a/tutorials/nLightAFX/system/fvSchemes +++ b/tutorials/nLightAFX/system/fvSchemes @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/nLightAFX/system/fvSolution b/tutorials/nLightAFX/system/fvSolution index 598705fa..3b7bde1f 100644 --- a/tutorials/nLightAFX/system/fvSolution +++ b/tutorials/nLightAFX/system/fvSolution @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/tabulated/0/T b/tutorials/tabulated/0/T index b6f3ca38..100dbc46 100644 --- a/tutorials/tabulated/0/T +++ b/tutorials/tabulated/0/T @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/tabulated/0/U b/tutorials/tabulated/0/U index 56105c8d..5b96d5f8 100644 --- a/tutorials/tabulated/0/U +++ b/tutorials/tabulated/0/U @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/tabulated/0/alpha.solid b/tutorials/tabulated/0/alpha.solid index bee66a35..c4a404d0 100644 --- a/tutorials/tabulated/0/alpha.solid +++ b/tutorials/tabulated/0/alpha.solid @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/tabulated/0/p_rgh b/tutorials/tabulated/0/p_rgh index 3e50698b..6be923ea 100644 --- a/tutorials/tabulated/0/p_rgh +++ b/tutorials/tabulated/0/p_rgh @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/tabulated/README.md b/tutorials/tabulated/README.md index 46238147..fe87c0e5 100644 --- a/tutorials/tabulated/README.md +++ b/tutorials/tabulated/README.md @@ -53,12 +53,17 @@ Defines the thermophysical properties used for the AlSi10Mg simulation. ## Running the tutorial -Run the tutorial with: +Build AdditiveFOAM against OpenFOAM-14, source both environments, and run: ```sh +source /path/to/OpenFOAM-14/etc/bashrc +source /path/to/AdditiveFOAM/etc/bashrc +cd "$ADDITIVEFOAM_TUTORIALS/tabulated" ./Allrun ``` +Use `./Allclean` to remove generated mesh, decomposition, and result files. + The `Allrun` script first converts the PRIMES beam-profile export: ```sh diff --git a/tutorials/tabulated/constant/g b/tutorials/tabulated/constant/g index 58ebb1c2..082543df 100644 --- a/tutorials/tabulated/constant/g +++ b/tutorials/tabulated/constant/g @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/tabulated/constant/heatSourceDict b/tutorials/tabulated/constant/heatSourceDict index 51f3d668..81376c3f 100644 --- a/tutorials/tabulated/constant/heatSourceDict +++ b/tutorials/tabulated/constant/heatSourceDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/tabulated/constant/transportProperties b/tutorials/tabulated/constant/transportProperties index 6493b941..4e3cc1ad 100644 --- a/tutorials/tabulated/constant/transportProperties +++ b/tutorials/tabulated/constant/transportProperties @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/tabulated/system/blockMeshDict b/tutorials/tabulated/system/blockMeshDict index b0d183b2..c288de15 100644 --- a/tutorials/tabulated/system/blockMeshDict +++ b/tutorials/tabulated/system/blockMeshDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/tabulated/system/controlDict b/tutorials/tabulated/system/controlDict index 47b454f9..eab0ad67 100644 --- a/tutorials/tabulated/system/controlDict +++ b/tutorials/tabulated/system/controlDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/tabulated/system/decomposeParDict b/tutorials/tabulated/system/decomposeParDict index 3f6b1de2..8d6b9f48 100644 --- a/tutorials/tabulated/system/decomposeParDict +++ b/tutorials/tabulated/system/decomposeParDict @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/tabulated/system/fvSchemes b/tutorials/tabulated/system/fvSchemes index b40dfd69..24f14a00 100644 --- a/tutorials/tabulated/system/fvSchemes +++ b/tutorials/tabulated/system/fvSchemes @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/tabulated/system/fvSolution b/tutorials/tabulated/system/fvSolution index e0024164..cb791405 100644 --- a/tutorials/tabulated/system/fvSolution +++ b/tutorials/tabulated/system/fvSolution @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: 13 + \\ / A nd | Version: 14 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile From a62960efd943a002d44416423ed1779c2ecc204c Mon Sep 17 00:00:00 2001 From: John Date: Tue, 14 Jul 2026 10:43:02 -0400 Subject: [PATCH 2/4] Doc: change log --- CHANGELOG.md | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d95d323..ab881938 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,17 +1,3 @@ -# Unreleased - -## Compatibility - -- Ported AdditiveFOAM to OpenFOAM-14, including custom boundary conditions, - moving-mesh/MRF integration, utilities, case headers, tutorials, and CI. - -## Bug Fixes - -- Corrected the legacy Marangoni `thermoPath` test data to use the pair syntax - required by the `thermoPath` reader. -- Updated the multi-layer powder initialisation to the OpenFOAM-14 `setFields` - zone syntax. - # Release 1.1 ## Features From 63be595b413d0f133215663f0c2bf80e1070de34 Mon Sep 17 00:00:00 2001 From: John Date: Tue, 14 Jul 2026 10:48:44 -0400 Subject: [PATCH 3/4] Doc: zenodo doi badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c42d1ee7..2d0272c6 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ source /path/to/AdditiveFOAM/etc/bashrc ## Citing [![DOI](https://joss.theoj.org/papers/10.21105/joss.07770/status.svg)](https://doi.org/10.21105/joss.07770) -[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8034097.svg)](https://doi.org/10.5281/zenodo.8034097) +[![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.8034097-blue.svg)](https://doi.org/10.5281/zenodo.8034097) If you use AdditiveFOAM in your work, please cite the JOSS article and consider citing the Zenodo DOI for the version used. From fa007b41562cd0071ab68a6f634235b56cbea2e6 Mon Sep 17 00:00:00 2001 From: John Date: Tue, 14 Jul 2026 11:13:54 -0400 Subject: [PATCH 4/4] Fix: consistent plot formatting --- bin/plotCET | 77 +++++++++++++++++++++++++++++++++++++--------- bin/plotDimensions | 68 +++++++++++++++++++++++++++++----------- bin/plotPower | 56 ++++++++++++++++++++++++++++----- 3 files changed, 162 insertions(+), 39 deletions(-) diff --git a/bin/plotCET b/bin/plotCET index 7d3ca6d5..bd6d2838 100755 --- a/bin/plotCET +++ b/bin/plotCET @@ -1,23 +1,54 @@ #!/usr/bin/env python3 import os import argparse +import math import pandas as pd import numpy as np import matplotlib.pyplot as plt plt.rcParams.update({ "font.family": "serif", - "font.size": 10, - "axes.labelsize": 11, - "xtick.labelsize": 9, - "ytick.labelsize": 9, + "font.size": 8, + "axes.labelsize": 8, + "axes.titlesize": 8, + "xtick.labelsize": 8, + "ytick.labelsize": 8, + "legend.fontsize": 8, "figure.dpi": 300, - "savefig.bbox": 'tight', - "mathtext.fontset": "dejavuserif" + "savefig.dpi": 300, + "savefig.bbox": None, + "lines.linewidth": 1.2, + "mathtext.fontset": "dejavuserif", }) + +def log_limits(values, padding=0.05): + finite = [ + float(value) + for value in values + if math.isfinite(float(value)) and float(value) > 0 + ] + if not finite: + return None + + lower = min(finite) + upper = max(finite) + if lower == upper: + return lower/1.1, upper*1.1 + + log_lower = math.log10(lower) + log_upper = math.log10(upper) + pad = padding*(log_upper - log_lower) + return 10**(log_lower - pad), 10**(log_upper + pad) + def plot_cet_curves(cases, output): - fig, ax = plt.subplots(figsize=(4.0, 4.5)) + fig, ax = plt.subplots( + figsize=(4.5, 3.0), + constrained_layout=True, + ) + all_velocities = [] + all_gradients = [] + plotted_cases = 0 for i, case_path in enumerate(cases): abs_case_path = os.path.abspath(case_path) @@ -37,21 +68,39 @@ def plot_cet_curves(cases, output): G = np.sqrt(df['gx']**2 + df['gy']**2 + df['gz']**2) V = df['v'] - + + valid = np.isfinite(V) & np.isfinite(G) & (V > 0) & (G > 0) + if not valid.any(): + print(f"Warning: No positive finite CET data found in {csv_file}") + continue + + V = V[valid] + G = G[valid] ax.scatter(V, G, s=8, alpha=0.3, edgecolors='none', label=case_name) + all_velocities.extend(V.to_numpy()) + all_gradients.extend(G.to_numpy()) + plotted_cases += 1 ax.set_xscale('log') ax.set_yscale('log') - - ax.grid(True, which="both", ls="-", alpha=0.1) + ax.grid(True, which="both", linestyle="-", alpha=0.1) + ax.minorticks_on() ax.set_xlabel(r'Solidification Velocity, $V$ (m/s)') ax.set_ylabel(r'Thermal Gradient, $G$ (K/m)') - - if len(cases) > 0: + + x_limits = log_limits(all_velocities) + y_limits = log_limits(all_gradients) + if x_limits: + ax.set_xlim(x_limits) + if y_limits: + ax.set_ylim(y_limits) + + if plotted_cases: ax.legend(frameon=True, loc='best') - - plt.savefig(output, dpi=300) + + fig.savefig(output) + plt.close(fig) print(f"Plot saved to: {output}") if __name__ == "__main__": diff --git a/bin/plotDimensions b/bin/plotDimensions index b8db1ee4..b7bfbafa 100755 --- a/bin/plotDimensions +++ b/bin/plotDimensions @@ -2,6 +2,7 @@ import os import argparse import glob +import math import pandas as pd import matplotlib.pyplot as plt @@ -9,21 +10,49 @@ plt.rcParams.update({ "font.family": "serif", "font.size": 8, "axes.labelsize": 8, + "axes.titlesize": 8, "xtick.labelsize": 8, "ytick.labelsize": 8, + "legend.fontsize": 8, "figure.dpi": 300, - "mathtext.fontset": "dejavuserif" + "savefig.dpi": 300, + "savefig.bbox": None, + "lines.linewidth": 1.2, + "mathtext.fontset": "dejavuserif", }) + +def linear_limits(values, include_zero=False, padding=0.05): + finite = [float(value) for value in values if math.isfinite(float(value))] + if not finite: + return None + + data_min = min(finite) + data_max = max(finite) + lower = min(data_min, 0.0) if include_zero else data_min + upper = max(data_max, 0.0) if include_zero else data_max + span = upper - lower + if span == 0: + span = abs(upper) if upper != 0 else 1.0 + + pad = padding*span + lower_limit = 0.0 if include_zero and data_min >= 0 else lower - pad + upper_limit = 0.0 if include_zero and data_max <= 0 else upper + pad + return lower_limit, upper_limit + def plot_meltpool(cases, output): fig, axes = plt.subplots( - 1, 3, figsize=(6.5, 2), constrained_layout=True, sharex=True + 3, 1, + figsize=(4.5, 7.0), + constrained_layout=True, + sharex=True, ) cols = ['length(m)', 'width(m)', 'depth(m)'] y_labs = ['Length ($\mu$m)', 'Width ($\mu$m)', 'Depth ($\mu$m)'] - t_min, t_max = float('inf'), float('-inf') + all_times = [] + all_dimensions = [[], [], []] for case_path in cases: abs_path = os.path.abspath(case_path) @@ -49,34 +78,37 @@ def plot_meltpool(cases, output): if df.empty: continue - df['time(s)'] = df['time(s)'] * 1e3 - t_min = min(t_min, df['time(s)'].min()) - t_max = max(t_max, df['time(s)'].max()) + times_ms = df['time(s)'] * 1e3 + all_times.extend(times_ms.to_numpy()) for j in range(3): y_data = df[cols[j]] * 1e6 - axes[j].plot(df['time(s)'], y_data, label=label) + axes[j].plot(times_ms, y_data, label=label) + all_dimensions[j].extend(y_data.to_numpy()) for j in range(3): - axes[j].set_xlabel('Time (ms)') axes[j].set_ylabel(y_labs[j]) - axes[j].grid(True, which="both", ls="-", alpha=0.1) - - axes[j].set_xlim(t_min, t_max) - axes[j].set_ylim(bottom=0) + axes[j].grid(True, which="both", linestyle="-", alpha=0.1) + axes[j].minorticks_on() + + y_limits = linear_limits(all_dimensions[j], include_zero=True) + if y_limits: + axes[j].set_ylim(y_limits) axes[j].ticklabel_format(style='sci', axis='x', scilimits=(0,0)) axes[j].ticklabel_format(style='plain', axis='y') + x_limits = linear_limits(all_times) + if x_limits: + axes[-1].set_xlim(x_limits) + axes[-1].set_xlabel('Time (ms)') + handles, labels = axes[0].get_legend_handles_labels() if handles: - fig.legend( - handles, labels, loc='upper center', - bbox_to_anchor=(0.5, 1.12), ncol=2, frameon=True - ) + axes[0].legend(handles, labels, loc='best', frameon=True) - plt.minorticks_on() - plt.savefig(output, dpi=300) + fig.savefig(output) + plt.close(fig) print(f"Melt pool plot (microns) saved to: {output}") if __name__ == "__main__": diff --git a/bin/plotPower b/bin/plotPower index bc76d8c8..54c2e682 100755 --- a/bin/plotPower +++ b/bin/plotPower @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import os import re +import math import argparse import matplotlib.pyplot as plt @@ -8,12 +9,36 @@ plt.rcParams.update({ "font.family": "serif", "font.size": 8, "axes.labelsize": 8, + "axes.titlesize": 8, "xtick.labelsize": 8, "ytick.labelsize": 8, + "legend.fontsize": 8, "figure.dpi": 300, - "mathtext.fontset": "dejavuserif" + "savefig.dpi": 300, + "savefig.bbox": None, + "lines.linewidth": 1.2, + "mathtext.fontset": "dejavuserif", }) + +def linear_limits(values, include_zero=False, padding=0.05): + finite = [float(value) for value in values if math.isfinite(float(value))] + if not finite: + return None + + data_min = min(finite) + data_max = max(finite) + lower = min(data_min, 0.0) if include_zero else data_min + upper = max(data_max, 0.0) if include_zero else data_max + span = upper - lower + if span == 0: + span = abs(upper) if upper != 0 else 1.0 + + pad = padding*span + lower_limit = 0.0 if include_zero and data_min >= 0 else lower - pad + upper_limit = 0.0 if include_zero and data_max <= 0 else upper + pad + return lower_limit, upper_limit + TIME_RE = re.compile(r"^\s*Time\s*=\s*(\S+)") POWER_RE = re.compile(r"^\s*absorbed power:\s*(\S+)") @@ -64,7 +89,13 @@ def case_label(case_or_log): def plot_power(cases, log_name, output): - fig, ax = plt.subplots(figsize=(4.5, 3.0), constrained_layout=True) + fig, ax = plt.subplots( + figsize=(4.5, 3.0), + constrained_layout=True, + ) + all_times = [] + all_powers = [] + plotted_cases = 0 for case_path in cases: power_log = log_path(case_path, log_name) @@ -82,19 +113,30 @@ def plot_power(cases, log_name, output): times_ms = [time*1e3 for time in times] ax.plot(times_ms, powers, label=label) + all_times.extend(times_ms) + all_powers.extend(powers) + plotted_cases += 1 ax.set_xlabel("Time (ms)") ax.set_ylabel("Absorbed power (W)") - ax.grid(True, which="both", ls="-", alpha=0.1) - ax.set_ylim(bottom=0) + ax.grid(True, which="both", linestyle="-", alpha=0.1) + ax.minorticks_on() + + x_limits = linear_limits(all_times) + y_limits = linear_limits(all_powers, include_zero=True) + if x_limits: + ax.set_xlim(x_limits) + if y_limits: + ax.set_ylim(y_limits) + ax.ticklabel_format(style="sci", axis="x", scilimits=(0, 0)) ax.ticklabel_format(style="plain", axis="y") - if len(cases) > 1: + if plotted_cases: ax.legend(frameon=True, loc="best") - plt.minorticks_on() - plt.savefig(output, dpi=300) + fig.savefig(output) + plt.close(fig) print(f"Power plot saved to: {output}")