mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
allow directional conductivity
This commit is contained in:
@ -215,6 +215,8 @@ turbulentTemperatureCoupledBaffleFvPatchScalarField
|
||||
tmp<scalarField>
|
||||
turbulentTemperatureCoupledBaffleFvPatchScalarField::K() const
|
||||
{
|
||||
const fvMesh& mesh = patch().boundaryMesh().mesh();
|
||||
|
||||
if (KName_ == "none")
|
||||
{
|
||||
const compressible::RASModel& model =
|
||||
@ -230,10 +232,32 @@ turbulentTemperatureCoupledBaffleFvPatchScalarField::K() const
|
||||
*thermo.rho()().boundaryField()[patch().index()]
|
||||
*thermo.Cp()().boundaryField()[patch().index()];
|
||||
}
|
||||
else
|
||||
else if (mesh.objectRegistry::foundObject<volScalarField>(KName_))
|
||||
{
|
||||
return patch().lookupPatchField<volScalarField, scalar>(KName_);
|
||||
}
|
||||
else if (mesh.objectRegistry::foundObject<volSymmTensorField>(KName_))
|
||||
{
|
||||
const symmTensorField& KWall =
|
||||
patch().lookupPatchField<volSymmTensorField, scalar>(KName_);
|
||||
|
||||
vectorField n = patch().nf();
|
||||
|
||||
return n & KWall & n;
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"turbulentTemperatureCoupledBaffleFvPatchScalarField::K() const"
|
||||
) << "Did not find field " << KName_
|
||||
<< " on mesh " << mesh.name() << " patch " << patch().name()
|
||||
<< endl
|
||||
<< "Please set 'K' to 'none', a valid volScalarField"
|
||||
<< " or a valid volSymmTensorField." << exit(FatalError);
|
||||
|
||||
return scalarField(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user