44 template<
class BasePhaseModel>
48 word phiName(IOobject::groupName(
"phi", this->
name()));
50 typeIOobject<surfaceScalarField> phiHeader
53 U.mesh().time().name(),
58 if (phiHeader.headerOk())
60 Info<<
"Reading face flux field " << phiName <<
endl;
62 return tmp<surfaceScalarField>
69 U.mesh().time().name(),
85 U.boundaryField().size(),
91 if (!
U.boundaryField()[
patchi].assignable())
97 return tmp<surfaceScalarField>
104 U.mesh().time().name(),
117 template<
class BasePhaseModel>
125 U.boundaryField().size(),
137 isType<fixedValueFvPatchVectorField>(UPf)
138 &&
gSum(UPf) == vector::zero
142 || isA<noSlipFvPatchVectorField>(UPf)
143 || isA<slipFvPatchVectorField>(UPf)
144 || isA<partialSlipFvPatchVectorField>(UPf)
151 return alphaPhiTypes;
157 template<
class BasePhaseModel>
161 const word& phaseName,
162 const bool referencePhase,
166 BasePhaseModel(fluid, phaseName, referencePhase, index),
238 if (fluid.
mesh().
dynamic() || this->fluid().MRF().size())
260 template<
class BasePhaseModel>
267 template<
class BasePhaseModel>
278 template<
class BasePhaseModel>
285 template<
class BasePhaseModel>
288 BasePhaseModel::correctKinematics();
292 K_.ref() = 0.5*
magSqr(this->
U());
297 template<
class BasePhaseModel>
300 BasePhaseModel::predictMomentumTransport();
301 momentumTransport_->predict();
305 template<
class BasePhaseModel>
308 BasePhaseModel::correctMomentumTransport();
309 momentumTransport_->correct();
313 template<
class BasePhaseModel>
332 template<
class BasePhaseModel>
339 template<
class BasePhaseModel>
350 +
fvm::SuSp(-this->continuityError(), U_)
352 + momentumTransport_->divDevTau(U_)
357 template<
class BasePhaseModel>
371 + momentumTransport_->divDevTau(U_)
376 template<
class BasePhaseModel>
384 template<
class BasePhaseModel>
392 template<
class BasePhaseModel>
400 template<
class BasePhaseModel>
408 template<
class BasePhaseModel>
416 template<
class BasePhaseModel>
424 template<
class BasePhaseModel>
432 template<
class BasePhaseModel>
443 <<
"Uf has not been allocated."
451 template<
class BasePhaseModel>
462 <<
"Uf has not been allocated."
470 template<
class BasePhaseModel>
478 template<
class BasePhaseModel>
486 template<
class BasePhaseModel>
494 template<
class BasePhaseModel>
502 template<
class BasePhaseModel>
510 template<
class BasePhaseModel>
518 template<
class BasePhaseModel>
527 + this->fluid().MRF().DDt(U_);
531 template<
class BasePhaseModel>
539 template<
class BasePhaseModel>
543 return continuityError_;
547 template<
class BasePhaseModel>
565 template<
class BasePhaseModel>
573 template<
class BasePhaseModel>
589 template<
class BasePhaseModel>
593 return momentumTransport_->k();
597 template<
class BasePhaseModel>
601 return momentumTransport_->pPrimef();
#define forAll(list, i)
Loop across all elements in list.
Generic GeometricField class.
static const GeometricField< Type, GeoMesh, PrimitiveField > & null()
Return a null geometric field.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
writeOption & writeOpt() const
static word groupName(Name name, const word &group)
Class which represents a moving fluid phase. Holds the velocity, fluxes and momentumTransport model a...
virtual void correctUf()
Correct the face velocity for moving meshes.
virtual void correctKinematics()
Correct the kinematics.
virtual tmp< fvVectorMatrix > UEqn()
Return the momentum equation.
volVectorField U_
Velocity field.
virtual void correct()
Correct the phase properties other than the thermo.
virtual tmp< volScalarField > k() const
Return the turbulent kinetic energy.
virtual tmp< fvVectorMatrix > DUDt() const
Return the substantive acceleration matrix.
virtual ~MovingPhaseModel()
Destructor.
virtual tmp< volVectorField > U() const
Return the velocity.
virtual void correctMomentumTransport()
Correct the momentumTransport.
virtual surfaceScalarField & alphaRhoPhiRef()
Access the mass flux of the phase.
virtual const autoPtr< volScalarField > & divU() const
Return the phase dilatation rate (d(alpha)/dt + div(alpha*phi))
virtual surfaceScalarField & phiRef()
Access the volumetric flux.
virtual tmp< surfaceScalarField > alphaPhi() const
Return the volumetric flux of the phase.
virtual tmp< volScalarField > K() const
Return the phase kinetic energy.
surfaceScalarField phi_
Flux.
MovingPhaseModel(const phaseSystem &fluid, const word &phaseName, const bool referencePhase, const label index)
virtual tmp< surfaceScalarField > pPrimef() const
Return the face-phase-pressure'.
virtual const autoPtr< surfaceVectorField > & Uf() const
Return the face velocity.
virtual surfaceVectorField & UfRef()
Access the face velocity.
virtual surfaceScalarField & alphaPhiRef()
Access the volumetric flux of the phase.
virtual tmp< surfaceScalarField > alphaRhoPhi() const
Return the mass flux of the phase.
virtual tmp< surfaceScalarField > phi() const
Return the volumetric flux.
virtual tmp< fvVectorMatrix > UfEqn()
Return the momentum equation for the face-based algorithm.
virtual volVectorField & URef()
Access the velocity.
virtual bool stationary() const
Return whether the phase is stationary.
virtual void predictMomentumTransport()
Predict the momentumTransport.
virtual tmp< fvVectorMatrix > UgradU() const
Return the velocity transport matrix.
virtual tmp< volScalarField > continuityError() const
Return the continuity error.
virtual void correctContinuityError(const volScalarField &source)
Correct the continuity error.
autoPtr< surfaceVectorField > Uf_
Face velocity field.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Dimension set for the base types.
const word & name() const
Return const reference to name.
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
const surfaceVectorField & Sf() const
Return cell face area vectors.
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
bool dynamic() const
Is this mesh dynamic?
Abstract base class for momentum transport models (RAS, LES and laminar).
Class to represent a system of phases.
const fvMesh & mesh() const
Return the mesh.
A class for managing temporary objects.
T * ptr() const
Return tmp pointer for reuse.
A class for handling words, derived from string.
const Foam::MRFZones & MRF(Foam::MRFZones::New(mesh))
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Calculate the first temporal derivative.
Calculate the divergence of the given field.
Calculate the face-flux of the given field.
Calculate the matrix for the first temporal derivative.
Calculate the matrix for the divergence of the given field and flux.
Calculate the matrix for implicit and explicit sources.
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
void correct(const RdeltaTType &rDeltaT, const RhoType &rho, volScalarField &psi, const surfaceScalarField &phiCorr, const SpType &Sp)
const dimensionSet velocity
const dimensionSet volumetricFlux
tmp< VolField< Type > > DDt(const surfaceScalarField &phi, const VolField< Type > &psi)
tmp< SurfaceField< typename innerProduct< vector, Type >::type > > flux(const VolField< Type > &vf)
Return the face-flux field obtained from the given volVectorField.
static tmp< SurfaceField< Type > > interpolate(const VolField< Type > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
tmp< VolField< Type > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
tmp< VolField< Type > > div(const SurfaceField< Type > &ssf)
tmp< surfaceScalarField > absolute(const tmp< surfaceScalarField > &tphi, const volVectorField &U)
Return the given relative flux in absolute form.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const VolField< Type > &vf, const word &name)
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const VolField< Type > &)
tmp< fvMatrix< Type > > SuSp(const volScalarField::Internal &, const VolField< Type > &)
tmp< fvMatrix< Type > > ddt(const VolField< Type > &vf)
errorManipArg< error, int > exit(error &err, const int errNo=1)
List< word > wordList
A List of words.
VolField< vector > volVectorField
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
SurfaceField< scalar > surfaceScalarField
Type gSum(const UList< Type > &f, const label comm)
const dimensionSet & dimTime
VolField< scalar > volScalarField
const dimensionSet & dimDensity
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
Ostream & indentOrNl(Ostream &os)
Indent stream or add newline if indent level == 0.
SurfaceField< vector > surfaceVectorField
tmp< DimensionedField< scalar, GeoMesh, Field > > magSqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
tmp< DimensionedField< TypeR, GeoMesh, Field > > New(const tmp< DimensionedField< TypeR, GeoMesh, Field >> &tdf1, const word &name, const dimensionSet &dimensions)
fvPatchField< vector > fvPatchVectorField
faceListList boundary(nPatches)