Commit 74fade9b authored by mattijs's avatar mattijs
Browse files

allow directional conductivity

parent 7311aac6
...@@ -215,6 +215,8 @@ turbulentTemperatureCoupledBaffleFvPatchScalarField ...@@ -215,6 +215,8 @@ turbulentTemperatureCoupledBaffleFvPatchScalarField
tmp<scalarField> tmp<scalarField>
turbulentTemperatureCoupledBaffleFvPatchScalarField::K() const turbulentTemperatureCoupledBaffleFvPatchScalarField::K() const
{ {
const fvMesh& mesh = patch().boundaryMesh().mesh();
if (KName_ == "none") if (KName_ == "none")
{ {
const compressible::RASModel& model = const compressible::RASModel& model =
...@@ -230,10 +232,32 @@ turbulentTemperatureCoupledBaffleFvPatchScalarField::K() const ...@@ -230,10 +232,32 @@ turbulentTemperatureCoupledBaffleFvPatchScalarField::K() const
*thermo.rho()().boundaryField()[patch().index()] *thermo.rho()().boundaryField()[patch().index()]
*thermo.Cp()().boundaryField()[patch().index()]; *thermo.Cp()().boundaryField()[patch().index()];
} }
else else if (mesh.objectRegistry::foundObject<volScalarField>(KName_))
{ {
return patch().lookupPatchField<volScalarField, scalar>(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);
}
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment