mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
ENH: 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 wallHeatFlux: Filter out coupled patches Resolves bug-report https://bugs.openfoam.org/view.php?id=2776
This commit is contained in:
committed by
Andrew Heather
parent
8bee77c76a
commit
b08e8e1904
@ -66,15 +66,18 @@ void Foam::functionObjects::wallHeatFlux::calcHeatFlux
|
||||
volScalarField& wallHeatFlux
|
||||
)
|
||||
{
|
||||
surfaceScalarField heatFlux(fvc::interpolate(alpha)*fvc::snGrad(he));
|
||||
|
||||
volScalarField::Boundary& wallHeatFluxBf = wallHeatFlux.boundaryFieldRef();
|
||||
|
||||
const surfaceScalarField::Boundary& heatFluxBf = heatFlux.boundaryField();
|
||||
const volScalarField::Boundary& heBf = he.boundaryField();
|
||||
|
||||
const volScalarField::Boundary& alphaBf = alpha.boundaryField();
|
||||
|
||||
forAll(wallHeatFluxBf, patchi)
|
||||
{
|
||||
wallHeatFluxBf[patchi] = heatFluxBf[patchi];
|
||||
if (!wallHeatFluxBf[patchi].coupled())
|
||||
{
|
||||
wallHeatFluxBf[patchi] = alphaBf[patchi]*heBf[patchi].snGrad();
|
||||
}
|
||||
}
|
||||
|
||||
if (foundObject<volScalarField>(qrName_))
|
||||
@ -85,7 +88,10 @@ void Foam::functionObjects::wallHeatFlux::calcHeatFlux
|
||||
|
||||
forAll(wallHeatFluxBf, patchi)
|
||||
{
|
||||
wallHeatFluxBf[patchi] -= radHeatFluxBf[patchi];
|
||||
if (!wallHeatFluxBf[patchi].coupled())
|
||||
{
|
||||
wallHeatFluxBf[patchi] -= radHeatFluxBf[patchi];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user