123 Info<<
"Allocating Mean Primal Fields" <<
endl;
207 Info<<
"Correcting (U,p) boundary conditions " <<
endl;
223 Info<<
"Correcting boundary conditions of turbulent fields" <<
endl;
237 solverControl_(SolverControl),
241 laminarTransportPtr_(nullptr),
242 turbulence_(nullptr),
243 RASModelVariables_(nullptr),
247 phiInitPtr_(nullptr),
251 phiMeanPtr_(nullptr),
253 correctBoundaryConditions_
255 SolverControl.solverDict().subOrEmptyDict(
"fieldReconstruction").
256 getOrDefault<
bool>(
"reconstruct", false)
271 solverControl_(vs.solverControl_),
272 pPtr_(allocateRenamedField(vs.pPtr_)),
273 UPtr_(allocateRenamedField(vs.UPtr_)),
274 phiPtr_(allocateRenamedField(vs.phiPtr_)),
275 laminarTransportPtr_(nullptr),
276 turbulence_(nullptr),
277 RASModelVariables_(vs.RASModelVariables_.clone()),
279 pInitPtr_(allocateRenamedField(vs.pInitPtr_)),
280 UInitPtr_(allocateRenamedField(vs.UInitPtr_)),
281 phiInitPtr_(allocateRenamedField(vs.phiInitPtr_)),
283 pMeanPtr_(allocateRenamedField(vs.pMeanPtr_)),
284 UMeanPtr_(allocateRenamedField(UMeanPtr_)),
285 phiMeanPtr_(allocateRenamedField(vs.phiMeanPtr_)),
287 correctBoundaryConditions_(vs.correctBoundaryConditions_)
290 <<
"Calling incompressibleVars copy constructor" <<
endl;
297 <<
"Calling incompressibleVars::clone" <<
endl;
386 Info<<
"Restoring field values to initial ones" <<
endl;
399 Info<<
"Resetting mean fields to zero" <<
endl;
419 scalar avIter(iAverageIter);
420 scalar oneOverItP1 = 1./(avIter + 1);
421 scalar mult = avIter*oneOverItP1;
471 createZeroFieldPtr<scalar>
480 createZeroFieldPtr<scalar>
489 createZeroFieldPtr<scalar>
void correctBoundaryConditions()
Correct boundary field.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
static word timeName(const scalar t, const int precision=precision_)
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
Base class for solution control classes.
const volVectorField & UInst() const
Return const reference to velocity.
solverControl & solverControl_
Reference to the solverControl of the solver allocating the fields.
bool storeInitValues() const
Return storeInitValues bool.
const volVectorField & U() const
Return const reference to velocity.
autoPtr< volVectorField > UMeanPtr_
autoPtr< volVectorField > UInitPtr_
const volScalarField & p() const
Return const reference to pressure.
autoPtr< volVectorField > UPtr_
const surfaceScalarField & phi() const
Return const reference to volume flux.
autoPtr< surfaceScalarField > phiPtr_
void restoreInitValues()
Restore field values to the initial ones.
const surfaceScalarField & phiInst() const
Return const reference to volume flux.
autoPtr< singlePhaseTransportModel > laminarTransportPtr_
autoPtr< volScalarField > pPtr_
Fields involved in the solution of the incompressible NS equations.
void correctTurbulentBoundaryConditions()
Update boundary conditions of turbulent fields.
const singlePhaseTransportModel & laminarTransport() const
Return const reference to transport model.
void setFields()
Read fields and set turbulence.
const volScalarField & pInst() const
Return const reference to pressure.
bool correctBoundaryConditions_
Update boundary conditions upon construction.
void computeMeanFields()
Compute mean fields on the fly.
void resetMeanFields()
Reset mean fields to zero.
autoPtr< surfaceScalarField > phiMeanPtr_
void renameTurbulenceFields()
Rename turbulence fields if necessary.
autoPtr< incompressible::RASModelVariables > RASModelVariables_
void correctNonTurbulentBoundaryConditions()
Update boundary conditions of mean-flow.
void correctBoundaryConditions()
correct boundaryconditions for all volFields
autoPtr< surfaceScalarField > phiInitPtr_
autoPtr< incompressible::turbulenceModel > turbulence_
virtual autoPtr< variablesSet > clone() const
Clone the incompressibleVars.
const autoPtr< incompressible::RASModelVariables > & RASModelVariables() const
Return const reference to the turbulence model variables.
autoPtr< volScalarField > pMeanPtr_
void setInitFields()
Set initial fields if necessary.
autoPtr< volScalarField > pInitPtr_
Keep a copy of the initial field values if necessary.
void setMeanFields()
Set mean fields if necessary.
Abstract base class for objective functions. No point in making this runTime selectable since its chi...
const volScalarField & TMVar1Inst() const
return references to instantaneous turbulence fields
virtual bool hasNut() const
virtual bool hasTMVar2() const
const volScalarField & nutRefInst() const
virtual bool hasTMVar1() const
Bools to identify which turbulent fields are present.
const volScalarField & TMVar2Inst() const
transferModelList & transfer()
Transfer.
void setFluxRequired(const word &name) const
Get flux-required for given name, or default.
A simple single-phase transport model based on viscosityModel.
Base class for solver control classes.
bool doAverageIter() const
bool storeInitValues() const
Re-initialize.
label & averageIter()
Return average iteration index reference.
bool useAveragedFields() const
bool average() const
Whether averaging is enabled or not.
Base class for creating a set of variables.
void swapAndRename(autoPtr< GeometricField< Type, PatchField, GeoMesh > > &p1, autoPtr< GeometricField< Type, PatchField, GeoMesh > > &p2)
Swap autoPtrs and rename managed fields.
bool useSolverNameForFields_
Append the solver name to the variables names?
void renameTurbulenceField(GeometricField< Type, fvPatchField, volMesh > &baseField, const word &solverName)
static void setField(autoPtr< GeometricField< Type, fvPatchField, volMesh > > &fieldPtr, const fvMesh &mesh, const word &baseName, const word &solverName, const bool useSolverNameForFields)
Read vol fields.
word solverName_
Solver name owning the variables set.
fvMesh & mesh_
Reference to the mesh database.
static void setFluxField(autoPtr< surfaceScalarField > &fieldPtr, const fvMesh &mesh, const volVectorField &velocity, const word &baseName, const word &solverName, const bool useSolverNameForFields)
Set flux field.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define DebugInfo
Report an information message using Foam::Info.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
GeometricField< vector, fvPatchField, volMesh > volVectorField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
messageStream Info
Information stream (stdout output on master, null elsewhere)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
static constexpr const zero Zero
Global zero (0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.