Base class for solution control classes. More...
#include <incompressibleVars.H>


Public Member Functions | |
| TypeName ("incompressibleVars") | |
| Run-time type information. | |
| incompressibleVars (fvMesh &mesh, solverControl &SolverControl) | |
| Construct from mesh. | |
| incompressibleVars (const incompressibleVars &vs) | |
| Copy constructor. | |
| virtual autoPtr< variablesSet > | clone () const |
| Clone the incompressibleVars. | |
| virtual | ~incompressibleVars ()=default |
| Destructor. | |
| const volScalarField & | p () const |
| Return const reference to pressure. | |
| volScalarField & | p () |
| Return reference to pressure. | |
| const volVectorField & | U () const |
| Return const reference to velocity. | |
| volVectorField & | U () |
| Return reference to velocity. | |
| const surfaceScalarField & | phi () const |
| Return const reference to volume flux. | |
| surfaceScalarField & | phi () |
| Return reference to volume flux. | |
| const volScalarField & | pInst () const |
| Return const reference to pressure. | |
| volScalarField & | pInst () |
| Return reference to pressure. | |
| const volVectorField & | UInst () const |
| Return const reference to velocity. | |
| volVectorField & | UInst () |
| Return reference to velocity. | |
| const surfaceScalarField & | phiInst () const |
| Return const reference to volume flux. | |
| surfaceScalarField & | phiInst () |
| Return reference to volume flux. | |
| const singlePhaseTransportModel & | laminarTransport () const |
| Return const reference to transport model. | |
| singlePhaseTransportModel & | laminarTransport () |
| Return reference to transport model. | |
| const autoPtr< incompressible::turbulenceModel > & | turbulence () const |
| Return const reference to the turbulence model. | |
| autoPtr< incompressible::turbulenceModel > & | turbulence () |
| Return reference to the turbulence model. | |
| const autoPtr< incompressible::RASModelVariables > & | RASModelVariables () const |
| Return const reference to the turbulence model variables. | |
| autoPtr< incompressible::RASModelVariables > & | RASModelVariables () |
| Return reference to the turbulence model variables. | |
| void | restoreInitValues () |
| Restore field values to the initial ones. | |
| void | resetMeanFields () |
| Reset mean fields to zero. | |
| void | computeMeanFields () |
| Compute mean fields on the fly. | |
| void | correctBoundaryConditions () |
| correct boundaryconditions for all volFields | |
| bool | storeInitValues () const |
| Return storeInitValues bool. | |
| bool | computeMeanFields () const |
| Return computeMeanFields bool. | |
| const volScalarField & | T () const |
| volScalarField & | T () |
| Return reference to the temperature. | |
| *virtual void | transfer (variablesSet &vars) |
| Transfer the fields of another variablesSet to this. | |
| bool | write () const |
| Write dummy turbulent fields to allow for continuation in multi-point, turbulent runs. | |
| Public Member Functions inherited from variablesSet | |
| TypeName ("variablesSet") | |
| Run-time type information. | |
| variablesSet (fvMesh &mesh, const dictionary &dict) | |
| Construct from mesh and solver name. | |
| virtual | ~variablesSet ()=default |
| Destructor. | |
| const word & | solverName () const |
| Return solver name. | |
| bool | useSolverNameForFields () const |
| Append solver name to fields? | |
| template<class Type> | |
| tmp< GeometricField< Type, fvPatchField, volMesh > > | allocateField (const fvMesh &mesh, const word &baseName, const word &solverName, const bool useSolverNameForFields) |
| template<class Type> | |
| void | renameTurbulenceField (GeometricField< Type, fvPatchField, volMesh > &baseField, const word &solverName) |
| Turbulence model always reads fields with the prescribed name If a custom name is supplied, check whether this field exists, copy it to the field known by the turbulence model and re-name the latter. | |
| tmp< surfaceScalarField > | allocateFluxField (const fvMesh &mesh, const volVectorField &velocity, const word &baseName, const word &solverName, const bool useSolverNameForFields) |
Protected Member Functions | |
| void | setFields () |
| Read fields and set turbulence. | |
| void | setInitFields () |
| Set initial fields if necessary. | |
| void | setMeanFields () |
| Set mean fields if necessary. | |
| void | renameTurbulenceFields () |
| Rename turbulence fields if necessary. | |
| void | correctNonTurbulentBoundaryConditions () |
| Update boundary conditions of mean-flow. | |
| void | correctTurbulentBoundaryConditions () |
| Update boundary conditions of turbulent fields. | |
| void | operator= (const incompressibleVars &) |
| No copy assignment. | |
| Protected Member Functions inherited from variablesSet | |
| template<class Type, template< class > class PatchField, class GeoMesh> | |
| autoPtr< GeometricField< Type, PatchField, GeoMesh > > | allocateRenamedField (const autoPtr< GeometricField< Type, PatchField, GeoMesh > > &bf) |
| template<class Type, template< class > class PatchField, class GeoMesh> | |
| void | swapAndRename (autoPtr< GeometricField< Type, PatchField, GeoMesh > > &p1, autoPtr< GeometricField< Type, PatchField, GeoMesh > > &p2) |
| Swap autoPtrs and rename managed fields. | |
Protected Attributes | |
| solverControl & | solverControl_ |
| Reference to the solverControl of the solver allocating the fields. | |
| autoPtr< volScalarField > | pPtr_ |
| Fields involved in the solution of the incompressible NS equations. | |
| autoPtr< volVectorField > | UPtr_ |
| autoPtr< surfaceScalarField > | phiPtr_ |
| autoPtr< singlePhaseTransportModel > | laminarTransportPtr_ |
| autoPtr< incompressible::turbulenceModel > | turbulence_ |
| autoPtr< incompressible::RASModelVariables > | RASModelVariables_ |
| autoPtr< volScalarField > | pInitPtr_ |
| Keep a copy of the initial field values if necessary. | |
| autoPtr< volVectorField > | UInitPtr_ |
| autoPtr< surfaceScalarField > | phiInitPtr_ |
| autoPtr< volScalarField > | pMeanPtr_ |
| Manage mean fields. Turbulent mean fields are managed in RASModelVariables. | |
| autoPtr< volVectorField > | UMeanPtr_ |
| autoPtr< surfaceScalarField > | phiMeanPtr_ |
| bool | correctBoundaryConditions_ |
| Update boundary conditions upon construction. | |
| Protected Attributes inherited from variablesSet | |
| fvMesh & | mesh_ |
| Reference to the mesh database. | |
| word | solverName_ |
| Solver name owning the variables set. | |
| bool | useSolverNameForFields_ |
| Append the solver name to the variables names? | |
Additional Inherited Members | |
| Static Public Member Functions inherited from variablesSet | |
| template<class Type> | |
| static void | setField (autoPtr< GeometricField< Type, fvPatchField, volMesh > > &fieldPtr, const fvMesh &mesh, const word &baseName, const word &solverName, const bool useSolverNameForFields) |
| Read vol fields. | |
| static void | setFluxField (autoPtr< surfaceScalarField > &fieldPtr, const fvMesh &mesh, const volVectorField &velocity, const word &baseName, const word &solverName, const bool useSolverNameForFields) |
| Set flux field. | |
| static tmp< volVectorField > | autoCreateMeshMovementField (const fvMesh &mesh, const word &name, const dimensionSet &dims) |
| Auto create variable for mesh movement. | |
| template<class Type, template< class > class PatchField, class GeoMesh> | |
| static void | nullifyField (GeometricField< Type, PatchField, GeoMesh > &fieldPtr) |
| Nullify field and old times, if present. | |
| incompressibleVars | ( | fvMesh & | mesh, |
| solverControl & | SolverControl ) |
Construct from mesh.
Definition at line 226 of file incompressibleVars.C.
References correctBoundaryConditions_, laminarTransportPtr_, mesh, phiInitPtr_, phiMeanPtr_, phiPtr_, pInitPtr_, pMeanPtr_, pPtr_, RASModelVariables_, setFields(), setInitFields(), setMeanFields(), solverControl_, turbulence_, UInitPtr_, UMeanPtr_, and UPtr_.
Referenced by clone(), incompressibleVars(), operator=(), transfer(), and TypeName().


