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(),
84 U.boundaryField().size(),
90 if (!
U.boundaryField()[
patchi].assignable())
96 return tmp<surfaceScalarField>
103 U.mesh().time().name(),
116 template<
class BasePhaseModel>
124 U.boundaryField().size(),
136 isType<fixedValueFvPatchVectorField>(UPf)
137 &&
gSum(UPf) == vector::zero
141 || isA<noSlipFvPatchVectorField>(UPf)
142 || isA<slipFvPatchVectorField>(UPf)
143 || isA<partialSlipFvPatchVectorField>(UPf)
150 return alphaPhiTypes;
156 template<
class BasePhaseModel>
160 const word& phaseName,
161 const bool referencePhase,
165 BasePhaseModel(fluid, phaseName, referencePhase, index),
236 if (fluid.
mesh().
dynamic() || this->fluid().MRF().size())
258 template<
class BasePhaseModel>
265 template<
class BasePhaseModel>
276 template<
class BasePhaseModel>
283 template<
class BasePhaseModel>
286 BasePhaseModel::correctKinematics();
290 K_.ref() = 0.5*
magSqr(this->
U());
295 template<
class BasePhaseModel>
298 BasePhaseModel::predictMomentumTransport();
299 momentumTransport_->predict();
303 template<
class BasePhaseModel>
306 BasePhaseModel::correctMomentumTransport();
307 momentumTransport_->correct();
311 template<
class BasePhaseModel>
330 template<
class BasePhaseModel>
337 template<
class BasePhaseModel>
348 +
fvm::SuSp(-this->continuityError(), U_)
350 + momentumTransport_->divDevTau(U_)
355 template<
class BasePhaseModel>
369 + momentumTransport_->divDevTau(U_)
374 template<
class BasePhaseModel>
382 template<
class BasePhaseModel>
390 template<
class BasePhaseModel>
398 template<
class BasePhaseModel>
406 template<
class BasePhaseModel>
414 template<
class BasePhaseModel>
422 template<
class BasePhaseModel>
430 template<
class BasePhaseModel>
441 <<
"Uf has not been allocated."
449 template<
class BasePhaseModel>
460 <<
"Uf has not been allocated."
468 template<
class BasePhaseModel>
476 template<
class BasePhaseModel>
484 template<
class BasePhaseModel>
492 template<
class BasePhaseModel>
500 template<
class BasePhaseModel>
508 template<
class BasePhaseModel>
516 template<
class BasePhaseModel>
525 + this->fluid().MRF().DDt(U_);
529 template<
class BasePhaseModel>
537 template<
class BasePhaseModel>
541 return continuityError_;
545 template<
class BasePhaseModel>
563 template<
class BasePhaseModel>
571 template<
class BasePhaseModel>
587 template<
class BasePhaseModel>
591 return momentumTransport_->k();
595 template<
class BasePhaseModel>
599 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)
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)