Files
OpenFOAM-12/test/postProcessing/channel/system/controlDict
Henry Weller 968e60148a New modular solver framework for single- and multi-region simulations
in which different solver modules can be selected in each region to for complex
conjugate heat-transfer and other combined physics problems such as FSI
(fluid-structure interaction).

For single-region simulations the solver module is selected, instantiated and
executed in the PIMPLE loop in the new foamRun application.

For multi-region simulations the set of solver modules, one for each region, are
selected, instantiated and executed in the multi-region PIMPLE loop of new the
foamMultiRun application.

This provides a very general, flexible and extensible framework for complex
coupled problems by creating more solver modules, either by converting existing
solver applications or creating new ones.

The current set of solver modules provided are:

isothermalFluid
    Solver module for steady or transient turbulent flow of compressible
    isothermal fluids with optional mesh motion and mesh topology changes.

    Created from the rhoSimpleFoam, rhoPimpleFoam and buoyantFoam solvers but
    without the energy equation, hence isothermal.  The buoyant pressure
    formulation corresponding to the buoyantFoam solver is selected
    automatically by the presence of the p_rgh pressure field in the start-time
    directory.

fluid
    Solver module for steady or transient turbulent flow of compressible fluids
    with heat-transfer for HVAC and similar applications, with optional
    mesh motion and mesh topology changes.

    Derived from the isothermalFluid solver module with the addition of the
    energy equation from the rhoSimpleFoam, rhoPimpleFoam and buoyantFoam
    solvers, thus providing the equivalent functionality of these three solvers.

multicomponentFluid
    Solver module for steady or transient turbulent flow of compressible
    reacting fluids with optional mesh motion and mesh topology changes.

    Derived from the isothermalFluid solver module with the addition of
    multicomponent thermophysical properties energy and specie mass-fraction
    equations from the reactingFoam solver, thus providing the equivalent
    functionality in reactingFoam and buoyantReactingFoam.  Chemical reactions
    and/or combustion modelling may be optionally selected to simulate reacting
    systems including fires, explosions etc.

solid
    Solver module for turbulent flow of compressible fluids for conjugate heat
    transfer, HVAC and similar applications, with optional mesh motion and mesh
    topology changes.

    The solid solver module may be selected in solid regions of a CHT case, with
    either the fluid or multicomponentFluid solver module in the fluid regions
    and executed with foamMultiRun to provide functionality equivalent
    chtMultiRegionFoam but in a flexible and extensible framework for future
    extension to more complex coupled problems.

All the usual fvModels, fvConstraints, functionObjects etc. are available with
these solver modules to support simulations including body-forces, local sources,
Lagrangian clouds, liquid films etc. etc.

Converting compressibleInterFoam and multiphaseEulerFoam into solver modules
would provide a significant enhancement to the CHT capability and incompressible
solvers like pimpleFoam run in conjunction with solidDisplacementFoam in
foamMultiRun would be useful for a range of FSI problems.  Many other
combinations of existing solvers converted into solver modules could prove
useful for a very wide range of complex combined physics simulations.

All tutorials from the rhoSimpleFoam, rhoPimpleFoam, buoyantFoam, reactingFoam,
buoyantReactingFoam and chtMultiRegionFoam solver applications replaced by
solver modules have been updated and moved into the tutorials/modules directory:

