wallHeatFlux: Updated to use the thermophysicalTransportModel::q() function
providing consistency between the reported heat fluxes and those used in the energy equation.
This commit is contained in:
@ -27,7 +27,7 @@ License
|
|||||||
#include "thermophysicalTransportModel.H"
|
#include "thermophysicalTransportModel.H"
|
||||||
#include "solidThermo.H"
|
#include "solidThermo.H"
|
||||||
#include "surfaceInterpolate.H"
|
#include "surfaceInterpolate.H"
|
||||||
#include "fvcSnGrad.H"
|
#include "fvcGrad.H"
|
||||||
#include "wallPolyPatch.H"
|
#include "wallPolyPatch.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
@ -59,11 +59,7 @@ void Foam::functionObjects::wallHeatFlux::writeFileHeader(const label i)
|
|||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField>
|
Foam::tmp<Foam::volScalarField>
|
||||||
Foam::functionObjects::wallHeatFlux::calcWallHeatFlux
|
Foam::functionObjects::wallHeatFlux::calcWallHeatFlux(const volVectorField& q)
|
||||||
(
|
|
||||||
const volScalarField& alpha,
|
|
||||||
const volScalarField& he
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
tmp<volScalarField> twallHeatFlux
|
tmp<volScalarField> twallHeatFlux
|
||||||
(
|
(
|
||||||
@ -78,14 +74,16 @@ Foam::functionObjects::wallHeatFlux::calcWallHeatFlux
|
|||||||
volScalarField::Boundary& wallHeatFluxBf =
|
volScalarField::Boundary& wallHeatFluxBf =
|
||||||
twallHeatFlux.ref().boundaryFieldRef();
|
twallHeatFlux.ref().boundaryFieldRef();
|
||||||
|
|
||||||
const volScalarField::Boundary& heBf = he.boundaryField();
|
const volVectorField::Boundary& qBf = q.boundaryField();
|
||||||
const volScalarField::Boundary& alphaBf = alpha.boundaryField();
|
|
||||||
|
|
||||||
forAllConstIter(labelHashSet, patchSet_, iter)
|
forAllConstIter(labelHashSet, patchSet_, iter)
|
||||||
{
|
{
|
||||||
const label patchi = iter.key();
|
const label patchi = iter.key();
|
||||||
|
|
||||||
wallHeatFluxBf[patchi] = alphaBf[patchi]*heBf[patchi].snGrad();
|
const vectorField& Sfp = mesh_.Sf().boundaryField()[patchi];
|
||||||
|
const scalarField& magSfp = mesh_.magSf().boundaryField()[patchi];
|
||||||
|
|
||||||
|
wallHeatFluxBf[patchi] = (-Sfp/magSfp) & qBf[patchi];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (foundObject<volScalarField>("qr"))
|
if (foundObject<volScalarField>("qr"))
|
||||||
@ -211,7 +209,7 @@ bool Foam::functionObjects::wallHeatFlux::execute()
|
|||||||
return store
|
return store
|
||||||
(
|
(
|
||||||
name,
|
name,
|
||||||
calcWallHeatFlux(ttm.alphaEff(), ttm.thermo().he())
|
calcWallHeatFlux(ttm.q())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if (foundObject<solidThermo>(solidThermo::dictName))
|
else if (foundObject<solidThermo>(solidThermo::dictName))
|
||||||
@ -219,7 +217,11 @@ bool Foam::functionObjects::wallHeatFlux::execute()
|
|||||||
const solidThermo& thermo =
|
const solidThermo& thermo =
|
||||||
lookupObject<solidThermo>(solidThermo::dictName);
|
lookupObject<solidThermo>(solidThermo::dictName);
|
||||||
|
|
||||||
return store(name, calcWallHeatFlux(thermo.alpha(), thermo.he()));
|
return store
|
||||||
|
(
|
||||||
|
name,
|
||||||
|
calcWallHeatFlux(-thermo.alpha()*fvc::grad(thermo.he()))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -108,11 +108,7 @@ protected:
|
|||||||
virtual void writeFileHeader(const label i);
|
virtual void writeFileHeader(const label i);
|
||||||
|
|
||||||
//- Calculate the heat-flux
|
//- Calculate the heat-flux
|
||||||
tmp<volScalarField> calcWallHeatFlux
|
tmp<volScalarField> calcWallHeatFlux(const volVectorField& q);
|
||||||
(
|
|
||||||
const volScalarField& alpha,
|
|
||||||
const volScalarField& he
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -82,9 +82,8 @@ Foam::functionObjects::wallShearStress::calcShearStress
|
|||||||
|
|
||||||
const vectorField& Sfp = mesh_.Sf().boundaryField()[patchi];
|
const vectorField& Sfp = mesh_.Sf().boundaryField()[patchi];
|
||||||
const scalarField& magSfp = mesh_.magSf().boundaryField()[patchi];
|
const scalarField& magSfp = mesh_.magSf().boundaryField()[patchi];
|
||||||
const symmTensorField& taup = tau.boundaryField()[patchi];
|
|
||||||
|
|
||||||
wallShearStressBf[patchi] = (-Sfp/magSfp) & taup;
|
wallShearStressBf[patchi] = (-Sfp/magSfp) & tau.boundaryField()[patchi];
|
||||||
}
|
}
|
||||||
|
|
||||||
return twallShearStress;
|
return twallShearStress;
|
||||||
|
|||||||
Reference in New Issue
Block a user