functionObjects::wallHeatFlux: More efficient evaluation of heat-flux
which avoids the need for field interpolation and snGrad specification and evaluation. Resolves patch request https://bugs.openfoam.org/view.php?id=2725
This commit is contained in:
@ -65,20 +65,18 @@ void Foam::functionObjects::wallHeatFlux::calcHeatFlux
|
|||||||
volScalarField& wallHeatFlux
|
volScalarField& wallHeatFlux
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
surfaceScalarField heatFlux
|
|
||||||
(
|
|
||||||
fvc::interpolate(alpha)*fvc::snGrad(he)
|
|
||||||
);
|
|
||||||
|
|
||||||
volScalarField::Boundary& wallHeatFluxBf =
|
volScalarField::Boundary& wallHeatFluxBf =
|
||||||
wallHeatFlux.boundaryFieldRef();
|
wallHeatFlux.boundaryFieldRef();
|
||||||
|
|
||||||
const surfaceScalarField::Boundary& heatFluxBf =
|
const volScalarField::Boundary& heBf =
|
||||||
heatFlux.boundaryField();
|
he.boundaryField();
|
||||||
|
|
||||||
|
const volScalarField::Boundary& alphaBf =
|
||||||
|
alpha.boundaryField();
|
||||||
|
|
||||||
forAll(wallHeatFluxBf, patchi)
|
forAll(wallHeatFluxBf, patchi)
|
||||||
{
|
{
|
||||||
wallHeatFluxBf[patchi] = heatFluxBf[patchi];
|
wallHeatFluxBf[patchi] = alphaBf[patchi]*heBf[patchi].snGrad();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (foundObject<volScalarField>("qr"))
|
if (foundObject<volScalarField>("qr"))
|
||||||
|
|||||||
Reference in New Issue
Block a user