30#include "twoPhaseSystem.H"
52 mixedFvPatchScalarField(
p, iF),
53 restitutionCoefficient_(
"restitutionCoefficient",
dimless,
Zero),
54 specularityCoefficient_(
"specularityCoefficient",
dimless,
Zero)
67 mixedFvPatchScalarField(ptf,
p, iF, mapper),
68 restitutionCoefficient_(ptf.restitutionCoefficient_),
69 specularityCoefficient_(ptf.specularityCoefficient_)
82 mixedFvPatchScalarField(
p, iF),
83 restitutionCoefficient_(
"restitutionCoefficient",
dimless,
dict),
84 specularityCoefficient_(
"specularityCoefficient",
dimless,
dict)
88 (restitutionCoefficient_.
value() < 0)
89 || (restitutionCoefficient_.
value() > 1)
93 <<
"The restitution coefficient has to be between 0 and 1"
99 (specularityCoefficient_.
value() < 0)
100 || (specularityCoefficient_.
value() > 1)
104 <<
"The specularity coefficient has to be between 0 and 1"
105 << abort(FatalError);
118 mixedFvPatchScalarField(ptf),
119 restitutionCoefficient_(ptf.restitutionCoefficient_),
120 specularityCoefficient_(ptf.specularityCoefficient_)
131 mixedFvPatchScalarField(ptf, iF),
132 restitutionCoefficient_(ptf.restitutionCoefficient_),
133 specularityCoefficient_(ptf.specularityCoefficient_)
144 mixedFvPatchScalarField::autoMap(m);
154 mixedFvPatchScalarField::rmap(ptf, addr);
166 const twoPhaseSystem&
fluid = db().lookupObject<twoPhaseSystem>
171 const phaseModel& phased
173 fluid.phase1().name() == internalField().group()
181 patch().lookupPatchField<volScalarField>
183 phased.volScalarField::name()
189 patch().lookupPatchField<volVectorField>
197 patch().lookupPatchField<volScalarField>
205 patch().lookupPatchField<volScalarField>
219 .lookupObject<IOdictionary>
224 .subDict(
"kineticTheoryCoeffs")
228 if (restitutionCoefficient_.value() != 1.0)
232 *specularityCoefficient_.value()
234 /(scalar(1) -
sqr(restitutionCoefficient_.value()));
236 this->refGrad() = 0.0;
243 *(scalar(1) -
sqr(restitutionCoefficient_.value()))
248 this->valueFraction() = c/(c + patch().deltaCoeffs());
255 this->refValue() = 0.0;
260 *specularityCoefficient_.value()
267 this->valueFraction() = 0;
270 mixedFvPatchScalarField::updateCoeffs();
280 os.writeEntry(
"restitutionCoefficient", restitutionCoefficient_);
281 os.writeEntry(
"specularityCoefficient", specularityCoefficient_);
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
@ MUST_READ
Reading required.
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
Robin condition for the particulate granular temperature.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual void write(Ostream &) const
Write.
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual void updateCoeffs()
Update the coefficients.
JohnsonJacksonParticleThetaFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const Type & value() const noexcept
Return const reference to value.
A FieldMapper for finite-volume patch fields.
virtual void write(Ostream &) const
Write.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Class which solves the volume fraction equations for two phases.
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
Define a concrete fvPatchField type and add to run-time tables Example, (fvPatchScalarField,...
constexpr scalar pi(M_PI)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
const dimensionSet dimless
Dimensionless.
dimensionedScalar pos0(const dimensionedScalar &ds)
List< label > labelList
A List of labels.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar sqrt(const dimensionedScalar &ds)
static constexpr const zero Zero
Global zero (0).
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
fvPatchField< vector > fvPatchVectorField
fvPatchField< scalar > fvPatchScalarField
dimensionedScalar alphaMax("alphaMax", dimless/dimTime, laminarTransport)