| incompressibleVars | ( | const incompressibleVars & | vs | ) |
Copy constructor.
turbulence_ and laminarTransport_ are uninitialized since there is no clear way (and possibly no usage) of cloning them. The resulting incompressibleVars is hence incomplete. Additionally, copied fields have the original name, appended with the timeName, to avoid database collisions. To be used as storing space during the solutiuon of the unsteady adjoint equations
Definition at line 261 of file incompressibleVars.C.
References variablesSet::allocateRenamedField(), clone(), correctBoundaryConditions_, DebugInfo, Foam::endl(), incompressibleVars(), laminarTransportPtr_, variablesSet::mesh_, phiInitPtr_, phiMeanPtr_, phiPtr_, pInitPtr_, pMeanPtr_, pPtr_, RASModelVariables_, solverControl_, turbulence_, UInitPtr_, UMeanPtr_, and UPtr_.

|
virtualdefault |
Destructor.
|
protected |
Read fields and set turbulence.
Definition at line 37 of file incompressibleVars.C.
References correctBoundaryConditions_, correctNonTurbulentBoundaryConditions(), correctTurbulentBoundaryConditions(), laminarTransport(), laminarTransportPtr_, variablesSet::mesh_, RASModelVariables::New(), IncompressibleTurbulenceModel< transportModel >::New(), phiInst(), phiPtr_, pPtr_, RASModelVariables_, renameTurbulenceFields(), variablesSet::setField(), variablesSet::setFluxField(), solverControl_, variablesSet::solverName_, turbulence_, UInst(), UPtr_, and variablesSet::useSolverNameForFields_.
Referenced by incompressibleVars().


