ThermophysicalTransportModels: Changed q() and j() to return surfaceScalarFields

such that div(q()) = divq(...)
and       div(j()) = divj(...)

to unsure consistency between the reported heat (e.g. by the wallHeatFlux
functionObject) and mass fluxes and those used in the energy and specie
mass-fraction equations.
This commit is contained in:
Henry Weller
2020-09-25 19:37:01 +01:00
parent 77b31c7f3a
commit d3b2217949
14 changed files with 53 additions and 89 deletions

View File

@ -58,52 +58,6 @@ void Foam::functionObjects::wallHeatFlux::writeFileHeader(const label i)
}
Foam::tmp<Foam::volScalarField>
Foam::functionObjects::wallHeatFlux::calcWallHeatFlux(const volVectorField& q)
{
tmp<volScalarField> twallHeatFlux
(
volScalarField::New
(
type(),
mesh_,
dimensionedScalar(dimMass/pow3(dimTime), 0)
)
);
volScalarField::Boundary& wallHeatFluxBf =
twallHeatFlux.ref().boundaryFieldRef();
const volVectorField::Boundary& qBf = q.boundaryField();
forAllConstIter(labelHashSet, patchSet_, iter)
{
const label patchi = iter.key();
const vectorField& Sfp = mesh_.Sf().boundaryField()[patchi];
const scalarField& magSfp = mesh_.magSf().boundaryField()[patchi];
wallHeatFluxBf[patchi] = (-Sfp/magSfp) & qBf[patchi];
}
if (foundObject<volScalarField>("qr"))
{
const volScalarField& qr = lookupObject<volScalarField>("qr");
const volScalarField::Boundary& radHeatFluxBf = qr.boundaryField();
forAllConstIter(labelHashSet, patchSet_, iter)
{
const label patchi = iter.key();
wallHeatFluxBf[patchi] -= radHeatFluxBf[patchi];
}
}
return twallHeatFlux;
}
Foam::tmp<Foam::volScalarField>
Foam::functionObjects::wallHeatFlux::calcWallHeatFlux
(

View File

@ -108,9 +108,6 @@ protected:
//- File header information
virtual void writeFileHeader(const label i);
//- Calculate the heat-flux
tmp<volScalarField> calcWallHeatFlux(const volVectorField& q);
//- Calculate the heat-flux
tmp<volScalarField> calcWallHeatFlux(const surfaceScalarField& q);