50 <<
"face areas already exist"
54 SfPtr_ = std::make_unique<slicedSurfaceVectorField>
84 <<
"mag face areas already exist"
91 magSfPtr_ = std::make_unique<surfaceScalarField>
117 <<
"cell centres already exist"
123 CPtr_ = std::make_unique<slicedVolVectorField>
154 <<
"face centres already exist"
158 CfPtr_ = std::make_unique<slicedSurfaceVectorField>
184 <<
"Constructing from primitiveMesh::cellVolumes()" <<
endl;
186 VPtr_ = std::make_unique<SlicedDimensionedField<scalar, volMesh>>
212 <<
"V0 is not available"
225 <<
"V0 is not available"
239 V00Ptr_ = std::make_unique<DimensionedField<scalar, volMesh>>
264 if (!steady() && moving() && time().subCycling())
266 const TimeState& ts = time();
267 const TimeState& ts0 = time().prevTimeState();
271 ts.value() - (ts0.value() - ts0.deltaTValue())
274 if (tFrac < (1 - SMALL))
276 return V0() + tFrac*(V() - V0());
286 if (!steady() && moving() && time().subCycling())
289 const TimeState& ts0 = time().prevTimeState();
293 (ts.value() - ts.deltaTValue())
294 - (ts0.value() - ts0.deltaTValue())
299 return V0() + t0Frac*(
V() - V0());
345 (this->Sf() / this->magSf())
348 tunitVectors.ref().oriented() = this->
Sf().oriented();
394 auto&
delta = tdelta.ref();
399 const labelUList& neighbour = this->neighbour();
403 delta[facei] =
C[neighbour[facei]] -
C[owner[facei]];
406 auto& deltabf =
delta.boundaryFieldRef();
422 <<
"mesh flux field does not exist, is the mesh actually moving?"
428 if (!time().subCycling() && phiPtr_->timeIndex() != time().
timeIndex())
444 phiref.
ref(phiPtr_.get());
static const Foam::dimensionedScalar C("", Foam::dimTemperature, 234.5)
DimensionedField< scalar, volMesh > Internal
@ NO_REGISTER
Do not request registration (bool: false).
@ REGISTER
Request registration (bool: true).
@ NO_READ
Nothing to be read.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
@ AUTO_WRITE
Automatically write from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
The time value with time-stepping information, user-defined remapping, etc.
scalar deltaTValue() const noexcept
Return time step value.
const Type & value() const noexcept
Return const reference to value.
std::unique_ptr< slicedSurfaceVectorField > SfPtr_
Face area vectors.
const volVectorField & C() const
Return cell centres as volVectorField.
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
std::unique_ptr< surfaceScalarField > magSfPtr_
Mag face area vectors.
DimensionedField< scalar, volMesh > & setV0()
Return old-time cell volumes.
const DimensionedField< scalar, volMesh > & V00() const
Return old-old-time cell volumes.
const Time & time() const
Return the top-level database.
const surfaceScalarField & phi() const
Return cell face motion fluxes.
std::unique_ptr< DimensionedField< scalar, volMesh > > V00Ptr_
Cell volumes old-old time level.
std::unique_ptr< DimensionedField< scalar, volMesh > > V0Ptr_
Cell volumes old time level.
const labelUList & owner() const
Internal face owner. Note bypassing virtual mechanism so.
const surfaceVectorField & Cf() const
Return face centres as surfaceVectorField.
tmp< surfaceVectorField > unitSf() const
Return cell face unit normals.
const DimensionedField< scalar, volMesh > & V0() const
Return old-time cell volumes.
const labelUList & neighbour() const
Internal face neighbour.
const surfaceVectorField & Sf() const
Return cell face area vectors.
std::unique_ptr< slicedVolVectorField > CPtr_
Cell centres.
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
tmp< DimensionedField< scalar, volMesh > > Vsc0() const
Return sub-cycle old-time cell volumes.
std::unique_ptr< slicedSurfaceVectorField > CfPtr_
Face centres.
refPtr< surfaceScalarField > setPhi()
Return cell face motion fluxes, if any (can be nullptr).
tmp< surfaceVectorField > delta() const
Return face deltas as surfaceVectorField.
tmp< DimensionedField< scalar, volMesh > > Vsc() const
Return sub-cycle cell volumes.
std::unique_ptr< surfaceScalarField > phiPtr_
Face motion fluxes.
std::unique_ptr< SlicedDimensionedField< scalar, volMesh > > VPtr_
Cell volumes.
bool moving() const noexcept
Is mesh moving.
const fileName & pointsInstance() const
Return the current instance directory for points.
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh").
const vectorField & faceCentres() const
const scalarField & cellVolumes() const
const vectorField & cellCentres() const
const vectorField & faceAreas() const
A class for managing references or pointers (no reference counting).
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
bool steady() const noexcept
True if default ddt scheme is steady-state.
A class for managing temporary objects.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define DebugInFunction
Report an information message using Foam::Info.
const expr V(m.psi().mesh().V())
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
const dimensionSet dimless
Dimensionless.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
const dimensionSet dimArea(sqr(dimLength))
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
errorManip< error > abort(error &err)
static constexpr const zero Zero
Global zero (0).
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
const dimensionSet dimVolume(pow3(dimLength))
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
UList< label > labelUList
A UList of labels.
#define forAll(list, i)
Loop across all elements in list.