26 #include "JohnsonJacksonParticleThetaFvPatchScalarField.H"
28 #include "twoPhaseSystem.H"
37 JohnsonJacksonParticleThetaFvPatchScalarField
47 const DimensionedField<scalar, volMesh>& iF
50 mixedFvPatchScalarField(
p, iF),
51 restitutionCoefficient_(
p.size()),
52 specularityCoefficient_(
p.size())
59 const JohnsonJacksonParticleThetaFvPatchScalarField& ptf,
61 const DimensionedField<scalar, volMesh>& iF,
62 const fvPatchFieldMapper& mapper
65 mixedFvPatchScalarField(ptf,
p, iF, mapper),
66 restitutionCoefficient_(ptf.restitutionCoefficient_),
67 specularityCoefficient_(ptf.specularityCoefficient_)
76 const DimensionedField<scalar, volMesh>& iF,
77 const dictionary&
dict
80 mixedFvPatchScalarField(
p, iF),
81 restitutionCoefficient_
83 "restitutionCoefficient",
87 specularityCoefficient_
89 "specularityCoefficient",
96 (restitutionCoefficient_.value() < 0)
97 || (restitutionCoefficient_.value() > 1)
101 <<
"The restitution coefficient has to be between 0 and 1"
112 <<
"The specularity coefficient has to be between 0 and 1"
126 const JohnsonJacksonParticleThetaFvPatchScalarField& ptf
129 mixedFvPatchScalarField(ptf),
130 restitutionCoefficient_(ptf.restitutionCoefficient_),
131 specularityCoefficient_(ptf.specularityCoefficient_)
138 const JohnsonJacksonParticleThetaFvPatchScalarField& ptf,
139 const DimensionedField<scalar, volMesh>& iF
142 mixedFvPatchScalarField(ptf, iF),
143 restitutionCoefficient_(ptf.restitutionCoefficient_),
144 specularityCoefficient_(ptf.specularityCoefficient_)
152 const fvPatchFieldMapper& m
155 mixedFvPatchScalarField::autoMap(m);
165 mixedFvPatchScalarField::rmap(ptf, addr);
177 const twoPhaseSystem&
fluid = db().lookupObject<twoPhaseSystem>
182 const phaseModel& phased
192 patch().lookupPatchField<volScalarField, scalar>
194 phased.volScalarField::name()
200 patch().lookupPatchField<volVectorField, vector>
208 patch().lookupPatchField<volScalarField, scalar>
216 patch().lookupPatchField<volScalarField, scalar>
230 .lookupObject<IOdictionary>
235 .subDict(
"kineticTheoryCoeffs")
240 if (restitutionCoefficient_.value() != 1.0)
244 *specularityCoefficient_.value()
246 /(scalar(1) -
sqr(restitutionCoefficient_.value()));
248 this->refGrad() = 0.0;
255 *(scalar(1) -
sqr(restitutionCoefficient_.value()))
260 this->valueFraction() =
c/(
c + patch().deltaCoeffs());
267 this->refValue() = 0.0;
272 *specularityCoefficient_.value()
279 this->valueFraction() = 0.0;
282 mixedFvPatchScalarField::updateCoeffs();
292 os.writeKeyword(
"restitutionCoefficient")
294 os.writeKeyword(
"specularityCoefficient")
296 writeEntry(
"value", os);