ENH: totalFlowRateAdvectiveDiffusive BC - removed hard-coded LES model lookup. Fixes #1097

This commit is contained in:
Andrew Heather 2018-11-05 09:14:59 +00:00
parent 0446e73485
commit 584d6d066a

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -81,6 +81,7 @@ totalFlowRateAdvectiveDiffusiveFvPatchScalarField
}
}
Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::
totalFlowRateAdvectiveDiffusiveFvPatchScalarField
(
@ -109,6 +110,7 @@ totalFlowRateAdvectiveDiffusiveFvPatchScalarField
massFluxFraction_(tppsf.massFluxFraction_)
{}
Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::
totalFlowRateAdvectiveDiffusiveFvPatchScalarField
(
@ -153,11 +155,8 @@ void Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::updateCoeffs()
const label patchi = patch().index();
const LESModel<EddyDiffusivity<compressible::turbulenceModel>>& turbModel =
db().lookupObject
<
LESModel<EddyDiffusivity<compressible::turbulenceModel>>
>
const compressible::turbulenceModel& turbModel =
db().lookupObject<compressible::turbulenceModel>
(
IOobject::groupName
(
@ -176,10 +175,9 @@ void Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::updateCoeffs()
valueFraction() =
1.0
/
(
1.0 +
alphap*patch().deltaCoeffs()*patch().magSf()/max(mag(phip), SMALL)
/(
1.0
+ alphap*patch().deltaCoeffs()*patch().magSf()/max(mag(phip), SMALL)
);
mixedFvPatchField<scalar>::updateCoeffs();
@ -197,8 +195,10 @@ void Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::updateCoeffs()
}
void Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::
write(Ostream& os) const
void Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::write
(
Ostream& os
) const
{
fvPatchField<scalar>::write(os);
os.writeEntry("phi", phiName_);