|
protected |
Set initial fields if necessary.
Definition at line 92 of file incompressibleVars.C.
References name, phiInitPtr_, phiInst(), pInitPtr_, pInst(), solverControl_, UInitPtr_, and UInst().
Referenced by incompressibleVars().


|
protected |
Set mean fields if necessary.
Definition at line 109 of file incompressibleVars.C.
References IOobjectOption::AUTO_WRITE, correctBoundaryConditions_, Foam::endl(), Foam::Info, variablesSet::mesh_, name, phiInst(), phiMeanPtr_, pInst(), pMeanPtr_, IOobjectOption::READ_IF_PRESENT, IOobjectOption::REGISTER, solverControl_, UInst(), and UMeanPtr_.
Referenced by incompressibleVars().


|
protected |
Rename turbulence fields if necessary.
Definition at line 176 of file incompressibleVars.C.
References RASModelVariables::hasNut(), RASModelVariables::hasTMVar1(), RASModelVariables::hasTMVar2(), RASModelVariables::nutRefInst(), RASModelVariables_, variablesSet::renameTurbulenceField(), variablesSet::solverName_, RASModelVariables::TMVar1Inst(), RASModelVariables::TMVar2Inst(), and variablesSet::useSolverNameForFields_.
Referenced by setFields().


|
protected |
Update boundary conditions of mean-flow.
Definition at line 201 of file incompressibleVars.C.
References GeometricField< Type, PatchField, GeoMesh >::correctBoundaryConditions(), Foam::endl(), Foam::Info, pInst(), pMeanPtr_, solverControl_, UInst(), and UMeanPtr_.
Referenced by correctBoundaryConditions(), and setFields().


|
protected |
Update boundary conditions of turbulent fields.
Definition at line 214 of file incompressibleVars.C.
References Foam::endl(), Foam::Info, RASModelVariables_, and turbulence_.
Referenced by setFields().


|
protected |
| TypeName | ( | "incompressibleVars" | ) |
Run-time type information.
References incompressibleVars(), and mesh.

|
virtual |
Clone the incompressibleVars.
Reimplemented from variablesSet.
Definition at line 290 of file incompressibleVars.C.
References DebugInfo, Foam::endl(), and incompressibleVars().
Referenced by incompressibleVars().


| const volScalarField & p | ( | ) | const |
Return const reference to pressure.
Definition at line 301 of file incompressibleVars.C.
References pMeanPtr_, pPtr_, and solverControl_.
Referenced by incompressiblePrimalSolver::correctBoundaryConditions().

| volScalarField & p | ( | ) |
Return reference to pressure.
Definition at line 314 of file incompressibleVars.C.
References pMeanPtr_, pPtr_, and solverControl_.
| const volVectorField & U | ( | ) | const |
Return const reference to velocity.
Definition at line 327 of file incompressibleVars.C.
References solverControl_, UMeanPtr_, and UPtr_.
Referenced by incompressiblePrimalSolver::correctBoundaryConditions(), adjointRASModel::New(), and adjointTurbulenceModel::New().

