Skip to content
Snippets Groups Projects
Commit ea522e76 authored by Andrew Heather's avatar Andrew Heather
Browse files

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

parent 1a519622
No related branches found
No related tags found
No related merge requests found
......@@ -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_);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment