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