modules
├── CHT
│   ├── coolingCylinder2D
│   ├── coolingSphere
│   ├── heatedDuct
│   ├── heatExchanger
│   ├── reverseBurner
│   └── shellAndTubeHeatExchanger
├── fluid
│   ├── aerofoilNACA0012
│   ├── aerofoilNACA0012Steady
│   ├── angledDuct
│   ├── angledDuctExplicitFixedCoeff
│   ├── angledDuctLTS
│   ├── annularThermalMixer
│   ├── BernardCells
│   ├── blockedChannel
│   ├── buoyantCavity
│   ├── cavity
│   ├── circuitBoardCooling
│   ├── decompressionTank
│   ├── externalCoupledCavity
│   ├── forwardStep
│   ├── helmholtzResonance
│   ├── hotRadiationRoom
│   ├── hotRadiationRoomFvDOM
│   ├── hotRoom
│   ├── hotRoomBoussinesq
│   ├── hotRoomBoussinesqSteady
│   ├── hotRoomComfort
│   ├── iglooWithFridges
│   ├── mixerVessel2DMRF
│   ├── nacaAirfoil
│   ├── pitzDaily
│   ├── prism
│   ├── shockTube
│   ├── squareBend
│   ├── squareBendLiq
│   └── squareBendLiqSteady
└── multicomponentFluid
    ├── aachenBomb
    ├── counterFlowFlame2D
    ├── counterFlowFlame2D_GRI
    ├── counterFlowFlame2D_GRI_TDAC
    ├── counterFlowFlame2DLTS
    ├── counterFlowFlame2DLTS_GRI_TDAC
    ├── cylinder
    ├── DLR_A_LTS
    ├── filter
    ├── hotBoxes
    ├── membrane
    ├── parcelInBox
    ├── rivuletPanel
    ├── SandiaD_LTS
    ├── simplifiedSiwek
    ├── smallPoolFire2D
    ├── smallPoolFire3D
    ├── splashPanel
    ├── verticalChannel
    ├── verticalChannelLTS
    └── verticalChannelSteady

Also redirection scripts are provided for the replaced solvers which call
foamRun -solver <solver module name> or foamMultiRun in the case of
chtMultiRegionFoam for backward-compatibility.

Documentation for foamRun and foamMultiRun:

Application
    foamRun

Description
    Loads and executes an OpenFOAM solver module either specified by the
    optional \c solver entry in the \c controlDict or as a command-line
    argument.

    Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
    pseudo-transient and steady simulations.

Usage
    \b foamRun [OPTION]

      - \par -solver <name>
        Solver name

      - \par -libs '(\"lib1.so\" ... \"libN.so\")'
        Specify the additional libraries loaded

    Example usage:
      - To run a \c rhoPimpleFoam case by specifying the solver on the
        command line:
        \verbatim
            foamRun -solver fluid
        \endverbatim

      - To update and run a \c rhoPimpleFoam case add the following entries to
        the controlDict:
        \verbatim
            application     foamRun;

            solver          fluid;
        \endverbatim
        then execute \c foamRun

Application
    foamMultiRun

Description
    Loads and executes an OpenFOAM solver modules for each region of a
    multiregion simulation e.g. for conjugate heat transfer.

    The region solvers are specified in the \c regionSolvers dictionary entry in
    \c controlDict, containing a list of pairs of region and solver names,
    e.g. for a two region case with one fluid region named
    liquid and one solid region named tubeWall:
    \verbatim
        regionSolvers
        {
            liquid          fluid;
            tubeWall        solid;
        }
    \endverbatim

    The \c regionSolvers entry is a dictionary to support name substitutions to
    simplify the specification of a single solver type for a set of
    regions, e.g.
    \verbatim
        fluidSolver     fluid;
        solidSolver     solid;

        regionSolvers
        {
            tube1             $fluidSolver;
            tubeWall1         solid;
            tube2             $fluidSolver;
            tubeWall2         solid;
            tube3             $fluidSolver;
            tubeWall3         solid;
        }
    \endverbatim

    Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
    pseudo-transient and steady simulations.

Usage
    \b foamMultiRun [OPTION]

      - \par -libs '(\"lib1.so\" ... \"libN.so\")'
        Specify the additional libraries loaded

    Example usage:
      - To update and run a \c chtMultiRegion case add the following entries to
        the controlDict:
        \verbatim
            application     foamMultiRun;

            regionSolvers
            {
                fluid           fluid;
                solid           solid;
            }
        \endverbatim
        then execute \c foamMultiRun
2022-08-04 21:11:35 +01:00

431 lines
8.7 KiB
C++

