39 template<
class CloudType>
51 this->owner().
name() +
":alpha",
52 this->owner().db().time().
timeName(),
63 applyLimiting_(this->coeffDict().
lookup(
"applyLimiting")),
64 applyGravity_(this->coeffDict().
lookup(
"applyGravity")),
65 alphaMin_(this->coeffDict().getScalar(
"alphaMin")),
66 rhoMin_(this->coeffDict().getScalar(
"rhoMin"))
73 template<
class CloudType>
81 phiCorrect_(cm.phiCorrect_()),
82 uCorrect_(cm.uCorrect_()),
83 applyLimiting_(cm.applyLimiting_),
84 applyGravity_(cm.applyGravity_),
85 alphaMin_(cm.alphaMin_),
94 template<
class CloudType>
101 template<
class CloudType>
131 mesh.setFluxRequired(alpha_.name());
137 alpha_ =
max(this->owner().theta(), alphaMin_);
138 alpha_.correctBoundaryConditions();
146 this->owner().db().time().
timeName(),
156 rho.correctBoundaryConditions();
167 this->owner().db().time().
timeName(),
177 tauPrime.primitiveFieldRef() =
178 this->particleStressModel_->dTaudTheta
180 alpha_.primitiveField(),
181 rho.primitiveField(),
185 tauPrime.correctBoundaryConditions();
225 alphaEqn +=
fvm::div(phiGByA(), alpha_);
252 this->owner().db().time().
timeName(),
262 U.correctBoundaryConditions();
272 phiCorrect_.ref() -= phiGByA();
275 forAll(phiCorrect_(), facei)
278 const scalar phiCurr =
phi[facei];
279 scalar& phiCorr = phiCorrect_.ref()[facei];
283 if (phiCurr*phiCorr < 0)
289 else if (phiCorr > 0)
291 phiCorr =
max(phiCorr - phiCurr, 0);
295 phiCorr =
min(phiCorr - phiCurr, 0);
301 phiCorrect_.ref() += phiGByA();
306 uCorrect_ = tmp<volVectorField>
315 uCorrect_->correctBoundaryConditions();
332 template<
class CloudType>
342 const label celli =
p.cell();
343 const label facei =
p.tetFace();
346 const vector U = uCorrect_()[celli];
350 const scalar nMag =
mag(nHat);
355 const label patchi =
mesh.boundaryMesh().whichPatch(facei);
358 phi = phiCorrect_()[facei];
363 phiCorrect_().boundaryField()[patchi]
365 mesh.boundaryMesh()[patchi].whichFace(facei)
370 const scalar t =
p.coordinates()[0];
374 return U + (1.0 - t)*nHat*(
phi/nMag - (
U & nHat));
static const word & zeroGradientType() noexcept
The type name for zeroGradient patch fields.
Implicit model for applying an inter-particle stress to the particles.
virtual tmp< Field< Type > > primitiveField() const =0
Return an internal field of the average.
virtual void cacheFields(const bool store)
Calculate the inter particles stresses.
const GeometricField< Type, PatchField, GeoMesh > & oldTime() const
Return old time field.
const word zeroGradientType
A zeroGradient patch field type.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > linearInterpolate(const GeometricField< Type, fvPatchField, volMesh > &vf)
const word & name() const noexcept
Return the object name.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Reconstruct volField from a face flux field.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Base class for packing models.
virtual ~Implicit()
Destructor.
Calculate the matrix for the laplacian of the field.
Template invariant parts for fvPatchField.
Ignore writing from objectRegistry::writeObject()
const dimensionSet dimless
Dimensionless.
Lookup type of boundary radiation properties.
GeometricField< vector, fvPatchField, volMesh > volVectorField
const CloudType & owner() const
Return const access to the owner cloud.
#define forAll(list, i)
Loop across all elements in list.
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
Implicit(const dictionary &dict, CloudType &owner)
Construct from components.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
const word cloudName(propsDict.get< word >("cloud"))
A class for handling words, derived from Foam::string.
const Time & time() const noexcept
Return time registry.
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
Calculate the matrix for the first temporal derivative.
const objectRegistry & db() const noexcept
Return the local objectRegistry.
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.
const dimensionSet dimPressure
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
const uniformDimensionedVectorField & g
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
virtual void cacheFields(const bool store)
Cache dependent sub-model fields.
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
const dimensionSet dimDensity
Calculate the matrix for the divergence of the given field and flux.
const fvMesh & mesh() const
Return reference to the mesh.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> reconstruct(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Mesh data needed to do the Finite Volume discretisation.
virtual vector velocityCorrection(typename CloudType::parcelType &p, const scalar deltaT) const
Calculate the velocity correction.
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Defines the attributes of an object for which implicit objectRegistry management is supported...
Templated base class for dsmc cloud.
dimensionedScalar deltaT() const
Return time step.
static constexpr const zero Zero
Global zero (0)
const dimensionSet dimVelocity