With the new fvModels framework it is now possible to implement complex models
and wrappers around existing complex models which can then be optionally
selected in any general solver which provides compatible fields and
thermophysical properties. This simplifies code development and maintenance by
significantly reducing complex code duplication and also provide the opportunity
of running these models in other solvers without the need for code duplication
and alteration.
The immediate advantage of this development is the replacement of the
specialised Lagrangian solvers with their general counterparts:
reactingParticleFoam -> reactingFoam
reactingParcelFoam -> reactingFoam
sprayFoam -> reactingFoam
simpleReactingParticleFoam -> reactingFoam
buoyantReactingParticleFoam -> buoyantReactingFoam
For example to run a reactingParticleFoam case in reactingFoam add the following
entries in constant/fvModels:
buoyancyForce
{
type buoyancyForce;
}
clouds
{
type clouds;
libs ("liblagrangianParcel.so");
}
which add the acceleration due to gravity needed by Lagrangian clouds and the
clouds themselves.
See the following cases for examples converted from reactingParticleFoam:
$FOAM_TUTORIALS/combustion/reactingFoam/Lagrangian
and to run a buoyantReactingParticleFoam case in buoyantReactingFoam add the
following entry constant/fvModels:
clouds
{
type clouds;
libs ("liblagrangianParcel.so");
}
to add support for Lagrangian clouds and/or
surfaceFilm
{
type surfaceFilm;
libs ("libsurfaceFilmModels.so");
}
to add support for surface film. The buoyancyForce fvModel is not required in
this case as the buoyantReactingFoam solver has built-in support for buoyancy
utilising the p_rgh formulation to provide better numerical handling for this
force for strongly buoyancy-driven flows.
See the following cases for examples converted from buoyantReactingParticleFoam:
$FOAM_TUTORIALS/combustion/buoyantReactingFoam/Lagrangian
All the tutorial cases for the redundant solvers have been updated and converted
into their new equivalents and redirection scripts replace these solvers to
provide users with prompts on which solvers have been replaced by which and
information on how to upgrade their cases.
To support this change and allow all previous Lagrangian tutorials to run as
before the special Lagrangian solver fvSolution/PIMPLE control
solvePrimaryRegion has been replaced by the more general and useful controls:
models : Enable the fvModels
thermophysics : Enable thermophysics (energy and optional composition)
flow : Enable flow (pressure/velocity system)
which also replace the fvSolution/PIMPLE control frozenFlow present in some
solvers. These three controls can be used in various combinations to allow for
example only the fvModels to be evaluated, e.g. in
$FOAM_TUTORIALS/combustion/buoyantReactingFoam/Lagrangian/rivuletPanel
PIMPLE
{
models yes;
thermophysics no;
flow no;
.
.
.
so that only the film is solved. Or during the start-up of a case it might be
beneficial to run the pressure-velocity system for a while without updating
temperature which can be achieved by switching-off thermophysics. Also the
behaviour of the previous frozenFlow switch can be reproduced by switching flow
off with the other two switches on, allowing for example reactions, temperature
and composition update without flow.
89 lines
2.5 KiB
Bash
Executable File
89 lines
2.5 KiB
Bash
Executable File
#!/bin/sh
|
|
cd ${0%/*} || exit 1 # Run from this directory
|
|
|
|
# Parse arguments for library compilation
|
|
. ../wmake/scripts/AllwmakeParseArguments
|
|
|
|
# Perform various checks
|
|
wmakeCheckPwd "$WM_PROJECT_DIR/src" || {
|
|
echo "Allwmake error: Current directory is not \$WM_PROJECT_DIR/src"
|
|
echo " The environment variables are inconsistent with the installation."
|
|
echo " Check the OpenFOAM entries in your dot-files and source them."
|
|
exit 1
|
|
}
|
|
|
|
[ -n "$FOAM_EXT_LIBBIN" ] || {
|
|
echo "Allwmake error: FOAM_EXT_LIBBIN not set"
|
|
echo " Check the OpenFOAM entries in your dot-files and source them."
|
|
exit 1
|
|
}
|
|
|
|
# Update OpenFOAM version strings if required
|
|
wmakePrintBuild -check || wrmo OpenFOAM/global/global.o 2>/dev/null
|
|
|
|
Pstream/Allwmake $targetType $*
|
|
|
|
OSspecific/${WM_OSTYPE:-POSIX}/Allwmake $targetType $*
|
|
wmake $targetType OpenFOAM
|
|
|
|
wmake $targetType fileFormats
|
|
wmake $targetType surfMesh
|
|
wmake $targetType triSurface
|
|
wmake $targetType meshTools
|
|
|
|
# Decomposition methods needed by dummyThirdParty
|
|
# (dummy metisDecomp, scotchDecomp etc) needed by e.g. meshTools
|
|
dummyThirdParty/Allwmake $targetType $*
|
|
|
|
wmake $targetType finiteVolume
|
|
wmake $targetType lagrangian/basic
|
|
wmake $targetType lagrangian/distributionModels
|
|
wmake $targetType genericPatchFields
|
|
|
|
wmake $targetType mesh/extrudeModel
|
|
wmake $targetType dynamicMesh
|
|
|
|
# Compile scotchDecomp, metisDecomp etc.
|
|
parallel/Allwmake $targetType $*
|
|
|
|
wmake $targetType dynamicFvMesh
|
|
wmake $targetType topoChangerFvMesh
|
|
wmake $targetType conversion
|
|
wmake $targetType sampling
|
|
|
|
wmake $targetType ODE
|
|
wmake $targetType randomProcesses
|
|
|
|
wmake $targetType transportModels
|
|
|
|
thermophysicalModels/Allwmake $targetType $*
|
|
twoPhaseModels/Allwmake $targetType $*
|
|
MomentumTransportModels/Allwmake $targetType $*
|
|
ThermophysicalTransportModels/Allwmake $targetType $*
|
|
wmake $targetType radiationModels
|
|
wmake $targetType combustionModels
|
|
regionModels/Allwmake $targetType $*
|
|
lagrangian/Allwmake $targetType $*
|
|
mesh/Allwmake $targetType $*
|
|
renumber/Allwmake $targetType $*
|
|
fvAgglomerationMethods/Allwmake $targetType $*
|
|
|
|
wmake $targetType fvMotionSolver
|
|
wmake $targetType engine
|
|
wmake $targetType fvModels
|
|
wmake $targetType fvConstraints
|
|
|
|
functionObjects/Allwmake $targetType $*
|
|
|
|
wmake $targetType sixDoFRigidBodyMotion
|
|
wmake $targetType sixDoFRigidBodyState
|
|
wmake $targetType rigidBodyDynamics
|
|
wmake $targetType rigidBodyMeshMotion
|
|
wmake $targetType rigidBodyState
|
|
wmake $targetType specieTransfer
|
|
wmake $targetType atmosphericModels
|
|
wmake $targetType waves
|
|
|
|
|
|
#------------------------------------------------------------------------------
|