Go to the documentation of this file.
31 alphaPorosity_(const_cast<volScalarField&>(
32 mesh_.thisDb().lookupObject<volScalarField>(
"alphaPorosity"))),
33 fvSource_(const_cast<volVectorField&>(
34 mesh_.thisDb().lookupObject<volVectorField>(
"fvSource"))),
35 fvOptions_(fv::options::New(
mesh)),
38 simple_(const_cast<fvMesh&>(
mesh)),
44 if (
allOptions.subDict(
"fvSource").toc().size() != 0)
57 mesh.time().timeName(),
62 dimensionedScalar(
"TRes", dimensionSet(0, 0, -1, 1, 0, 0, 0), 0.0),
63 zeroGradientFvPatchField<scalar>::typeName));
66 IOdictionary transportProperties(
68 "transportProperties",
69 mesh.time().constant(),
74 Pr_ = readScalar(transportProperties.lookup(
"Pr"));
75 Prt_ = readScalar(transportProperties.lookup(
"Prt"));
125 word divUScheme =
"div(phi,U)";
127 label isPC = options.getLabel(
"isPC");
131 divUScheme =
"div(pc)";
141 tmp<fvVectorMatrix>
tUEqn(
142 fvm::div(
phi_,
U_, divUScheme)
163 volScalarField
rAU(1.0 /
UEqn.A());
168 autoPtr<volVectorField>
HbyAPtr =
nullptr;
176 HbyAPtr.reset(
new volVectorField(
"HbyA",
U_));
181 surfaceScalarField
phiHbyA(
"phiHbyA", fvc::flux(
HbyA));
202 fvm::laplacian(
rAtU(),
p_)
217 volScalarField&
alphat =
const_cast<volScalarField&
>(
218 mesh_.thisDb().lookupObject<volScalarField>(
"alphat"));
220 volScalarField&
T =
const_cast<volScalarField&
>(
221 mesh_.thisDb().lookupObject<volScalarField>(
"T"));
257 U_.correctBoundaryConditions();
258 p_.correctBoundaryConditions();
261 volScalarField&
T =
const_cast<volScalarField&
>(
262 mesh_.thisDb().lookupObject<volScalarField>(
"T"));
263 T.correctBoundaryConditions();
tmp< volVectorField > DDt(const volVectorField &U) const
virtual void calcResiduals(const dictionary &options)
compute residual
volScalarField & alphaPorosity_
alpha porosity term
virtual void updateIntermediateVariables()
update any intermediate variables that are dependent on state variables and are used in calcResiduals
const fvMesh & mesh_
fvMesh
tmp< fvVectorMatrix > divDevReff(volVectorField &U)
divDev terms
virtual void correctBoundaryConditions()
update the boundary condition for all the states in the selected solver
addToRunTimeSelectionTable(DAFunction, DAFunctionForce, dictionary)
label hasFvSource_
whether to have fvSource term
virtual void calcFvSource(volVectorField &fvSource)
compute the FvSource term
volVectorField & fvSource_
fvSource term
#define normalizeResiduals(resName)
classType getOption(const word key) const
get an option from subDict and key
simpleControl simple_
simpleControl object which will be initialized in this class
label hasTField_
whether to include the temperature field
const dictionary & getAllOptions() const
return a reference of allOptions_ dictionary
const DAOption & daOption_
DAOption object.
#define setResidualClassMemberPhi(stateName)
#define setResidualClassMemberVector(stateName, stateUnit)
DAResidualSimpleFoam(const word modelType, const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex)
IOMRFZoneListDF & MRF_
Multiple Reference Frame.
defineTypeNameAndDebug(DAFunction, 0)
autoPtr< volScalarField > TResPtr_
tmp< fvVectorMatrix > tUEqn(fvm::ddt(U)+fvm::div(phi, U)+turbulencePtr_->divDevReff(U) - fvSource)
tmp< volScalarField > rAtU(rAU)
const dictionary & allOptions
void makeRelative(volVectorField &U) const
tmp< volScalarField > nu() const
get the nu field
volScalarField alphaEff("alphaEff", turbulencePtr_->nu()/Pr+alphat)
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF)
volScalarField rAU(1.0/UEqn.A())
void correctBoundaryVelocity(volVectorField &U) const
static label isFieldReadable(const fvMesh &mesh, const word fieldName, const word fieldType)
autoPtr< volVectorField > HbyAPtr
virtual void clear()
clear the members
DATurbulenceModel & daTurb_
DATurbulenceModel object.
surfaceScalarField phiRes_
#define setResidualClassMemberScalar(stateName, stateUnit)
fvScalarMatrix TEqn(fvm::ddt(T)+fvm::div(phi, T) - fvm::laplacian(alphaEff, T))
fv::options & fvOptions_
fvOptions term
#define normalizePhiResiduals(resName)
surfaceScalarField & phi_