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")),
63 alphaMin_(this->coeffDict().
template lookup<scalar>(
"alphaMin")),
64 rhoMin_(this->coeffDict().
template lookup<scalar>(
"rhoMin"))
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(),
220 alphaEqn +=
fvm::div(phiGByA(), alpha_);
232 cloudName +
":phiCorrect",
244 this->owner().db().time().
timeName(),
264 phiCorrect_.ref() -= phiGByA();
267 forAll(phiCorrect_(), facei)
270 const scalar phiCurr =
phi[facei];
271 scalar& phiCorr = phiCorrect_.ref()[facei];
275 if (phiCurr*phiCorr < 0)
281 else if (phiCorr > 0)
283 phiCorr =
max(phiCorr - phiCurr, 0);
287 phiCorr =
min(phiCorr - phiCurr, 0);
293 phiCorrect_.ref() += phiGByA();
300 cloudName +
":uCorrect",
303 uCorrect_->correctBoundaryConditions();
320 template<
class CloudType>
330 const label celli = p.cell();
331 const label facei = p.tetFace();
334 const vector U = uCorrect_()[celli];
338 const scalar nMag =
mag(nHat);
346 phi = phiCorrect_()[facei];
351 phiCorrect_().boundaryField()[
patchi]
358 const scalar t = p.coordinates()[0];
362 return U + (1.0 - t)*nHat*(phi/nMag - (U & nHat));
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
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.
const surfaceVectorField & Sf() const
Return cell face area vectors.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
const fvSchemes & schemes() const
Return the fvSchemes.
A list of keyword definitions, which are a keyword followed by any number of values (e...
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > linearInterpolate(const GeometricField< Type, fvPatchField, volMesh > &vf)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
const dimensionSet dimPressure
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.
void setFluxRequired(const word &name) const
const Internal::FieldType & primitiveField() const
Return a const-reference to the internal field.
const dimensionSet dimless
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
virtual const pointField & points() const
Return raw points.
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
stressControl lookup("compactNormalStress") >> compactNormalStress
Implicit(const dictionary &dict, CloudType &owner)
Construct from components.
A class for handling words, derived from string.
const dimensionSet dimDensity
Calculate the matrix for the first temporal derivative.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
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.
virtual const faceList & faces() const
Return raw faces.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
volScalarField rhoc(IOobject(rhocValue.name(), runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), mesh, rhocValue)
Internal::FieldType & primitiveFieldRef()
Return a reference to the internal field.
SolverPerformance< Type > solve(const dictionary &)
Solve segregated or coupled returning the solution statistics.
const dimensionSet dimVelocity
word name(const complex &)
Return a string representation of a complex.
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.
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)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Mesh data needed to do the Finite Volume discretisation.
void correctBoundaryConditions()
Correct boundary field.
dimensioned< scalar > mag(const dimensioned< Type > &)
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > flux() const
Return the face-flux field from the matrix.
const word cloudName(propsDict.lookup("cloudName"))
virtual vector velocityCorrection(typename CloudType::parcelType &p, const scalar deltaT) const
Calculate the velocity correction.
A class for managing temporary objects.
const dimensionedVector & g
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Templated base class for dsmc cloud.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.