applications/solvers/heatTransfer: Added -postProcess option

See also commit cc455173ff
This commit is contained in:
Henry Weller
2016-05-09 16:28:48 +01:00
parent 30a18e31ae
commit 98f69d417f
21 changed files with 142 additions and 134 deletions

View File

@ -1,4 +1,5 @@
EXE_INC = \ EXE_INC = \
-I. \
-I../buoyantBoussinesqSimpleFoam \ -I../buoyantBoussinesqSimpleFoam \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \

View File

@ -56,19 +56,18 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "postProcess.H"
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "createFields.H" #include "createFields.H"
#include "createIncompressibleRadiationModel.H"
#include "createFvOptions.H" #include "createFvOptions.H"
#include "initContinuityErrs.H"
#include "createTimeControls.H" #include "createTimeControls.H"
#include "CourantNo.H" #include "CourantNo.H"
#include "setInitialDeltaT.H" #include "setInitialDeltaT.H"
#include "initContinuityErrs.H"
turbulence->validate(); turbulence->validate();

View File

@ -122,3 +122,4 @@ if (p_rgh.needReference())
mesh.setFluxRequired(p_rgh.name()); mesh.setFluxRequired(p_rgh.name());
#include "createMRF.H" #include "createMRF.H"
#include "createIncompressibleRadiationModel.H"

View File

@ -56,14 +56,13 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "postProcess.H"
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
#include "createControl.H"
simpleControl simple(mesh);
#include "createFields.H" #include "createFields.H"
#include "createIncompressibleRadiationModel.H"
#include "createFvOptions.H" #include "createFvOptions.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"

View File

@ -122,3 +122,4 @@ if (p_rgh.needReference())
mesh.setFluxRequired(p_rgh.name()); mesh.setFluxRequired(p_rgh.name());
#include "createMRF.H" #include "createMRF.H"
#include "createIncompressibleRadiationModel.H"

View File

@ -44,15 +44,15 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "postProcess.H"
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "createFields.H" #include "createFields.H"
#include "createFieldRefs.H"
#include "createFvOptions.H" #include "createFvOptions.H"
#include "createRadiationModel.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"
#include "createTimeControls.H" #include "createTimeControls.H"
#include "compressibleCourantNo.H" #include "compressibleCourantNo.H"

View File

@ -0,0 +1 @@
const volScalarField& psi = thermo.psi();

View File

@ -18,8 +18,6 @@ volScalarField rho
); );
volScalarField& p = thermo.p(); volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
Info<< "Reading field U\n" << endl; Info<< "Reading field U\n" << endl;
volVectorField U volVectorField U
@ -92,3 +90,4 @@ Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U)); volScalarField K("K", 0.5*magSqr(U));
#include "createMRF.H" #include "createMRF.H"
#include "createRadiationModel.H"

View File

@ -41,15 +41,15 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "postProcess.H"
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
#include "createControl.H"
simpleControl simple(mesh);
#include "createFields.H" #include "createFields.H"
#include "createFieldRefs.H"
#include "createFvOptions.H" #include "createFvOptions.H"
#include "createRadiationModel.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"
turbulence->validate(); turbulence->validate();

View File

@ -0,0 +1 @@
const volScalarField& psi = thermo.psi();

View File

@ -18,7 +18,6 @@ volScalarField rho
); );
volScalarField& p = thermo.p(); volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
Info<< "Reading field U\n" << endl; Info<< "Reading field U\n" << endl;
volVectorField U volVectorField U
@ -88,3 +87,4 @@ dimensionedScalar initialMass = fvc::domainIntegrate(rho);
dimensionedScalar totalVolume = sum(mesh.V()); dimensionedScalar totalVolume = sum(mesh.V());
#include "createMRF.H" #include "createMRF.H"
#include "createRadiationModel.H"

View File

@ -1,5 +1,6 @@
EXE_INC = \ EXE_INC = \
-I. \
-I./fluid \ -I./fluid \
-I./solid \ -I./solid \
-I./porousFluid \ -I./porousFluid \

View File

@ -50,22 +50,17 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#define NO_CONTROL
#define CREATE_MESH createMeshesPostProcess.H
#include "postProcess.H"
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMeshes.H"
regionProperties rp(runTime); #include "createFields.H"
#include "createFluidMeshes.H"
#include "createSolidMeshes.H"
#include "createFluidFields.H"
#include "createSolidFields.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"
#include "createTimeControls.H" #include "createTimeControls.H"
#include "readSolidTimeControls.H" #include "readSolidTimeControls.H"
#include "compressibleMultiRegionCourantNo.H" #include "compressibleMultiRegionCourantNo.H"
#include "solidRegionDiffusionNo.H" #include "solidRegionDiffusionNo.H"
#include "setInitialMultiRegionDeltaT.H" #include "setInitialMultiRegionDeltaT.H"