| volVectorField & U | ( | ) |
Return reference to velocity.
Definition at line 340 of file incompressibleVars.C.
References solverControl_, UMeanPtr_, and UPtr_.
| const surfaceScalarField & phi | ( | ) | const |
Return const reference to volume flux.
Definition at line 353 of file incompressibleVars.C.
References phiMeanPtr_, phiPtr_, and solverControl_.
Referenced by incompressiblePrimalSolver::correctBoundaryConditions().

| surfaceScalarField & phi | ( | ) |
Return reference to volume flux.
Definition at line 365 of file incompressibleVars.C.
References phiMeanPtr_, phiPtr_, and solverControl_.
|
inline |
Return const reference to pressure.
Definition at line 24 of file incompressibleVarsI.H.
References pPtr_.
Referenced by computeMeanFields(), correctNonTurbulentBoundaryConditions(), restoreInitValues(), setInitFields(), and setMeanFields().

|
inline |
Return reference to pressure.
Definition at line 30 of file incompressibleVarsI.H.
References pPtr_.
|
inline |
Return const reference to velocity.
Definition at line 36 of file incompressibleVarsI.H.
References UPtr_.
Referenced by computeMeanFields(), correctNonTurbulentBoundaryConditions(), restoreInitValues(), setFields(), setInitFields(), and setMeanFields().

|
inline |
Return reference to velocity.
Definition at line 42 of file incompressibleVarsI.H.
References UPtr_.
|
inline |
Return const reference to volume flux.
Definition at line 49 of file incompressibleVarsI.H.
References phiPtr_.
Referenced by computeMeanFields(), restoreInitValues(), setFields(), setInitFields(), and setMeanFields().

|
inline |
Return reference to volume flux.
Definition at line 55 of file incompressibleVarsI.H.
References phiPtr_.
|
inline |
Return const reference to transport model.
Definition at line 62 of file incompressibleVarsI.H.
References laminarTransportPtr_.
Referenced by setFields().

|
inline |
Return reference to transport model.
Definition at line 69 of file incompressibleVarsI.H.
References laminarTransportPtr_.
|
inline |
Return const reference to the turbulence model.
Definition at line 76 of file incompressibleVarsI.H.
References turbulence_.
Referenced by incompressiblePrimalSolver::correctBoundaryConditions().

|
inline |
Return reference to the turbulence model.
Definition at line 83 of file incompressibleVarsI.H.
References turbulence_.
|
inline |
Return const reference to the turbulence model variables.
Definition at line 90 of file incompressibleVarsI.H.
References RASModelVariables_.
Referenced by objectiveIncompressible::allocatedJdTurbulence(), and transfer().

|
inline |
Return reference to the turbulence model variables.
Definition at line 97 of file incompressibleVarsI.H.
References RASModelVariables_.
| void restoreInitValues | ( | ) |
Restore field values to the initial ones.
Definition at line 378 of file incompressibleVars.C.
References Foam::endl(), Foam::Info, phiInitPtr_, phiInst(), pInitPtr_, pInst(), RASModelVariables_, solverControl_, UInitPtr_, and UInst().

| void resetMeanFields | ( | ) |
Reset mean fields to zero.
Definition at line 391 of file incompressibleVars.C.
References Foam::endl(), Foam::Info, phiMeanPtr_, pMeanPtr_, RASModelVariables_, solverControl_, UMeanPtr_, and Foam::Zero.

| void computeMeanFields | ( | ) |
Compute mean fields on the fly.
Definition at line 409 of file incompressibleVars.C.
References Foam::endl(), Foam::Info, phiInst(), phiMeanPtr_, pInst(), pMeanPtr_, RASModelVariables_, solverControl_, UInst(), and UMeanPtr_.

| void correctBoundaryConditions | ( | ) |
correct boundaryconditions for all volFields
Definition at line 427 of file incompressibleVars.C.
References correctNonTurbulentBoundaryConditions(), RASModelVariables_, and turbulence_.
Referenced by incompressiblePrimalSolver::correctBoundaryConditions().