/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application foamRun;
solver fluid;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 1;
deltaT 0.01;
writeControl runTime;
writeInterval 1;
purgeWrite 0;
writeFormat ascii;
writePrecision 10;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
adjustTimeStep no;
maxCo 1;
maxDeltaT 1;
cacheTemporaryObjects
(
kEpsilon:G
);
combustionFunctions
{
// Not possible to test here as it needs a case with a combustion model
//#includeFunc Qdot
// Not possible to test here as it needs a XiFoam case
//#includeFunc XiReactionRate
}
controlFunctions
{
#includeFunc stopAtClockTime(stopTime=3600)
#includeFunc stopAtFile
#includeFunc time
#includeFunc writeObjects(kEpsilon:G)
}
fieldsFunctions
{
#includeFunc age
#includeFunc components(U)
#includeFunc CourantNo
#includeFunc ddt(p)
#includeFunc div(phi)
#includeFunc enstrophy
// !!! Takes a list of fields, not a single field like most others. It has
// an inconsistent name convention; i.e., "<fieldName>Mean", rather than
// "mean(<fieldName>)". It also does both "mean" and "prime2Mean". Consider
// fixing the output field naming and splitting into separate
// configurations for the different outputs.
#includeFunc fieldAverage(U, k, epsilon)
#includeFunc flowType
#includeFunc grad(p)
#includeFunc Lambda2
#includeFunc MachNo
#includeFunc mag(U)
#includeFunc magSqr(U)
#includeFunc PecletNo
// Not possible to test here as it needs a multiphase case
//#includeFunc phaseMap
#includeFunc Q
#includeFunc randomise(U, magPerturbation=0.1)
#includeFunc reconstruct(phi)
#includeFunc scale(age, scale=0.1)
#includeFunc shearStress
#includeFunc streamFunction
#includeFunc surfaceInterpolate(rho, result=rhof)
#includeFunc totalEnthalpy
#includeFunc turbulenceFields(nuEff, R, devTau)
#includeFunc turbulenceIntensity
#includeFunc vorticity
#includeFunc wallHeatFlux
#includeFunc wallHeatTransferCoeff(rho=1.225, Cp=1005, Pr=0.7, Prt=0.9)
#includeFunc wallShearStress
#includeFunc writeCellCentres
#includeFunc writeCellVolumes
// !!! Only writes the internal parts of vol fields. The name should really
// be less general to reflect this; e.g., writeInternalFieldsVTK. However,
// a better change would be further library-ise the internals of foamToVTK
// and incorporate it into this object so that it writes patches, surface
// fields, point fields, lagrangian, etc... Then we could deprecate
// foamToVTK in favour of this function.
#includeFunc writeVTK(U, p)
#includeFunc yPlus
}
fieldsOperationsFunctions
{
// Operation sequence to compute normalised direction of velocity
// perturbation from mean
#includeFunc subtract(U, UMean, result=u)
#includeFunc uniform
(
fieldType=volScalarField,
name=mag(smallU),
dimensions=[0 1 -1 0 0 0 0],
value=1e-16
)
#includeFunc add(mag(U), mag(smallU), result=stabilise(mag(U)))
#includeFunc divide(u, stabilise(mag(U)), result=uFrac)
// Operation to compute a tensor by doing an outer vector product
#includeFunc multiply(U, u)
// Operation sequence to compute the log of temperature divided by an
// ambient value
#includeFunc uniform
(
fieldType=volScalarField,
name=Ta,
dimensions=[0 0 0 1 0 0 0],
value=297
)
#includeFunc divide(T, Ta)
#includeFunc log(divide(T,Ta))
}
forcesFunctions
{
#includeFunc forcesIncompressible
(
patches=(walls),
rhoInf=1.225,
CofR=(0 0 0),
pitchAxis=(0 1 0)
)
#includeFunc forceCoeffsIncompressible
(
patches=(walls),
magUInf=20,
lRef=1,
Aref=1,
CofR=(0 0 0),
liftDir=(0 0 1),
dragDir=(1 0 0),
pitchAxis=(0 1 0)
)
#includeFunc forcesCompressible
(
patches=(walls),
CofR=(0 0 0),
pitchAxis=(0 1 0)
)
#includeFunc forceCoeffsCompressible
(
patches=(walls),
magUInf=20,
rhoInf=1.225,
lRef=1,
Aref=1,
CofR=(0 0 0),
liftDir=(0 0 1),
dragDir=(1 0 0),
pitchAxis=(0 1 0)
)
// Not possible to test here as it needs a multiphase Euler-Euler case
//#includeFunc phaseForces(phase=air)
}
graphsFunctions
{
#includeFunc graphUniform
(
start=(-0.5 -0.5 0),
end=(0.5 0.5 0),
nPoints=100,
fields=(p U)
)
#includeFunc graphCell
(
start=(-0.500001 -0.500001 0),
end=(0.500001 0.500001 0),
fields=(p U)
)
#includeFunc graphLayerAverage
(
patches=(inlet),
axis=x,
fields=(p U)
)
}
lagrangianFunctions
{
// Not possible to test here as it needs a DSMC case
//#includeFunc dsmcFields
}
minMaxFunctions
{
#includeFunc cellMin(epsilon)
#includeFunc cellMax(k)
#includeFunc cellMinMag(U, writeLocation=yes)
#includeFunc cellMaxMag(U, writeLocation=yes)
}
numericalFunctions
{
#includeFunc residuals(p, U, h, k, epsilon)
#includeFunc timeStep
}
pressureFunctions
{
#includeFunc divide(p, rho, result=kinematic(p))
#includeFunc staticPressureIncompressible(kinematic(p), rhoInf=1.2)
#includeFunc totalPressureIncompressible(kinematic(p), rhoInf=1.2)
#includeFunc totalPressureCompressible
}
probesFunctions
{
#includeFunc probes(points=((-0.2 -0.2 0) (0 0 0) (0.2 0.2 0)), p, U, T)
#includeFunc internalProbes(points=((-0.2 -0.2 0) (0.2 0.2 0)), p, U, T)
#includeFunc boundaryProbes
(
points=((-0.2 -0.2 -0.04) (0.2 0.2 -0.04)),
maxDistance=0.02,
p,
U,
T
)
#includeFunc uniform
(
fieldType=volScalarField,
name=alpha.dummy,
dimensions=[0 0 0 0 0 0 0],
value=0.2
)
#includeFunc interfaceHeight
(
alpha=alpha.dummy,
points=((-0.2 -0.2 0) (0.2 0.2 0))
)
}
solversFunctions
{
#includeFunc scalarTransport(s, schemesField=h)
#includeFunc phaseScalarTransport(s.dummy, schemesField=h, p=p_rgh, rho=rho)
// Not possible to test here as not compatible with compressible solvers
//#includeFunc particles
}
streamlinesFunctions
{
#includeFunc streamlinesSphere
(
centre=(0 0 0),
radius=0.1,
nPoints=100,
p,
U,
direction=forward
)
#includeFunc streamlinesLine
(
start=(-0.5 -0.5 -0.05),
end=(0.5 0.5 0.05),
nPoints=100,
p,
U,
direction=backward
)
#includeFunc streamlinesPatch
(
patch=inlet,
nPoints=100,
p,
U
)
#includeFunc streamlinesPoints
(
points=((-0.2 -0.2 0) (0 0 0) (0.2 0.2 0))
p,
U,
direction=forward
)
}
surfaceFunctions
{
#includeFunc cutPlaneSurface(point=(0 0 0), normal=(0 0 1), p, U)
#includeFunc isoSurface(isoField=nut, isoValue=0.1, p, U)
#includeFunc patchSurface(patch=walls, p, U)
}
surfaceFieldValueFunctions
{
#includeFunc patchAverage(patch=inlet, k)
#includeFunc patchIntegrate(patch=inlet, epsilon)
#includeFunc patchFlowRate(patch=inlet)
#includeFunc patchDifference(patch1=inlet, patch2=outlet, p)
#includeFunc faceZoneAverage(name=f0, U)
#includeFunc faceZoneFlowRate(name=f0)
#includeFunc triSurfaceVolumetricFlowRate(name=mid.obj)
#includeFunc triSurfaceDifference
(
name1=nearInlet.obj,
name2=nearOutlet.obj,
p
)
}
functions
{
$combustionFunctions;
$controlFunctions;
$fieldsFunctions;
$fieldsOperationsFunctions;
$forcesFunctions;
$graphsFunctions;
$lagrangianFunctions;
$minMaxFunctions;
$numericalFunctions;
$pressureFunctions;
$probesFunctions;
$solversFunctions;
$streamlinesFunctions;
$surfaceFunctions;
$surfaceFieldValueFunctions;
}
// ************************************************************************* //