28 #include "JohnsonJacksonParticleThetaFvPatchScalarField.H"
30 #include "twoPhaseSystem.H"
39 JohnsonJacksonParticleThetaFvPatchScalarField
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,
79 const dictionary&
dict
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"
118 const JohnsonJacksonParticleThetaFvPatchScalarField& ptf
121 mixedFvPatchScalarField(ptf),
122 restitutionCoefficient_(ptf.restitutionCoefficient_),
123 specularityCoefficient_(ptf.specularityCoefficient_)
130 const JohnsonJacksonParticleThetaFvPatchScalarField& ptf,
131 const DimensionedField<scalar, volMesh>& iF
134 mixedFvPatchScalarField(ptf, iF),
135 restitutionCoefficient_(ptf.restitutionCoefficient_),
136 specularityCoefficient_(ptf.specularityCoefficient_)
144 const fvPatchFieldMapper& m
147 mixedFvPatchScalarField::autoMap(m);
157 mixedFvPatchScalarField::rmap(ptf, addr);
169 const twoPhaseSystem&
fluid = db().lookupObject<twoPhaseSystem>
174 const phaseModel& phased
184 patch().lookupPatchField<volScalarField, scalar>
186 phased.volScalarField::name()
192 patch().lookupPatchField<volVectorField, vector>
200 patch().lookupPatchField<volScalarField, scalar>
208 patch().lookupPatchField<volScalarField, scalar>
222 .lookupObject<IOdictionary>
227 .subDict(
"kineticTheoryCoeffs")
231 if (restitutionCoefficient_.value() != 1.0)
235 *specularityCoefficient_.
value()
237 /(scalar(1) -
sqr(restitutionCoefficient_.value()));
239 this->refGrad() = 0.0;
246 *(scalar(1) -
sqr(restitutionCoefficient_.value()))
251 this->valueFraction() =
c/(
c +
patch().deltaCoeffs());
258 this->refValue() = 0.0;
263 *specularityCoefficient_.value()
270 this->valueFraction() = 0.0;
273 mixedFvPatchScalarField::updateCoeffs();
283 os.writeEntry(
"restitutionCoefficient", restitutionCoefficient_);
284 os.writeEntry(
"specularityCoefficient", specularityCoefficient_);
285 writeEntry(
"value", os);