37 template<
class CloudType>
49 this->owner().
name() +
":alpha",
50 this->owner().db().time().
timeName(),
57 zeroGradientFvPatchScalarField::typeName
61 applyLimiting_(this->coeffDict().
lookup(
"applyLimiting")),
62 applyGravity_(this->coeffDict().
lookup(
"applyGravity")),
66 alpha_ = this->owner().theta();
71 template<
class CloudType>
79 phiCorrect_(cm.phiCorrect_()),
80 uCorrect_(cm.uCorrect_()),
81 applyLimiting_(cm.applyLimiting_),
82 applyGravity_(cm.applyGravity_),
83 alphaMin_(cm.alphaMin_),
92 template<
class CloudType>
99 template<
class CloudType>
116 cloudName +
":rhoAverage" 121 cloudName +
":uAverage" 126 cloudName +
":uSqrAverage" 135 alpha_ =
max(this->owner().theta(), alphaMin_);
136 alpha_.correctBoundaryConditions();
144 this->owner().db().time().
timeName(),
164 cloudName +
":tauPrime",
165 this->owner().db().time().
timeName(),
176 this->particleStressModel_->dTaudTheta
178 alpha_.primitiveField(),
223 alphaEqn +=
fvm::div(phiGByA(), alpha_);
237 cloudName +
":phiCorrect",
250 this->owner().db().time().
timeName(),
270 phiCorrect_.ref() -= phiGByA();
273 forAll(phiCorrect_(), facei)
276 const scalar phiCurr =
phi[facei];
277 scalar& phiCorr = phiCorrect_.ref()[facei];
281 if (phiCurr*phiCorr < 0)
287 else if (phiCorr > 0)
289 phiCorr =
max(phiCorr - phiCurr, 0);
293 phiCorr =
min(phiCorr - phiCurr, 0);
299 phiCorrect_.ref() += phiGByA();
308 cloudName +
":uCorrect",
313 uCorrect_->correctBoundaryConditions();
330 template<
class CloudType>
340 const label celli = p.cell();
341 const label facei = p.tetFace();
344 tetIs.tet(mesh).barycentric(p.position(), tetCoordinates);
347 const vector U = uCorrect_()[celli];
351 const scalar nMag =
mag(nHat);
359 phi = phiCorrect_()[facei];
364 phiCorrect_().boundaryField()[
patchi]
371 const scalar t = tetCoordinates[0];
375 return U + (1.0 - t)*nHat*(phi/nMag - (U & nHat));
Implicit model for applying an inter-particle stress to the particles.
This boundary condition supplies a fixed value constraint, and is the base class for a number of othe...
#define forAll(list, i)
Loop across all elements in list.
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.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const surfaceVectorField & Sf() const
Return cell face area vectors.
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
void setFluxRequired(const word &name) const
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > linearInterpolate(const GeometricField< Type, fvPatchField, volMesh > &vf)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Reconstruct volField from a face flux field.
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > flux() const
Return the face-flux field from the matrix.
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.
const word cloudName(propsDict.lookup("cloudName"))
const Internal::FieldType & primitiveField() const
Return a const-reference to the internal field.
tmp< surfaceScalarField > interpolate(const RhoType &rho)
GeometricField< vector, fvPatchField, volMesh > volVectorField
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
virtual const pointField & points() const
Return raw points.
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
void clear() const
If object pointer points to valid object:
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
stressControl lookup("compactNormalStress") >> compactNormalStress
Implicit(const dictionary &dict, CloudType &owner)
Construct from components.
A class for handling words, derived from string.
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.
Storage and named access for the indices of a tet which is part of the decomposition of a cell...
const dimensionSet dimPressure
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Internal::FieldType & primitiveFieldRef()
Return a reference to the internal field.
SolverPerformance< Type > solve(const dictionary &)
Solve segregated or coupled returning the solution statistics.
const dimensionedVector & g
virtual vector velocityCorrection(typename CloudType::parcelType &p, const scalar deltaT) const
Calculate the velocity correction.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
word name(const complex &)
Return a string representation of a complex.
const dimensionSet dimDensity
This boundary condition applies a zero-gradient condition from the patch internal field onto the patc...
Calculate the matrix for the divergence of the given field and flux.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> reconstruct(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
Mesh data needed to do the Finite Volume discretisation.
void correctBoundaryConditions()
Correct boundary field.
dimensioned< scalar > mag(const dimensioned< Type > &)
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
virtual const faceList & faces() const
Return raw faces.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Templated base class for dsmc cloud.
const dimensionSet dimVelocity