30#include "twoPhaseSystem.H"
49 const DimensionedField<scalar, volMesh>& iF
52 mixedFvPatchScalarField(
p, iF),
53 restitutionCoefficient_(
"restitutionCoefficient",
dimless, Zero),
54 specularityCoefficient_(
"specularityCoefficient",
dimless, Zero)
61 const JohnsonJacksonParticleThetaFvPatchScalarField& ptf,
63 const DimensionedField<scalar, volMesh>& iF,
64 const fvPatchFieldMapper& mapper
67 mixedFvPatchScalarField(ptf,
p, iF, mapper),
68 restitutionCoefficient_(ptf.restitutionCoefficient_),
69 specularityCoefficient_(ptf.specularityCoefficient_)
78 const DimensionedField<scalar, volMesh>& iF,
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);
108 this->readValueEntry(
dict, IOobjectOption::MUST_READ);
115 const JohnsonJacksonParticleThetaFvPatchScalarField& ptf
118 mixedFvPatchScalarField(ptf),
119 restitutionCoefficient_(ptf.restitutionCoefficient_),
120 specularityCoefficient_(ptf.specularityCoefficient_)
127 const JohnsonJacksonParticleThetaFvPatchScalarField& ptf,
128 const DimensionedField<scalar, volMesh>& iF
131 mixedFvPatchScalarField(ptf, iF),
132 restitutionCoefficient_(ptf.restitutionCoefficient_),
133 specularityCoefficient_(ptf.specularityCoefficient_)
141 const fvPatchFieldMapper& m
144 mixedFvPatchScalarField::autoMap(m);
154 mixedFvPatchScalarField::rmap(ptf, addr);
182 phased.volScalarField::name()
211 .lookupObject<IOdictionary>
216 .subDict(
"kineticTheoryCoeffs")
220 if (restitutionCoefficient_.value() != 1.0)
224 *specularityCoefficient_.value()
226 /(scalar(1) -
sqr(restitutionCoefficient_.value()));
228 this->refGrad() = 0.0;
235 *(scalar(1) -
sqr(restitutionCoefficient_.value()))
240 this->valueFraction() =
c/(
c +
patch().deltaCoeffs());
247 this->refValue() = 0.0;
252 *specularityCoefficient_.value()
259 this->valueFraction() = 0.0;
262 mixedFvPatchScalarField::updateCoeffs();
272 os.
writeEntry(
"restitutionCoefficient", restitutionCoefficient_);
273 os.
writeEntry(
"specularityCoefficient", specularityCoefficient_);
Macros for easy insertion into run-time selection tables.
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,...
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
const Type & value() const noexcept
Return const reference to value.
virtual void write(Ostream &) const
Write.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
const word & name() const
Class which solves the volume fraction equations for two phases.
const phaseModel & phase1() const
Return phase model 1.
const phaseModel & phase2() const
Return phase model 2.
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
Define a concrete fvPatchField type and add to run-time tables Example, (fvPatchScalarField,...
constexpr const char *const group
Group name for atomic constants.
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
constexpr scalar pi(M_PI)
const dimensionedScalar c
Speed of light in a vacuum.
const std::string patch
OpenFOAM patch number as a std::string.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
GeometricField< vector, fvPatchField, volMesh > volVectorField
const dimensionSet dimless
Dimensionless.
dimensionedScalar pos0(const dimensionedScalar &ds)
List< label > labelList
A List of labels.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
fvPatchField< scalar > fvPatchScalarField
dimensionedScalar alphaMax("alphaMax", dimless/dimTime, laminarTransport)