mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: wallHeatFlux - separated field and log writing. Fixes #1613
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2016-2017 OpenFOAM Foundation
|
Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2018 OpenCFD Ltd.
|
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -255,23 +255,9 @@ bool Foam::functionObjects::wallHeatFlux::execute()
|
|||||||
<< "database" << exit(FatalError);
|
<< "database" << exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool Foam::functionObjects::wallHeatFlux::write()
|
|
||||||
{
|
|
||||||
const volScalarField& wallHeatFlux = lookupObject<volScalarField>(type());
|
|
||||||
|
|
||||||
Log << type() << " " << name() << " write:" << nl
|
|
||||||
<< " writing field " << wallHeatFlux.name() << endl;
|
|
||||||
|
|
||||||
wallHeatFlux.write();
|
|
||||||
|
|
||||||
const fvPatchList& patches = mesh_.boundary();
|
const fvPatchList& patches = mesh_.boundary();
|
||||||
|
|
||||||
const surfaceScalarField::Boundary& magSf =
|
const surfaceScalarField::Boundary& magSf = mesh_.magSf().boundaryField();
|
||||||
mesh_.magSf().boundaryField();
|
|
||||||
|
|
||||||
for (const label patchi : patchSet_)
|
for (const label patchi : patchSet_)
|
||||||
{
|
{
|
||||||
@ -297,8 +283,26 @@ bool Foam::functionObjects::wallHeatFlux::write()
|
|||||||
|
|
||||||
Log << " min/max/integ(" << pp.name() << ") = "
|
Log << " min/max/integ(" << pp.name() << ") = "
|
||||||
<< minHfp << ", " << maxHfp << ", " << integralHfp << endl;
|
<< minHfp << ", " << maxHfp << ", " << integralHfp << endl;
|
||||||
|
|
||||||
|
this->setResult("min(" + pp.name() + ")", minHfp);
|
||||||
|
this->setResult("max(" + pp.name() + ")", maxHfp);
|
||||||
|
this->setResult("int(" + pp.name() + ")", integralHfp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Foam::functionObjects::wallHeatFlux::write()
|
||||||
|
{
|
||||||
|
const volScalarField& wallHeatFlux = lookupObject<volScalarField>(type());
|
||||||
|
|
||||||
|
Log << type() << " " << name() << " write:" << nl
|
||||||
|
<< " writing field " << wallHeatFlux.name() << endl;
|
||||||
|
|
||||||
|
wallHeatFlux.write();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user