wallHeatFlux.C
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #include "fvCFD.H"
00036 #include "hCombustionThermo.H"
00037 #include "RASModel.H"
00038 #include "wallFvPatch.H"
00039
00040
00041
00042 int main(int argc, char *argv[])
00043 {
00044 timeSelector::addOptions();
00045 #include "setRootCase.H"
00046 #include "createTime.H"
00047 instantList timeDirs = timeSelector::select0(runTime, args);
00048 #include "createMesh.H"
00049
00050 forAll(timeDirs, timeI)
00051 {
00052 runTime.setTime(timeDirs[timeI], timeI);
00053 Info<< "Time = " << runTime.timeName() << endl;
00054 mesh.readUpdate();
00055
00056 #include "createFields.H"
00057
00058 surfaceScalarField heatFlux =
00059 fvc::interpolate(RASModel->alphaEff())*fvc::snGrad(h);
00060
00061 const surfaceScalarField::GeometricBoundaryField& patchHeatFlux =
00062 heatFlux.boundaryField();
00063
00064 Info<< "\nWall heat fluxes [W]" << endl;
00065 forAll(patchHeatFlux, patchi)
00066 {
00067 if (typeid(mesh.boundary()[patchi]) == typeid(wallFvPatch))
00068 {
00069 Info<< mesh.boundary()[patchi].name()
00070 << " "
00071 << sum
00072 (
00073 mesh.magSf().boundaryField()[patchi]
00074 *patchHeatFlux[patchi]
00075 )
00076 << endl;
00077 }
00078 }
00079 Info<< endl;
00080
00081 volScalarField wallHeatFlux
00082 (
00083 IOobject
00084 (
00085 "wallHeatFlux",
00086 runTime.timeName(),
00087 mesh
00088 ),
00089 mesh,
00090 dimensionedScalar("wallHeatFlux", heatFlux.dimensions(), 0.0)
00091 );
00092
00093 forAll(wallHeatFlux.boundaryField(), patchi)
00094 {
00095 wallHeatFlux.boundaryField()[patchi] = patchHeatFlux[patchi];
00096 }
00097
00098 wallHeatFlux.write();
00099 }
00100
00101 Info<< "End" << endl;
00102
00103 return 0;
00104 }
00105
00106
Copyright © 2000-2009 OpenCFD Ltd