Skip to content

Commit d22e7fd

Browse files
colemanjskincaidkc
andauthored
Of11 amr path logic (#22)
* Add none as default or optional refinement controller * modified initial mesh and calrified README.md * cleaned README.md * reorganized additivefoam solver and libraries * Refactored solver to build from additivefoam-dedicated libraries. Improved stability of thermodynamic solution by removing explicit correction outside of solidification range (this prevents the need for persistence in AMR coarsening). Currently, the gradient based-amr is a WIP along with moving foamToExaCA to a FunctionObject that supports AMR * removed old foamToExaCA which does not support AMR. The new ExaCA FunctionObject in a work-in-progress and currently interpolate from cell-centers to cell-vertices at every execute() call of FunctionObjects * cleaned up uniformInvervals logic based on existing scan path functionality * added in optional user-defined bounding box to increase refined mesh span around the moving beam * changes to refinement controller update return logic * updated AMR to set uniform intervals based on scan path logic start and end times. AMR continues to be called at these intervals for the remainder of the simulation to capture solidifying cells. latent heat logic corrected to remove explicit correction that causes numerical instabilities * simplified refinement controller logic. The refinementField is only updated on intervals, so there is no need for condition calls to mesh.update() * cleaned up refinementController and updated comments --------- Co-authored-by: Kellis Kincaid (khk) <[email protected]> Co-authored-by: Coleman J S <[email protected]>
1 parent 6464f2e commit d22e7fd

File tree

20 files changed

+460
-491
lines changed

20 files changed

+460
-491
lines changed

applications/solvers/additiveFoam/additiveFoam.C

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,13 @@ int main(int argc, char *argv[])
9696
#include "CourantNo.H"
9797
#include "setDeltaT.H"
9898

99-
timer.start("Heat Source");
99+
timer.start("Heat Source Update");
100100
sources.update();
101-
timer.stop("Heat Source");
101+
timer.stop("Heat Source Update");
102102

103-
timer.start("Refinement Control and Mesh Update");
104-
if (sources.refinementControl().update())
105-
{
106-
mesh.update();
107-
}
108-
timer.stop("Refinement Control and Mesh Update");
103+
timer.start("Mesh Update");
104+
mesh.update();
105+
timer.stop("Mesh Update");
109106

110107
runTime++;
111108

@@ -124,9 +121,9 @@ int main(int argc, char *argv[])
124121
}
125122
}
126123

127-
timer.start("TEqn");
124+
timer.start("Thermo Solve");
128125
#include "thermo/TEqn.H"
129-
timer.stop("TEqn");
126+
timer.stop("Thermo Solve");
130127

131128
ExaCA.update();
132129

applications/solvers/additiveFoam/movingHeatSource/heatSourceModels/heatSourceModel/heatSourceModel.C

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,8 @@ Foam::heatSourceModel::qDot()
365365
qDot_ = absorbedPower * weights / volume;
366366
}
367367

368+
qDot_.correctBoundaryConditions();
369+
368370
return tqDot;
369371
}
370372

0 commit comments

Comments
 (0)