diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
index 626c2dd..bd25471 100644
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -19,7 +19,7 @@ jobs:
cxx: ['g++']
cmake_build_type: ['Release']
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-latest
container:
image: docker.io/openfoam/openfoam10-paraview510
options: --user root
@@ -29,11 +29,8 @@ jobs:
- name: Build AdditiveFOAM
run: |
. /opt/openfoam10/etc/bashrc
- cd applications/solvers/additiveFoam/movingHeatSource
- wmake libso
- cd -
cd applications/solvers/additiveFoam
- wmake
+ ./Allwmake
- name: Test AdditiveFOAM
run: |
. /opt/openfoam10/etc/bashrc
diff --git a/.github/workflows/draft-pdf.yml b/.github/workflows/draft-pdf.yml
new file mode 100644
index 0000000..32afd36
--- /dev/null
+++ b/.github/workflows/draft-pdf.yml
@@ -0,0 +1,24 @@
+name: Draft PDF
+on: [push]
+
+jobs:
+ paper:
+ runs-on: ubuntu-latest
+ name: Paper Draft
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - name: Build draft PDF
+ uses: openjournals/openjournals-draft-action@master
+ with:
+ journal: joss
+ # This should be the path to the paper within your repo.
+ paper-path: doc/paper.md
+ - name: Upload
+ uses: actions/upload-artifact@v4
+ with:
+ name: paper
+ # This is the output path where Pandoc will write the compiled
+ # PDF. Note, this should be the same directory as the input
+ # paper.md
+ path: doc/paper.pdf
diff --git a/README.md b/README.md
index 7cbc323..4b911d3 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,12 @@
-# AdditiveFOAM
-AdditiveFOAM is a free, open source heat and mass transfer software for simulations of Additive Manufacturing (AM) released by Oak Ridge National Laboratory. It is built upon OpenFOAM, a free, open source computational fluid dynamics (CFD) software package released by the OpenFOAM Foundation.
+
+
+---
+`AdditiveFOAM` is a free, open source heat and mass transfer software for simulations of Additive Manufacturing (AM) released by Oak Ridge National Laboratory. It is built upon OpenFOAM, a free, open source computational fluid dynamics (CFD) software package released by the OpenFOAM Foundation.
+
+## Documentation
+[![Documentation Status][docs-badge]][docs-url]
+
+The documentation for `AdditiveFOAM` is hosted on [GitHub Pages](https://ornl.github.io/AdditiveFOAM/).
### Repository Features
| Link | Description |
@@ -8,11 +15,6 @@ AdditiveFOAM is a free, open source heat and mass transfer software for simulati
| [utilities](applications/utilities) | Utilities for post-processing and code wrappers |
| [tutorials](tutorials) | Tutorial cases |
-## Documentation
-[![Documentation Status][docs-badge]][docs-url]
-
-The documentation for `AdditiveFOAM` is hosted on [GitHub Pages](https://ornl.github.io/AdditiveFOAM/).
-
## Installation and Dependencies
[](https://github.com/OpenFOAM/OpenFOAM-10)
diff --git a/applications/solvers/additiveFoam/Allwclean b/applications/solvers/additiveFoam/Allwclean
new file mode 100755
index 0000000..20a96ae
--- /dev/null
+++ b/applications/solvers/additiveFoam/Allwclean
@@ -0,0 +1,8 @@
+#!/bin/sh
+cd ${0%/*} || exit 1 # Run from this directory
+
+wclean libso functionObjects/ExaCA
+wclean libso movingHeatSource
+wclean
+
+#------------------------------------------------------------------------------
diff --git a/applications/solvers/additiveFoam/Allwmake b/applications/solvers/additiveFoam/Allwmake
new file mode 100755
index 0000000..2e2f39d
--- /dev/null
+++ b/applications/solvers/additiveFoam/Allwmake
@@ -0,0 +1,11 @@
+#!/bin/sh
+cd ${0%/*} || exit 1 # Run from this directory
+
+# Parse arguments for library compilation
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
+
+wmake $targetType functionObjects/ExaCA
+wmake $targetType movingHeatSource
+wmake $targetType
+
+#------------------------------------------------------------------------------
diff --git a/applications/solvers/additiveFoam/Make/files b/applications/solvers/additiveFoam/Make/files
index 5611e03..10e328d 100644
--- a/applications/solvers/additiveFoam/Make/files
+++ b/applications/solvers/additiveFoam/Make/files
@@ -1,5 +1,5 @@
-BCs/mixedTemperature/mixedTemperatureFvPatchScalarField.C
-BCs/marangoni/marangoniFvPatchVectorField.C
+derivedFvPatchFields/mixedTemperature/mixedTemperatureFvPatchScalarField.C
+derivedFvPatchFields/marangoni/marangoniFvPatchVectorField.C
additiveFoam.C
diff --git a/applications/solvers/additiveFoam/additiveFoam.C b/applications/solvers/additiveFoam/additiveFoam.C
index 98d64ca..b5769e7 100644
--- a/applications/solvers/additiveFoam/additiveFoam.C
+++ b/applications/solvers/additiveFoam/additiveFoam.C
@@ -38,10 +38,9 @@ Description
#include "Polynomial.H"
#include "interpolateXY/interpolateXY.H"
-
#include "movingHeatSourceModel.H"
-#include "foamToExaCA/foamToExaCA.H"
+#include "EulerDdtScheme.H"
#include "CrankNicolsonDdtScheme.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -65,8 +64,6 @@ int main(int argc, char *argv[])
scalar alphaCoNum = 0.0;
- foamToExaCA ExaCA(T);
-
movingHeatSourceModel sources(mesh);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -97,8 +94,6 @@ int main(int argc, char *argv[])
#include "thermo/TEqn.H"
- ExaCA.update();
-
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
@@ -106,8 +101,6 @@ int main(int argc, char *argv[])
<< nl << endl;
}
- ExaCA.write();
-
return 0;
}
diff --git a/applications/solvers/additiveFoam/createFields.H b/applications/solvers/additiveFoam/createFields.H
index 2b14874..7e159dc 100644
--- a/applications/solvers/additiveFoam/createFields.H
+++ b/applications/solvers/additiveFoam/createFields.H
@@ -21,7 +21,7 @@ volScalarField alpha3
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
- IOobject::NO_WRITE
+ IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("alpha.powder", dimless, 0.0),
diff --git a/applications/solvers/additiveFoam/BCs/marangoni/marangoniFvPatchVectorField.C b/applications/solvers/additiveFoam/derivedFvPatchFields/marangoni/marangoniFvPatchVectorField.C
similarity index 100%
rename from applications/solvers/additiveFoam/BCs/marangoni/marangoniFvPatchVectorField.C
rename to applications/solvers/additiveFoam/derivedFvPatchFields/marangoni/marangoniFvPatchVectorField.C
diff --git a/applications/solvers/additiveFoam/BCs/marangoni/marangoniFvPatchVectorField.H b/applications/solvers/additiveFoam/derivedFvPatchFields/marangoni/marangoniFvPatchVectorField.H
similarity index 100%
rename from applications/solvers/additiveFoam/BCs/marangoni/marangoniFvPatchVectorField.H
rename to applications/solvers/additiveFoam/derivedFvPatchFields/marangoni/marangoniFvPatchVectorField.H
diff --git a/applications/solvers/additiveFoam/BCs/mixedTemperature/mixedTemperatureFvPatchScalarField.C b/applications/solvers/additiveFoam/derivedFvPatchFields/mixedTemperature/mixedTemperatureFvPatchScalarField.C
similarity index 100%
rename from applications/solvers/additiveFoam/BCs/mixedTemperature/mixedTemperatureFvPatchScalarField.C
rename to applications/solvers/additiveFoam/derivedFvPatchFields/mixedTemperature/mixedTemperatureFvPatchScalarField.C
diff --git a/applications/solvers/additiveFoam/BCs/mixedTemperature/mixedTemperatureFvPatchScalarField.H b/applications/solvers/additiveFoam/derivedFvPatchFields/mixedTemperature/mixedTemperatureFvPatchScalarField.H
similarity index 100%
rename from applications/solvers/additiveFoam/BCs/mixedTemperature/mixedTemperatureFvPatchScalarField.H
rename to applications/solvers/additiveFoam/derivedFvPatchFields/mixedTemperature/mixedTemperatureFvPatchScalarField.H
diff --git a/applications/solvers/additiveFoam/foamToExaCA/foamToExaCA.C b/applications/solvers/additiveFoam/functionObjects/ExaCA/ExaCA.C
similarity index 65%
rename from applications/solvers/additiveFoam/foamToExaCA/foamToExaCA.C
rename to applications/solvers/additiveFoam/functionObjects/ExaCA/ExaCA.C
index d7ae22e..d1cb1ed 100644
--- a/applications/solvers/additiveFoam/foamToExaCA/foamToExaCA.C
+++ b/applications/solvers/additiveFoam/functionObjects/ExaCA/ExaCA.C
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
- \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2023 Oak Ridge National Laboratory
@@ -25,10 +25,13 @@ License
\*---------------------------------------------------------------------------*/
-#include "foamToExaCA/foamToExaCA.H"
+#include "ExaCA.H"
+#include "Time.H"
+#include "fvMesh.H"
#include "addToRunTimeSelectionTable.H"
-#include "DynamicList.H"
-#include "interpolation.H"
+#include "volFields.H"
+#include "OFstream.H"
+#include "OSspecific.H"
#include "labelVector.H"
#include "pointMVCWeight.H"
@@ -36,86 +39,84 @@ License
namespace Foam
{
- defineTypeNameAndDebug(foamToExaCA, 0);
+namespace functionObjects
+{
+ defineTypeNameAndDebug(ExaCA, 0);
+
+ addToRunTimeSelectionTable
+ (
+ functionObject,
+ ExaCA,
+ dictionary
+ );
+}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
-Foam::foamToExaCA::foamToExaCA
+Foam::functionObjects::ExaCA::ExaCA
(
- const volScalarField& T
+ const word& name,
+ const Time& runTime,
+ const dictionary& dict
)
:
- IOdictionary
- (
- IOobject
- (
- "foamToExaCADict",
- T.time().constant(),
- T.mesh(),
- IOobject::READ_IF_PRESENT,
- IOobject::NO_WRITE
- )
- ),
-
- mesh_(T.mesh()),
-
- runTime_(T.time()),
-
- T_(T),
-
+ fvMeshFunctionObject(name, runTime, dict),
+ T_(mesh_.lookupObject>("T")),
vpi_(mesh_),
-
Tp_
(
IOobject
(
"Tp_",
- runTime_.timeName(),
+ runTime.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
vpi_.interpolate(T_)
),
-
- execute_(false)
+ searchEngine_(mesh_, polyMesh::CELL_TETS)
{
- if (this->headerOk())
- {
- execute_ = this->lookup("execute");
- }
-
- initialize();
+ read(dict);
+
+ setOverlapCells();
}
-// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
-void Foam::foamToExaCA::initialize()
-{
- if (!execute_)
- {
- return;
- }
+// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
+
+Foam::functionObjects::ExaCA::~ExaCA()
+{}
+
- box_ = this->lookup("box");
- iso_ = this->lookup("isotherm");
- dx_ = this->lookup("dx");
+// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
- treeBoundBox bb(box_);
+bool Foam::functionObjects::ExaCA::read(const dictionary& dict)
+{
+ box_ = dict.lookup("box");
+
+ isoValue_ = dict.lookup("isoValue");
+
+ dx_ = dict.lookup("dx");
+
+ return true;
+}
+void Foam::functionObjects::ExaCA::setOverlapCells()
+{
// create a compact cell-stencil using the overlap sub-space
const pointField& points = mesh_.points();
- treeBoundBox procBb(points);
+ boundBox procBb(points);
const vector extend = 1e-10*vector::one;
- if (procBb.overlaps(bb))
+ if (procBb.overlaps(box_))
{
forAll(mesh_.cells(), celli)
{
- treeBoundBox cellBb(point::max, point::min);
+ boundBox cellBb(point::max, point::min);
const labelList& vertices = mesh_.cellPoints()[celli];
@@ -125,78 +126,81 @@ void Foam::foamToExaCA::initialize()
cellBb.max() = max(cellBb.max(), points[vertices[i]] + extend);
}
- if (cellBb.overlaps(bb))
+ if (cellBb.overlaps(box_))
{
- compactCells.append(celli);
+ overlapCells.append(celli);
}
}
}
- compactCells.shrink();
+ overlapCells.shrink();
}
-void Foam::foamToExaCA::update()
+
+Foam::wordList Foam::functionObjects::ExaCA::fields() const
{
- if (!execute_)
- {
- return;
- }
+ return wordList::null();
+}
+
+bool Foam::functionObjects::ExaCA::execute()
+{
const pointScalarField Tp0_("Tp0_", Tp_);
Tp_ = vpi_.interpolate(T_);
- // capture events at interface cells: {cell id, time, vertice temperatures}
- forAll(compactCells, i)
+ // capture events at interface cells: {cell id, time, vertex temperatures}
+ const scalar t_ = mesh_.time().value();
+ const scalar t0_ = t_ - mesh_.time().deltaTValue();
+
+ forAll(overlapCells, i)
{
- label celli = compactCells[i];
+ label celli = overlapCells[i];
const labelList& vertices = mesh_.cellPoints()[celli];
- label prev = 0;
- label curr = 0;
+ label c0 = 0;
+ label c1 = 0;
forAll(vertices, pI)
{
- if (Tp0_[vertices[pI]] >= iso_)
+ if (Tp0_[vertices[pI]] >= isoValue_)
{
- prev++;
+ c0++;
}
- if (Tp_[vertices[pI]] >= iso_)
+ if (Tp_[vertices[pI]] >= isoValue_)
{
- curr++;
+ c1++;
}
}
-
- prev = prev % vertices.size();
- curr = curr % vertices.size();
+
+ const label n = vertices.size();
// overshoot correction: interface jumped this cell during time step
- if (!prev && !curr)
+ if ( !(c0 % n) && !(c1 % n) )
{
- if
- (
- (T_[celli] > iso_ && T_.oldTime()[celli] < iso_)
- || (T_[celli] < iso_ && T_.oldTime()[celli] > iso_)
- )
+ if (c0 != c1)
{
- prev = 0;
- curr = 1;
+ c0 = 0;
+ c1 = 1;
}
}
-
- // capture the solidification events
- if (prev || curr)
+
+ // capture solidification events
+ c0 %= n;
+ c1 %= n;
+
+ if (c0 || c1)
{
- List event(vertices.size() + 2);
+ List event(n + 2);
event[0] = celli;
// add previous event
- if (curr && !prev)
+ if (c1 && !c0)
{
- event[1] = runTime_.value() - runTime_.deltaTValue();
+ event[1] = t0_;
forAll(vertices, pI)
{
@@ -207,7 +211,7 @@ void Foam::foamToExaCA::update()
}
// add current event
- event[1] = runTime_.value();
+ event[1] = t_;
forAll(vertices, pI)
{
@@ -217,25 +221,115 @@ void Foam::foamToExaCA::update()
events.append(event);
}
}
+
+ return true;
}
-void Foam::foamToExaCA::interpolatePoints()
+void Foam::functionObjects::ExaCA::mapPoints()
{
- // dynamic list for exaca reduced data format
+ if (events.size() == 0)
+ {
+ return;
+ }
+
+ // find event sub-space before constructing interpolant weights
+ const pointField& points = mesh_.points();
+
+ const vector extend = 1e-10*vector::one;
+
+ boundBox eventBb(point::max, point::min);
+
+ for (label i = 1; i < events.size(); i++)
+ {
+ const label celli = events[i][0];
+
+ if (celli == events[i - 1][0])
+ {
+ continue;
+ }
+
+ const labelList& vertices = mesh_.cellPoints()[celli];
+
+ forAll(vertices, i)
+ {
+ eventBb.min() = min(eventBb.min(), points[vertices[i]] - extend);
+ eventBb.max() = max(eventBb.max(), points[vertices[i]] + extend);
+ }
+ }
+
+ // find interpolant weigthts for each point
+ label pI = 0;
+ label seedi = events[0][0];
+
+ pointsInCell.setSize(mesh_.nCells());
+
+ const labelVector nPoints(vector::one + box_.span() / dx_);
+
+ Info << "starting point loop" << endl;
+
+ for (label k=0; k < nPoints.z(); ++k)
+ {
+ for (label j=0; j < nPoints.y(); ++j)
+ {
+ for (label i=0; i < nPoints.x(); ++i)
+ {
+ const point pt = box_.max() - vector(i, j, k)*dx_;
+
+ if (eventBb.contains(pt))
+ {
+ // shift point during search to avoid edges in pointMVC
+ const point spt = pt - vector::one*1e-10;
+
+ label celli = searchEngine_.findCell(spt, seedi, true);
+
+ if (celli != -1)
+ {
+ positions.append(pt);
+
+ pointMVCWeight cpw(mesh_, spt, celli);
+
+ weights.append(cpw.weights());
+
+ pointsInCell[celli].append(pI);
+
+ pI++;
+ }
+
+ seedi = celli;
+ }
+ }
+ }
+ }
+
+ positions.shrink();
+
+ weights.shrink();
+
+ for (auto& pic : pointsInCell)
+ {
+ pic.shrink();
+ }
+}
+
+void Foam::functionObjects::ExaCA::interpolate()
+{
+ if (events.size() == 0)
+ {
+ return;
+ }
+
+ // format events in ExaCA reduced data format
DynamicList> data;
- // initialize melting time for first event
List tm;
tm.setSize(pointsInCell[events[0][0]].size(), events[0][1]);
- // events are order by cell id, and each cell id is ordered in time
for (label i = 1; i < events.size(); i++)
{
const List prevEvent = events[i - 1];
const List currEvent = events[i];
- // first event for the cell. set the melting time and continue
label celli = currEvent[0];
if (currEvent[0] != prevEvent[0])
@@ -244,7 +338,6 @@ void Foam::foamToExaCA::interpolatePoints()
continue;
}
- // extract event information
scalar prevTime = prevEvent[1];
scalar currTime = currEvent[1];
@@ -272,11 +365,11 @@ void Foam::foamToExaCA::interpolatePoints()
tp += w[j]*psi[j];
}
- if ((tp <= iso_) && (tp0 > iso_))
+ if ((tp <= isoValue_) && (tp0 > isoValue_))
{
const point& pt = positions[pointi];
- scalar m_ = min(max((iso_ - tp0)/(tp - tp0), 0), 1);
+ scalar m_ = min(max((isoValue_ - tp0)/(tp - tp0), 0), 1);
data.append
(
@@ -290,9 +383,9 @@ void Foam::foamToExaCA::interpolatePoints()
}
);
}
- else if ((tp > iso_) && (tp0 <= iso_))
+ else if ((tp > isoValue_) && (tp0 <= isoValue_))
{
- scalar m_ = min(max((iso_ - tp0)/(tp - tp0), 0), 1);
+ scalar m_ = min(max((isoValue_ - tp0)/(tp - tp0), 0), 1);
tm[p] = prevTime + m_*(currTime - prevTime);
}
@@ -304,7 +397,7 @@ void Foam::foamToExaCA::interpolatePoints()
// write the events for each processor to their own file
const fileName exacaPath
(
- runTime_.rootPath()/runTime_.globalCaseName()/"ExaCA"
+ mesh_.time().rootPath()/mesh_.time().globalCaseName()/"ExaCA"
);
OFstream os
@@ -324,122 +417,47 @@ void Foam::foamToExaCA::interpolatePoints()
}
}
-
-void Foam::foamToExaCA::mapPoints(const meshSearch& searchEngine)
+bool Foam::functionObjects::ExaCA::end()
{
- // find event sub-space before constructing interpolants
- const pointField& points = mesh_.points();
-
- const vector extend = 1e-10*vector::one;
-
- treeBoundBox eventBb(point::max, point::min);
-
- for (label i = 1; i < events.size(); i++)
- {
- const label celli = events[i][0];
-
- if (celli == events[i - 1][0])
- {
- continue;
- }
-
- const labelList& vertices = mesh_.cellPoints()[celli];
-
- forAll(vertices, i)
- {
- eventBb.min() = min(eventBb.min(), points[vertices[i]] - extend);
- eventBb.max() = max(eventBb.max(), points[vertices[i]] + extend);
- }
- }
-
- label pI = 0;
- label seedi = events[0][0];
-
- pointsInCell.setSize(mesh_.nCells());
-
- const labelVector nPoints(vector::one + box_.span() / dx_);
-
- for (label k=0; k < nPoints.z(); ++k)
- {
- for (label j=0; j < nPoints.y(); ++j)
- {
- for (label i=0; i < nPoints.x(); ++i)
- {
- const point pt = box_.max() - vector(i, j, k)*dx_;
-
- if (eventBb.contains(pt))
- {
- // shift point during search to avoid edges in pointMVC
- const point spt = pt - vector::one*1e-10;
-
- label celli = searchEngine.findCell(spt, seedi, true);
-
- if (celli != -1)
- {
- positions.append(pt);
-
- pointMVCWeight cpw(mesh_, spt, celli);
-
- weights.append(cpw.weights());
-
- pointsInCell[celli].append(pI);
-
- pI++;
- }
-
- seedi = celli;
- }
- }
- }
- }
-
- positions.shrink();
+ //- sort events by cell and in time
+ events.shrink();
- weights.shrink();
+ sort(events);
- for (auto& pic : pointsInCell)
- {
- pic.shrink();
- }
-}
+ Info<< "Number of solidification events: "
+ << returnReduce(events.size(), sumOp()) << endl;
-void Foam::foamToExaCA::write()
-{
- if (!execute_)
- {
- return;
- }
+ //- map points to cells
+ mesh_.time().cpuTimeIncrement();
+
+ mapPoints();
+
+ Info<< "Successfully mapped points to mesh in: "
+ << returnReduce(mesh_.time().cpuTimeIncrement(), maxOp()) << " s"
+ << endl << endl;
- // write the event data for each processor to separate files
+ //- interpolate and write ExaCA data in reduced data format
const fileName exacaPath
(
- runTime_.rootPath()/runTime_.globalCaseName()/"ExaCA"
+ mesh_.time().rootPath()/mesh_.time().globalCaseName()/"ExaCA"
);
mkDir(exacaPath);
+
+ interpolate();
+
+ Info<< "Successfully interpolated and wrote ExaCA data in: "
+ << returnReduce(mesh_.time().cpuTimeIncrement(), maxOp()) << " s"
+ << endl << endl;
- Info<< "Number of solidification events: "
- << returnReduce(events.size(), sumOp()) << endl;
-
- events.shrink();
-
- sort(events);
-
- // write exaca reduced data format with remelting
- runTime_.cpuTimeIncrement();
-
- meshSearch searchEngine(mesh_, polyMesh::CELL_TETS);
-
- if (events.size() > 0)
- {
- mapPoints(searchEngine);
+ return true;
+}
- interpolatePoints();
- }
- Info<< "Successfully mapped events to exaca file in: "
- << returnReduce(runTime_.cpuTimeIncrement(), maxOp()) << " s"
- << endl << endl;
+bool Foam::functionObjects::ExaCA::write()
+{
+ return true;
}
+
// ************************************************************************* //
diff --git a/applications/solvers/additiveFoam/foamToExaCA/foamToExaCA.H b/applications/solvers/additiveFoam/functionObjects/ExaCA/ExaCA.H
similarity index 58%
rename from applications/solvers/additiveFoam/foamToExaCA/foamToExaCA.H
rename to applications/solvers/additiveFoam/functionObjects/ExaCA/ExaCA.H
index 2660446..96bfad0 100644
--- a/applications/solvers/additiveFoam/foamToExaCA/foamToExaCA.H
+++ b/applications/solvers/additiveFoam/functionObjects/ExaCA/ExaCA.H
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
- \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2023 Oak Ridge National Laboratory
@@ -24,44 +24,35 @@ License
along with OpenFOAM. If not, see .
Class
- Foam::foamToExaca
-
-Description
- A utility for interpolating temperature data to a uniform cartestian grid
- and writes the data in the ExaCA data format.
+ Foam::functionObjects::ExaCA
SourceFiles
- foamToExaca.C
+ ExaCA.C
\*---------------------------------------------------------------------------*/
-#ifndef foamToExaCA_H
-#define foamToExaCA_H
-
-#include "IOdictionary.H"
-#include "volFields.H"
+#ifndef ExaCA_H
+#define ExaCA_H
+
+#include "fvMeshFunctionObject.H"
#include "volPointInterpolation.H"
#include "meshSearch.H"
-
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
+namespace functionObjects
+{
/*---------------------------------------------------------------------------*\
- Class foamToExaca Declaration
+ Class ExaCA Declaration
\*---------------------------------------------------------------------------*/
-class foamToExaCA
+class ExaCA
:
- public IOdictionary
+ public fvMeshFunctionObject
{
-private:
- // Private data
-
- const fvMesh& mesh_;
-
- const Time& runTime_;
+ // Private Data
const volScalarField& T_;
@@ -69,60 +60,90 @@ private:
mutable pointScalarField Tp_;
+ DynamicList