54 wordList bTypes(U.boundaryField().size());
58 const fvPatchField<vector>& pf = U.boundaryField()[patchI];
59 if (isA<fixedValueFvPatchVectorField>(pf))
61 bTypes[patchI] = fixedValueFvPatchScalarField::typeName;
65 bTypes[patchI] = zeroGradientFvPatchScalarField::typeName;
83 return tmp<volScalarField>
90 mesh_.time().timeName(),
102 const icoModel& model = mesh_.lookupObject<icoModel>
107 return model.nuEff();
111 const cmpModel& model = mesh_.lookupObject<cmpModel>
116 return model.muEff();
120 return tmp<volScalarField>
127 mesh_.time().timeName(),
142 Foam::scalarTransport::scalarTransport
147 const bool loadFromFiles
151 mesh_(refCast<const fvMesh>(obr)),
157 resetOnStartUp_(
false),
166 mesh_.time().timeName(),
207 dict.
lookup(
"resetOnStartUp") >> resetOnStartUp_;
211 dict.
lookup(
"autoSchemes") >> autoSchemes_;
213 fvOptions_.reset(dict.
subDict(
"fvOptions"));
228 word schemeVar = T_.name();
234 word divScheme(
"div(phi," + schemeVar +
")");
235 word laplacianScheme(
"laplacian(" + DT.name() +
"," + schemeVar +
")");
238 scalar relaxCoeff = 0.0;
239 if (mesh_.relaxEquation(schemeVar))
241 relaxCoeff = mesh_.equationRelaxationFactor(schemeVar);
250 for (
label i = 0; i <= nCorr_; i++)
261 TEqn.
relax(relaxCoeff);
263 fvOptions_.constrain(TEqn);
265 TEqn.
solve(mesh_.solverDict(schemeVar));
271 for (
label i = 0; i <= nCorr_; i++)
282 TEqn.
relax(relaxCoeff);
284 fvOptions_.constrain(TEqn);
286 TEqn.
solve(mesh_.solverDict(schemeVar));
292 <<
"Incompatible dimensions for phi: " << phi.
dimensions() <<
nl tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
virtual ~scalarTransport()
Destructor.
Calculate the matrix for implicit and explicit sources.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
fvScalarMatrix TEqn(fvm::ddt(T)+fvm::div(phi, T)-fvm::laplacian(alphaEff, T)==radiation->ST(rhoCpRef, T)+fvOptions(T))
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Calculate the matrix for the divergence of the given field and flux.
virtual void execute()
Execute, currently does nothing.
virtual void write()
Calculate the scalarTransport and write.
Calulate the matrix for the first temporal derivative.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
A list of keyword definitions, which are a keyword followed by any number of values (e...
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
ThermalDiffusivity< CompressibleTurbulenceModel< fluidThermo > > turbulenceModel
virtual void timeSet()
Called when time was set at the end of the Time::operator++.
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
GeometricField< scalar, fvPatchField, volMesh > volScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
void relax(const scalar alpha)
Relax matrix (for steady-state solution).
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const dimensionSet & dimensions() const
Return dimensions.
solverPerformance solve(const dictionary &)
Solve segregated or coupled returning the solution statistics.
virtual void end()
Execute at the final time-loop, currently does nothing.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
GeometricField< vector, fvPatchField, volMesh > volVectorField
Calculate the matrix for the laplacian of the field.
Calculate the divergence of the given field.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
List< word > wordList
A List of words.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
const dimensionSet dimVolume(pow3(dimLength))
Registry of regIOobjects.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
virtual void read(const dictionary &)
Read the scalarTransport data.
static const word propertiesName
Default name of the turbulence properties dictionary.
bool read(const char *, int32_t &)
A scalar instance of fvMatrix.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
IncompressibleTurbulenceModel< transportModel > turbulenceModel
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A class for managing temporary objects.
defineTypeNameAndDebug(combustionModel, 0)