nuSgsUSpaldingWallFunctionFvPatchScalarField: Use the fields from the LES model

This commit is contained in:
Henry
2011-09-29 17:27:42 +01:00
parent 4b5049b0d2
commit 95d57e8ee1
2 changed files with 7 additions and 24 deletions

View File

@ -24,6 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "nuSgsUSpaldingWallFunctionFvPatchScalarField.H"
#include "LESModel.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
#include "addToRunTimeSelectionTable.H"
@ -47,8 +48,6 @@ nuSgsUSpaldingWallFunctionFvPatchScalarField
)
:
fixedValueFvPatchScalarField(p, iF),
UName_("U"),
nuName_("nu"),
kappa_(0.41),
E_(9.8)
{}
@ -64,8 +63,6 @@ nuSgsUSpaldingWallFunctionFvPatchScalarField
)
:
fixedValueFvPatchScalarField(ptf, p, iF, mapper),
UName_(ptf.UName_),
nuName_(ptf.nuName_),
kappa_(ptf.kappa_),
E_(ptf.E_)
{}
@ -80,8 +77,6 @@ nuSgsUSpaldingWallFunctionFvPatchScalarField
)
:
fixedValueFvPatchScalarField(p, iF, dict),
UName_(dict.lookupOrDefault<word>("U", "U")),
nuName_(dict.lookupOrDefault<word>("nu", "nu")),
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
E_(dict.lookupOrDefault<scalar>("E", 9.8))
{}
@ -94,8 +89,6 @@ nuSgsUSpaldingWallFunctionFvPatchScalarField
)
:
fixedValueFvPatchScalarField(nwfpsf),
UName_(nwfpsf.UName_),
nuName_(nwfpsf.nuName_),
kappa_(nwfpsf.kappa_),
E_(nwfpsf.E_)
{}
@ -109,8 +102,6 @@ nuSgsUSpaldingWallFunctionFvPatchScalarField
)
:
fixedValueFvPatchScalarField(nwfpsf, iF),
UName_(nwfpsf.UName_),
nuName_(nwfpsf.nuName_),
kappa_(nwfpsf.kappa_),
E_(nwfpsf.E_)
{}
@ -123,16 +114,15 @@ void nuSgsUSpaldingWallFunctionFvPatchScalarField::evaluate
const Pstream::commsTypes
)
{
const LESModel& lesModel = db().lookupObject<LESModel>("LESProperties");
const label patchi = patch().index();
const fvPatchVectorField& U = lesModel.U().boundaryField()[patchi];
const scalarField nuw = lesModel.nu()().boundaryField()[patchi];
const scalarField& ry = patch().deltaCoeffs();
const fvPatchVectorField& U =
patch().lookupPatchField<volVectorField, vector>(UName_);
const scalarField magUp(mag(U.patchInternalField() - U));
const scalarField& nuw =
patch().lookupPatchField<volScalarField, scalar>(nuName_);
scalarField& nuSgsw = *this;
const scalarField magFaceGradU(mag(U.snGrad()));
@ -185,8 +175,6 @@ void nuSgsUSpaldingWallFunctionFvPatchScalarField::evaluate
void nuSgsUSpaldingWallFunctionFvPatchScalarField::write(Ostream& os) const
{
fvPatchField<scalar>::write(os);
writeEntryIfDifferent<word>(os, "U", "U", UName_);
writeEntryIfDifferent<word>(os, "nu", "nu", nuName_);
os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
writeEntry("value", os);
@ -201,6 +189,7 @@ makePatchTypeField
nuSgsUSpaldingWallFunctionFvPatchScalarField
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace LESModels

View File

@ -58,12 +58,6 @@ class nuSgsUSpaldingWallFunctionFvPatchScalarField
{
// Private data
//- Name of velocity field
word UName_;
//- Name of laminar viscosity field
word nuName_;
//- Von Karman constant
scalar kappa_;