37 JohnsonJacksonParticleThetaFvPatchScalarField
47 const DimensionedField<scalar, volMesh>& iF
50 mixedFvPatchScalarField(p, iF),
51 restitutionCoefficient_(
"restitutionCoefficient",
dimless, 0),
52 specularityCoefficient_(
"specularityCoefficient",
dimless, 0)
60 const DimensionedField<scalar, volMesh>& iF,
61 const dictionary& dict
64 mixedFvPatchScalarField(p, iF),
65 restitutionCoefficient_
67 "restitutionCoefficient",
69 dict.
lookup(
"restitutionCoefficient")
71 specularityCoefficient_
73 "specularityCoefficient",
75 dict.
lookup(
"specularityCoefficient")
80 (restitutionCoefficient_.value() < 0)
81 || (restitutionCoefficient_.value() > 1)
85 <<
"The restitution coefficient has to be between 0 and 1" 91 (specularityCoefficient_.
value() < 0)
92 || (specularityCoefficient_.
value() > 1)
96 <<
"The specularity coefficient has to be between 0 and 1" 110 const JohnsonJacksonParticleThetaFvPatchScalarField& ptf,
112 const DimensionedField<scalar, volMesh>& iF,
113 const fvPatchFieldMapper& mapper
116 mixedFvPatchScalarField(ptf, p, iF, mapper),
117 restitutionCoefficient_(ptf.restitutionCoefficient_),
118 specularityCoefficient_(ptf.specularityCoefficient_)
126 const JohnsonJacksonParticleThetaFvPatchScalarField& ptf,
127 const DimensionedField<scalar, volMesh>& iF
130 mixedFvPatchScalarField(ptf, iF),
131 restitutionCoefficient_(ptf.restitutionCoefficient_),
132 specularityCoefficient_(ptf.specularityCoefficient_)
140 const fvPatchFieldMapper& m
143 mixedFvPatchScalarField::autoMap(m);
153 mixedFvPatchScalarField::rmap(ptf, addr);
165 const phaseSystem& fluid =
166 db().lookupObject<phaseSystem>(
"phaseProperties");
168 const phaseModel& phase
170 fluid.phases()[internalField().group()]
176 patch().lookupPatchField<volScalarField, scalar>
178 phase.volScalarField::name()
184 patch().lookupPatchField<volVectorField, vector>
192 patch().lookupPatchField<volScalarField, scalar>
200 patch().lookupPatchField<volScalarField, scalar>
214 .lookupObject<IOdictionary>
219 .subDict(
"kineticTheoryCoeffs")
224 if (restitutionCoefficient_.value() != 1.0)
228 *specularityCoefficient_.
value()
230 /(scalar(1) -
sqr(restitutionCoefficient_.value()));
232 this->refGrad() = 0.0;
239 *(scalar(1) -
sqr(restitutionCoefficient_.value()))
244 this->valueFraction() =
c/(
c + patch().deltaCoeffs());
251 this->refValue() = 0.0;
256 *specularityCoefficient_.
value()
263 this->valueFraction() = 0;
266 mixedFvPatchScalarField::updateCoeffs();
276 writeEntry(os,
"restitutionCoefficient", restitutionCoefficient_);
277 writeEntry(os,
"specularityCoefficient", specularityCoefficient_);
fvPatchField< vector > fvPatchVectorField
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
friend Ostream & operator(Ostream &, const fvPatchField< Type > &)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
dimensionedScalar sqrt(const dimensionedScalar &ds)
const dimensionSet dimless
virtual void write(Ostream &) const
Write.
const dimensionedScalar c
Speed of light in a vacuum.
dimensionedScalar alphaMax(laminarTransport.lookup("alphaMax"))
Macros for easy insertion into run-time selection tables.
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
JohnsonJacksonParticleThetaFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
stressControl lookup("compactNormalStress") >> compactNormalStress
virtual void write(Ostream &) const
Write.
fvPatchField< scalar > fvPatchScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
static word groupName(Name name, const word &group)
const Type & value() const
Return const reference to value.
List< label > labelList
A List of labels.
errorManip< error > abort(error &err)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
dimensionedScalar pos0(const dimensionedScalar &ds)
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
virtual void updateCoeffs()
Update the coefficients.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)