mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: solidWallHeatFlux: incorporated into wallHeatFlux
This commit is contained in:
@ -1,3 +0,0 @@
|
|||||||
solidWallHeatFlux.C
|
|
||||||
|
|
||||||
EXE = $(FOAM_APPBIN)/solidWallHeatFlux
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
EXE_INC = \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
|
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
|
||||||
|
|
||||||
EXE_LIBS = \
|
|
||||||
-lfluidThermophysicalModels \
|
|
||||||
-lsolidThermo \
|
|
||||||
-lspecie \
|
|
||||||
-lfiniteVolume \
|
|
||||||
-lgenericPatchFields
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
autoPtr<solidThermo> thermo
|
|
||||||
(
|
|
||||||
solidThermo::New(mesh)
|
|
||||||
);
|
|
||||||
|
|
||||||
const volScalarField& T = thermo->T();
|
|
||||||
@ -1,102 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Application
|
|
||||||
solidWallHeatFlux
|
|
||||||
|
|
||||||
Description
|
|
||||||
Calculates and writes the heat flux for all patches as the boundary field
|
|
||||||
of a volScalarField and also prints the integrated flux for all wall
|
|
||||||
patches.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "fvCFD.H"
|
|
||||||
#include "wallFvPatch.H"
|
|
||||||
#include "solidThermo.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
timeSelector::addOptions();
|
|
||||||
# include "addRegionOption.H"
|
|
||||||
#include "setRootCase.H"
|
|
||||||
#include "createTime.H"
|
|
||||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
|
||||||
#include "createNamedMesh.H"
|
|
||||||
|
|
||||||
forAll(timeDirs, timeI)
|
|
||||||
{
|
|
||||||
runTime.setTime(timeDirs[timeI], timeI);
|
|
||||||
Info<< "Time = " << runTime.timeName() << endl;
|
|
||||||
mesh.readUpdate();
|
|
||||||
|
|
||||||
// Read temperature
|
|
||||||
#include "createFields.H"
|
|
||||||
|
|
||||||
// Create heat flux as volScalarField with as boundary values
|
|
||||||
// the heat flux
|
|
||||||
volScalarField wallHeatFlux
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"solidWallHeatFlux",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh
|
|
||||||
),
|
|
||||||
mesh,
|
|
||||||
dimensionedScalar("solidWallHeatFlux", dimPower/dimArea, 0.0)
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "\nWall heat fluxes [W]" << endl;
|
|
||||||
forAll(wallHeatFlux.boundaryField(), patchi)
|
|
||||||
{
|
|
||||||
wallHeatFlux.boundaryField()[patchi] =
|
|
||||||
thermo().kappa(patchi)
|
|
||||||
*T.boundaryField()[patchi].snGrad();
|
|
||||||
|
|
||||||
if (isA<wallFvPatch>(mesh.boundary()[patchi]))
|
|
||||||
{
|
|
||||||
Info<< mesh.boundary()[patchi].name()
|
|
||||||
<< " "
|
|
||||||
<< gSum
|
|
||||||
(
|
|
||||||
mesh.magSf().boundaryField()[patchi]
|
|
||||||
*wallHeatFlux.boundaryField()[patchi]
|
|
||||||
)
|
|
||||||
<< endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
wallHeatFlux.write();
|
|
||||||
|
|
||||||
Info<< endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
Info<< "End" << endl;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
Reference in New Issue
Block a user