Skip to content
Snippets Groups Projects
Commit 74fade9b authored by mattijs's avatar mattijs
Browse files

allow directional conductivity

parent 7311aac6
Branches
Tags
No related merge requests found
......@@ -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);
}
}
......
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