View File

@ -1,4 +1,6 @@
EXE_INC = \ EXE_INC = \
-I. \
-I.. \
-Ifluid \ -Ifluid \
-Isolid \ -Isolid \
-I../solid \ -I../solid \

View File

@ -43,17 +43,14 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#define NO_CONTROL
#define CREATE_MESH createMeshesPostProcess.H
#include "postProcess.H"
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMeshes.H"
regionProperties rp(runTime); #include "createFields.H"
#include "createFluidMeshes.H"
#include "createSolidMeshes.H"
#include "createFluidFields.H"
#include "createSolidFields.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"

View File

@ -0,0 +1,2 @@
#include "createFluidFields.H"
#include "createSolidFields.H"

View File

@ -0,0 +1,4 @@
regionProperties rp(runTime);
#include "createFluidMeshes.H"
#include "createSolidMeshes.H"

View File

@ -0,0 +1,2 @@
#include "createMeshes.H"
fvMesh& mesh = fluidRegions[0];

View File

@ -1,11 +1,11 @@
Info<< "Reading thermophysical properties\n" << endl; Info<< "Reading thermophysical properties\n" << endl;
autoPtr<rhoThermo> pThermo(rhoThermo::New(mesh)); autoPtr<rhoThermo> pThermo(rhoThermo::New(mesh));
rhoThermo& thermo = pThermo(); rhoThermo& thermo = pThermo();
thermo.validate(args.executable(), "h", "e"); thermo.validate(args.executable(), "h", "e");
volScalarField rho volScalarField rho
( (
IOobject IOobject
( (
"rho", "rho",
@ -15,13 +15,13 @@
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
thermo.rho() thermo.rho()
); );
volScalarField& p = thermo.p(); volScalarField& p = thermo.p();
Info<< "Reading field U\n" << endl; Info<< "Reading field U\n" << endl;
volVectorField U volVectorField U
( (
IOobject IOobject
( (
"U", "U",
@ -31,15 +31,15 @@
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
mesh mesh
); );
#include "compressibleCreatePhi.H" #include "compressibleCreatePhi.H"
#include "setAlphaEff.H" #include "setAlphaEff.H"
Info<< "Creating field dpdt\n" << endl; Info<< "Creating field dpdt\n" << endl;
volScalarField dpdt volScalarField dpdt
( (
IOobject IOobject
( (
"dpdt", "dpdt",
@ -48,7 +48,9 @@
), ),
mesh, mesh,
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
); );
Info<< "Creating field kinetic energy K\n" << endl; Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U)); volScalarField K("K", 0.5*magSqr(U));
#include "createRadiationModel.H"

View File

@ -1,18 +1,18 @@
Info<< "Creating turbulence model\n" << endl; Info<< "Creating turbulence model\n" << endl;
tmp<volScalarField> talphaEff; tmp<volScalarField> talphaEff;
IOobject turbulencePropertiesHeader IOobject turbulencePropertiesHeader
( (
"turbulenceProperties", "turbulenceProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ_IF_MODIFIED, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE, IOobject::NO_WRITE,
false false
); );
if (turbulencePropertiesHeader.headerOk()) if (turbulencePropertiesHeader.headerOk())
{ {
autoPtr<compressible::turbulenceModel> turbulence autoPtr<compressible::turbulenceModel> turbulence
( (
compressible::turbulenceModel::New compressible::turbulenceModel::New
@ -25,9 +25,9 @@
); );
talphaEff = turbulence->alphaEff(); talphaEff = turbulence->alphaEff();
} }
else else
{ {
talphaEff = tmp<volScalarField> talphaEff = tmp<volScalarField>
( (
new volScalarField new volScalarField
@ -44,6 +44,4 @@
dimensionedScalar("0", dimMass/dimLength/dimTime, 0.0) dimensionedScalar("0", dimMass/dimLength/dimTime, 0.0)
) )
); );
} }
const volScalarField& alphaEff = talphaEff();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -43,13 +43,16 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "setRootCase.H" #define NO_CONTROL
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
#include "createFields.H" #include "createFields.H"
#include "createFvOptions.H" #include "createFvOptions.H"
#include "createRadiationModel.H"
const volScalarField& alphaEff = talphaEff();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //