Abstract base class for objective functions. No point in making this runTime selectable since its childs will have different constructors. More...
Public Types | |
typedef autoPtr< tmp< volScalarField > > | autoTmp |
Public Member Functions | |
TypeName ("RASModelVariables") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, RASModelVariables, dictionary,(const fvMesh &mesh, const solverControl &SolverControl),(mesh, SolverControl)) | |
RASModelVariables (const fvMesh &mesh, const solverControl &SolverControl) | |
Construct from components. More... | |
RASModelVariables (const RASModelVariables &rmv) | |
Copy constructor. More... | |
autoPtr< RASModelVariables > | clone () const |
Clone. More... | |
virtual | ~RASModelVariables ()=default |
bool | hasTMVar1 () const |
Bools to idenify which turbulent fields are present. More... | |
bool | hasTMVar2 () const |
bool | hasNut () const |
bool | hasDist () const |
const word & | TMVar1BaseName () const |
Turbulence field names. More... | |
const word & | TMVar2BaseName () const |
const word & | nutBaseName () const |
const volScalarField & | TMVar1 () const |
Return references to turbulence fields. More... | |
volScalarField & | TMVar1 () |
const volScalarField & | TMVar2 () const |
volScalarField & | TMVar2 () |
const volScalarField & | nutRef () const |
volScalarField & | nutRef () |
const volScalarField & | d () const |
volScalarField & | d () |
const volScalarField & | TMVar1Inst () const |
return references to instantaneous turbulence fields More... | |
volScalarField & | TMVar1Inst () |
const volScalarField & | TMVar2Inst () const |
volScalarField & | TMVar2Inst () |
const volScalarField & | nutRefInst () const |
volScalarField & | nutRefInst () |
virtual tmp< volScalarField > | nutJacobianVar1 (const singlePhaseTransportModel &laminarTransport) const |
Return nut Jacobian wrt the TM vars. More... | |
virtual tmp< volScalarField > | nutJacobianVar2 (const singlePhaseTransportModel &laminarTransport) const |
void | restoreInitValues () |
Restore turbulent fields to their initial values. More... | |
void | resetMeanFields () |
Reset mean fields to zero. More... | |
void | computeMeanFields () |
Compute mean fields on the fly. More... | |
tmp< volSymmTensorField > | devReff (const singlePhaseTransportModel &laminarTransport, const volVectorField &U) const |
Return stress tensor based on the mean flow variables. More... | |
virtual void | correctBoundaryConditions (const incompressible::turbulenceModel &turbulence) |
correct bounday conditions of turbulent fields More... | |
virtual void | transfer (RASModelVariables &rmv) |
Transfer turbulence fields from an another object. More... | |
Static Public Member Functions | |
static autoPtr< RASModelVariables > | New (const fvMesh &mesh, const solverControl &SolverControl) |
Return a reference to the selected turbulence model. More... | |
Protected Member Functions | |
void | allocateInitValues () |
void | allocateMeanFields () |
autoTmp | cloneAutoTmp (const autoTmp &source) const |
void | copyAndRename (volScalarField &f1, volScalarField &f2) |
Abstract base class for objective functions. No point in making this runTime selectable since its childs will have different constructors.
Definition at line 58 of file RASModelVariables.H.
typedef autoPtr<tmp<volScalarField> > autoTmp |
Definition at line 65 of file RASModelVariables.H.
RASModelVariables | ( | const fvMesh & | mesh, |
const solverControl & | SolverControl | ||
) |
Construct from components.
Definition at line 194 of file RASModelVariables.C.
RASModelVariables | ( | const RASModelVariables & | rmv | ) |
Copy constructor.
Will allocate new fields (instead of referencing the ones in the turbulence model), so cannot be used directly to access the fields of the turbulence model. Mainly used for checkpointing in unsteady adjoint
Definition at line 222 of file RASModelVariables.C.
|
virtualdefault |
|
protected |
Definition at line 47 of file RASModelVariables.C.
References Foam::endl(), RASModelVariables::hasNut_, RASModelVariables::hasTMVar1_, RASModelVariables::hasTMVar2_, Foam::Info, Foam::name(), RASModelVariables::nutInitPtr_, RASModelVariables::nutRefInst(), RASModelVariables::solverControl_, solverControl::storeInitValues(), RASModelVariables::TMVar1InitPtr_, RASModelVariables::TMVar1Inst(), RASModelVariables::TMVar2InitPtr_, and RASModelVariables::TMVar2Inst().
|
protected |
Definition at line 88 of file RASModelVariables.C.
References IOobject::AUTO_WRITE, solverControl::average(), Foam::endl(), RASModelVariables::hasNut_, RASModelVariables::hasTMVar1_, RASModelVariables::hasTMVar2_, Foam::Info, RASModelVariables::mesh_, Foam::name(), RASModelVariables::nutMeanPtr_, RASModelVariables::nutRefInst(), IOobject::READ_IF_PRESENT, RASModelVariables::solverControl_, fvMesh::time(), Time::timeName(), RASModelVariables::TMVar1Inst(), RASModelVariables::TMVar1MeanPtr_, RASModelVariables::TMVar2Inst(), and RASModelVariables::TMVar2MeanPtr_.
|
protected |
Definition at line 153 of file RASModelVariables.C.
References DebugInfo, Foam::endl(), RASModelVariables::mesh_, autoPtr< T >::reset(), fvMesh::time(), timeName, Time::timeName(), and autoPtr< T >::valid().
|
protected |
Definition at line 175 of file RASModelVariables.C.
Referenced by RASModelVariables::transfer().
TypeName | ( | "RASModelVariables" | ) |
Runtime type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
RASModelVariables | , | ||
dictionary | , | ||
(const fvMesh &mesh, const solverControl &SolverControl) | , | ||
(mesh, SolverControl) | |||
) |
autoPtr< RASModelVariables > clone | ( | ) | const |
Clone.
Will allocate new fields (instead of referencing the ones in the turbulence model), so cannot be used directly to access the fields of the turbulence model. Mainly used for checkpointing in unsteady adjoint
Definition at line 249 of file RASModelVariables.C.
References autoPtr< T >::New().
|
static |
Return a reference to the selected turbulence model.
Definition at line 257 of file RASModelVariables.C.
References dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, Foam::Info, mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, turbulenceModel::propertiesName, and dictionary::subOrEmptyDict().
Referenced by incompressibleVars::setFields().
bool hasTMVar1 | ( | ) | const |
Bools to idenify which turbulent fields are present.
Definition at line 300 of file RASModelVariables.C.
References RASModelVariables::hasTMVar1_.
Referenced by incompressibleVars::renameTurbulenceFields(), and RASModelVariables::transfer().
bool hasTMVar2 | ( | ) | const |
Definition at line 306 of file RASModelVariables.C.
References RASModelVariables::hasTMVar2_.
Referenced by incompressibleVars::renameTurbulenceFields(), and RASModelVariables::transfer().
bool hasNut | ( | ) | const |
Definition at line 312 of file RASModelVariables.C.
References RASModelVariables::hasNut_.
Referenced by incompressibleVars::renameTurbulenceFields(), and RASModelVariables::transfer().
bool hasDist | ( | ) | const |
Definition at line 318 of file RASModelVariables.C.
References RASModelVariables::hasDist_.
Referenced by RASModelVariables::transfer().
const word & TMVar1BaseName | ( | ) | const |
Turbulence field names.
Definition at line 324 of file RASModelVariables.C.
References RASModelVariables::TMVar1BaseName_.
const word & TMVar2BaseName | ( | ) | const |
Definition at line 330 of file RASModelVariables.C.
References RASModelVariables::TMVar2BaseName_.
const word & nutBaseName | ( | ) | const |
Definition at line 336 of file RASModelVariables.C.
References RASModelVariables::nutBaseName_.
const volScalarField & TMVar1 | ( | ) | const |
Return references to turbulence fields.
will return the mean field if it exists, otherwise the instantaneous one
Definition at line 342 of file RASModelVariables.C.
References RASModelVariables::solverControl_, RASModelVariables::TMVar1MeanPtr_, RASModelVariables::TMVar1Ptr_, and solverControl::useAveragedFields().
volScalarField & TMVar1 | ( | ) |
Definition at line 355 of file RASModelVariables.C.
References RASModelVariables::solverControl_, RASModelVariables::TMVar1MeanPtr_, RASModelVariables::TMVar1Ptr_, and solverControl::useAveragedFields().
const volScalarField & TMVar2 | ( | ) | const |
Definition at line 368 of file RASModelVariables.C.
References RASModelVariables::solverControl_, RASModelVariables::TMVar2MeanPtr_, RASModelVariables::TMVar2Ptr_, and solverControl::useAveragedFields().
volScalarField & TMVar2 | ( | ) |
Definition at line 380 of file RASModelVariables.C.
References RASModelVariables::solverControl_, RASModelVariables::TMVar2MeanPtr_, RASModelVariables::TMVar2Ptr_, and solverControl::useAveragedFields().
const volScalarField & nutRef | ( | ) | const |
Definition at line 392 of file RASModelVariables.C.
References RASModelVariables::hasNut_, RASModelVariables::nutMeanPtr_, RASModelVariables::nutPtr_, RASModelVariables::solverControl_, and solverControl::useAveragedFields().
Referenced by RASModelVariables::transfer().
volScalarField & nutRef | ( | ) |
Definition at line 405 of file RASModelVariables.C.
References RASModelVariables::hasNut_, RASModelVariables::nutMeanPtr_, RASModelVariables::nutPtr_, RASModelVariables::solverControl_, and solverControl::useAveragedFields().
const volScalarField & d | ( | ) | const |
Definition at line 418 of file RASModelVariables.C.
References RASModelVariables::dPtr_.
Referenced by RASModelVariables::transfer().
volScalarField & d | ( | ) |
Definition at line 424 of file RASModelVariables.C.
References RASModelVariables::dPtr_.
const volScalarField & TMVar1Inst | ( | ) | const |
return references to instantaneous turbulence fields
Definition at line 430 of file RASModelVariables.C.
References RASModelVariables::TMVar1Ptr_.
Referenced by RASModelVariables::allocateInitValues(), RASModelVariables::allocateMeanFields(), RASModelVariables::computeMeanFields(), incompressibleVars::renameTurbulenceFields(), RASModelVariables::resetMeanFields(), RASModelVariables::restoreInitValues(), and RASModelVariables::transfer().
volScalarField & TMVar1Inst | ( | ) |
Definition at line 436 of file RASModelVariables.C.
References RASModelVariables::TMVar1Ptr_.
const volScalarField & TMVar2Inst | ( | ) | const |
Definition at line 442 of file RASModelVariables.C.
References RASModelVariables::TMVar2Ptr_.
Referenced by RASModelVariables::allocateInitValues(), RASModelVariables::allocateMeanFields(), RASModelVariables::computeMeanFields(), incompressibleVars::renameTurbulenceFields(), RASModelVariables::resetMeanFields(), RASModelVariables::restoreInitValues(), and RASModelVariables::transfer().
volScalarField & TMVar2Inst | ( | ) |
Definition at line 448 of file RASModelVariables.C.
References RASModelVariables::TMVar2Ptr_.
const volScalarField & nutRefInst | ( | ) | const |
Definition at line 454 of file RASModelVariables.C.
References RASModelVariables::nutPtr_.
Referenced by RASModelVariables::allocateInitValues(), RASModelVariables::allocateMeanFields(), RASModelVariables::computeMeanFields(), incompressibleVars::renameTurbulenceFields(), RASModelVariables::resetMeanFields(), and RASModelVariables::restoreInitValues().
volScalarField & nutRefInst | ( | ) |
Definition at line 460 of file RASModelVariables.C.
References RASModelVariables::nutPtr_.
|
virtual |
Return nut Jacobian wrt the TM vars.
Reimplemented in SpalartAllmaras.
Definition at line 467 of file RASModelVariables.C.
References Foam::dimless, Foam::endl(), IOobject::NO_READ, IOobject::NO_WRITE, WarningInFunction, and Foam::Zero.
|
virtual |
Definition at line 496 of file RASModelVariables.C.
References Foam::dimless, Foam::endl(), IOobject::NO_READ, IOobject::NO_WRITE, WarningInFunction, and Foam::Zero.
void restoreInitValues | ( | ) |
Restore turbulent fields to their initial values.
Definition at line 523 of file RASModelVariables.C.
References RASModelVariables::hasNut_, RASModelVariables::hasTMVar1_, RASModelVariables::hasTMVar2_, RASModelVariables::nutInitPtr_, RASModelVariables::nutRefInst(), RASModelVariables::solverControl_, solverControl::storeInitValues(), RASModelVariables::TMVar1InitPtr_, RASModelVariables::TMVar1Inst(), RASModelVariables::TMVar2InitPtr_, and RASModelVariables::TMVar2Inst().
void resetMeanFields | ( | ) |
Reset mean fields to zero.
Definition at line 543 of file RASModelVariables.C.
References solverControl::average(), Foam::endl(), RASModelVariables::hasNut_, RASModelVariables::hasTMVar1_, RASModelVariables::hasTMVar2_, Foam::Info, RASModelVariables::nutMeanPtr_, RASModelVariables::nutRefInst(), RASModelVariables::solverControl_, RASModelVariables::TMVar1Inst(), RASModelVariables::TMVar1MeanPtr_, RASModelVariables::TMVar2Inst(), RASModelVariables::TMVar2MeanPtr_, and Foam::Zero.
void computeMeanFields | ( | ) |
Compute mean fields on the fly.
Definition at line 568 of file RASModelVariables.C.
References solverControl::averageIter(), solverControl::doAverageIter(), RASModelVariables::hasNut_, RASModelVariables::hasTMVar1_, RASModelVariables::hasTMVar2_, RASModelVariables::nutMeanPtr_, RASModelVariables::nutRefInst(), RASModelVariables::solverControl_, RASModelVariables::TMVar1Inst(), RASModelVariables::TMVar1MeanPtr_, RASModelVariables::TMVar2Inst(), and RASModelVariables::TMVar2MeanPtr_.
tmp< volSymmTensorField > devReff | ( | const singlePhaseTransportModel & | laminarTransport, |
const volVectorField & | U | ||
) | const |
Return stress tensor based on the mean flow variables.
Definition at line 595 of file RASModelVariables.C.
References Foam::dev(), Foam::fvc::grad(), laminarTransport(), IOobject::NO_READ, IOobject::NO_WRITE, Foam::twoSymm(), and U.
|
virtual |
correct bounday conditions of turbulent fields
Reimplemented in kOmegaSST.
Definition at line 619 of file RASModelVariables.C.
Referenced by kOmegaSST::correctBoundaryConditions().
|
virtual |
Transfer turbulence fields from an another object.
Copies values since the ownership of the original fields is held by the turbulence model
Definition at line 652 of file RASModelVariables.C.
References RASModelVariables::copyAndRename(), RASModelVariables::d(), RASModelVariables::hasDist(), RASModelVariables::hasDist_, RASModelVariables::hasNut(), RASModelVariables::hasNut_, RASModelVariables::hasTMVar1(), RASModelVariables::hasTMVar1_, RASModelVariables::hasTMVar2(), RASModelVariables::hasTMVar2_, RASModelVariables::nutRef(), RASModelVariables::TMVar1Inst(), and RASModelVariables::TMVar2Inst().
|
protected |
Definition at line 72 of file RASModelVariables.H.
Referenced by RASModelVariables::allocateMeanFields(), and RASModelVariables::cloneAutoTmp().
|
protected |
Definition at line 73 of file RASModelVariables.H.
Referenced by RASModelVariables::allocateInitValues(), RASModelVariables::allocateMeanFields(), RASModelVariables::computeMeanFields(), RASModelVariables::nutRef(), RASModelVariables::resetMeanFields(), RASModelVariables::restoreInitValues(), RASModelVariables::TMVar1(), and RASModelVariables::TMVar2().
|
protected |
Definition at line 78 of file RASModelVariables.H.
Referenced by RASModelVariables::allocateInitValues(), RASModelVariables::allocateMeanFields(), RASModelVariables::computeMeanFields(), RASModelVariables::hasTMVar1(), RASModelVariables::resetMeanFields(), RASModelVariables::restoreInitValues(), and RASModelVariables::transfer().
|
protected |
Definition at line 79 of file RASModelVariables.H.
Referenced by RASModelVariables::allocateInitValues(), RASModelVariables::allocateMeanFields(), RASModelVariables::computeMeanFields(), RASModelVariables::hasTMVar2(), RASModelVariables::resetMeanFields(), RASModelVariables::restoreInitValues(), and RASModelVariables::transfer().
|
protected |
Definition at line 80 of file RASModelVariables.H.
Referenced by RASModelVariables::allocateInitValues(), RASModelVariables::allocateMeanFields(), RASModelVariables::computeMeanFields(), RASModelVariables::hasNut(), RASModelVariables::nutRef(), RASModelVariables::resetMeanFields(), RASModelVariables::restoreInitValues(), and RASModelVariables::transfer().
|
protected |
Definition at line 81 of file RASModelVariables.H.
Referenced by RASModelVariables::hasDist(), and RASModelVariables::transfer().
|
protected |
Definition at line 82 of file RASModelVariables.H.
Referenced by RASModelVariables::TMVar1(), and RASModelVariables::TMVar1Inst().
|
protected |
Definition at line 83 of file RASModelVariables.H.
Referenced by RASModelVariables::TMVar2(), and RASModelVariables::TMVar2Inst().
|
protected |
Definition at line 84 of file RASModelVariables.H.
Referenced by RASModelVariables::nutRef(), and RASModelVariables::nutRefInst().
|
protected |
Definition at line 85 of file RASModelVariables.H.
Referenced by RASModelVariables::d().
|
protected |
Definition at line 87 of file RASModelVariables.H.
Referenced by RASModelVariables::TMVar1BaseName().
|
protected |
Definition at line 88 of file RASModelVariables.H.
Referenced by RASModelVariables::TMVar2BaseName().
|
protected |
Definition at line 89 of file RASModelVariables.H.
Referenced by RASModelVariables::nutBaseName().
|
protected |
Definition at line 93 of file RASModelVariables.H.
Referenced by RASModelVariables::allocateInitValues(), and RASModelVariables::restoreInitValues().
|
protected |
Definition at line 94 of file RASModelVariables.H.
Referenced by RASModelVariables::allocateInitValues(), and RASModelVariables::restoreInitValues().
|
protected |
Definition at line 95 of file RASModelVariables.H.
Referenced by RASModelVariables::allocateInitValues(), and RASModelVariables::restoreInitValues().
|
protected |
Definition at line 98 of file RASModelVariables.H.
Referenced by RASModelVariables::allocateMeanFields(), RASModelVariables::computeMeanFields(), RASModelVariables::resetMeanFields(), and RASModelVariables::TMVar1().
|
protected |
Definition at line 99 of file RASModelVariables.H.
Referenced by RASModelVariables::allocateMeanFields(), RASModelVariables::computeMeanFields(), RASModelVariables::resetMeanFields(), and RASModelVariables::TMVar2().
|
protected |
Definition at line 100 of file RASModelVariables.H.
Referenced by RASModelVariables::allocateMeanFields(), RASModelVariables::computeMeanFields(), RASModelVariables::nutRef(), and RASModelVariables::resetMeanFields().