| bool storeInitValues | ( | ) | const |
Return storeInitValues bool.
Definition at line 434 of file incompressibleVars.C.
References solverControl_.
| bool computeMeanFields | ( | ) | const |
Return computeMeanFields bool.
Definition at line 440 of file incompressibleVars.C.
References solverControl_.
| const volScalarField & T | ( | ) | const |
| volScalarField & T | ( | ) |
Return reference to the temperature.
|
virtual |
Transfer the fields of another variablesSet to this.
Reimplemented from variablesSet.
Definition at line 446 of file incompressibleVars.C.
References incompressibleVars(), phiPtr_, pPtr_, RASModelVariables(), RASModelVariables_, Foam::refCast(), variablesSet::swapAndRename(), and UPtr_.

| bool write | ( | ) | const |
Write dummy turbulent fields to allow for continuation in multi-point, turbulent runs.
Definition at line 460 of file incompressibleVars.C.
References Foam::createZeroFieldPtr(), variablesSet::mesh_, RASModelVariables_, variablesSet::useSolverNameForFields_, and write().
Referenced by incompressiblePrimalSolver::write(), write(), and incompressiblePrimalSolver::writeNow().


|
protected |
Reference to the solverControl of the solver allocating the fields.
Definition at line 59 of file incompressibleVars.H.
Referenced by computeMeanFields(), computeMeanFields(), correctNonTurbulentBoundaryConditions(), incompressibleVars(), incompressibleVars(), p(), p(), phi(), phi(), resetMeanFields(), restoreInitValues(), setFields(), setInitFields(), setMeanFields(), storeInitValues(), U(), and U().
|
protected |
Fields involved in the solution of the incompressible NS equations.
Definition at line 64 of file incompressibleVars.H.
Referenced by incompressibleVars(), incompressibleVars(), p(), p(), pInst(), pInst(), setFields(), and transfer().
|
protected |
Definition at line 65 of file incompressibleVars.H.
Referenced by incompressibleVars(), incompressibleVars(), setFields(), transfer(), U(), U(), UInst(), and UInst().
|
protected |
Definition at line 66 of file incompressibleVars.H.
Referenced by incompressibleVars(), incompressibleVars(), phi(), phi(), phiInst(), phiInst(), setFields(), and transfer().
|
protected |
Definition at line 67 of file incompressibleVars.H.
Referenced by incompressibleVars(), incompressibleVars(), laminarTransport(), laminarTransport(), and setFields().
|
protected |
Definition at line 68 of file incompressibleVars.H.
Referenced by correctBoundaryConditions(), correctTurbulentBoundaryConditions(), incompressibleVars(), incompressibleVars(), setFields(), turbulence(), and turbulence().
|
protected |
Definition at line 69 of file incompressibleVars.H.
Referenced by computeMeanFields(), correctBoundaryConditions(), correctTurbulentBoundaryConditions(), incompressibleVars(), incompressibleVars(), RASModelVariables(), RASModelVariables(), renameTurbulenceFields(), resetMeanFields(), restoreInitValues(), setFields(), transfer(), and write().
|
protected |
Keep a copy of the initial field values if necessary.
Definition at line 75 of file incompressibleVars.H.
Referenced by incompressibleVars(), incompressibleVars(), restoreInitValues(), and setInitFields().
|
protected |
Definition at line 76 of file incompressibleVars.H.
Referenced by incompressibleVars(), incompressibleVars(), restoreInitValues(), and setInitFields().
|
protected |
Definition at line 77 of file incompressibleVars.H.
Referenced by incompressibleVars(), incompressibleVars(), restoreInitValues(), and setInitFields().
|
protected |
Manage mean fields. Turbulent mean fields are managed in RASModelVariables.
Definition at line 83 of file incompressibleVars.H.
Referenced by computeMeanFields(), correctNonTurbulentBoundaryConditions(), incompressibleVars(), incompressibleVars(), p(), p(), resetMeanFields(), and setMeanFields().
|
protected |
Definition at line 84 of file incompressibleVars.H.
Referenced by computeMeanFields(), correctNonTurbulentBoundaryConditions(), incompressibleVars(), incompressibleVars(), resetMeanFields(), setMeanFields(), U(), and U().
|
protected |
Definition at line 85 of file incompressibleVars.H.
Referenced by computeMeanFields(), incompressibleVars(), incompressibleVars(), phi(), phi(), resetMeanFields(), and setMeanFields().
|
protected |
Update boundary conditions upon construction.
Useful for cases in which information has been lost on boundary (e.g. averaging, redistribution)
Definition at line 93 of file incompressibleVars.H.
Referenced by incompressibleVars(), incompressibleVars(), setFields(), and setMeanFields().