mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
restructuring
This commit is contained in:
@ -47,6 +47,7 @@ int main(int argc, char *argv[])
|
|||||||
# include "createMesh.H"
|
# include "createMesh.H"
|
||||||
# include "readEnvironmentalProperties.H"
|
# include "readEnvironmentalProperties.H"
|
||||||
# include "createFields.H"
|
# include "createFields.H"
|
||||||
|
# include "createRadiationModel.H"
|
||||||
# include "initContinuityErrs.H"
|
# include "initContinuityErrs.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -1,9 +0,0 @@
|
|||||||
// check convergence
|
|
||||||
|
|
||||||
if (maxResidual < convergenceCriterion)
|
|
||||||
{
|
|
||||||
Info<< "reached convergence criterion: " << convergenceCriterion << endl;
|
|
||||||
runTime.writeAndEnd();
|
|
||||||
Info<< "latestTime = " << runTime.timeName() << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -1,97 +0,0 @@
|
|||||||
Info<< "Reading thermophysical properties\n" << endl;
|
|
||||||
|
|
||||||
autoPtr<basicThermo> thermo
|
|
||||||
(
|
|
||||||
basicThermo::New(mesh)
|
|
||||||
);
|
|
||||||
|
|
||||||
volScalarField rho
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"rho",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
thermo->rho()
|
|
||||||
);
|
|
||||||
|
|
||||||
volScalarField& p = thermo->p();
|
|
||||||
volScalarField& h = thermo->h();
|
|
||||||
const volScalarField& T = thermo->T();
|
|
||||||
|
|
||||||
|
|
||||||
Info<< "Reading field U\n" << endl;
|
|
||||||
volVectorField U
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"U",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
# include "compressibleCreatePhi.H"
|
|
||||||
|
|
||||||
|
|
||||||
Info<< "Creating turbulence model\n" << endl;
|
|
||||||
autoPtr<compressible::RASModel> turbulence
|
|
||||||
(
|
|
||||||
compressible::RASModel::New
|
|
||||||
(
|
|
||||||
rho,
|
|
||||||
U,
|
|
||||||
phi,
|
|
||||||
thermo()
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Calculating field g.h\n" << endl;
|
|
||||||
volScalarField gh("gh", g & mesh.C());
|
|
||||||
surfaceScalarField ghf("gh", g & mesh.Cf());
|
|
||||||
|
|
||||||
dimensionedScalar pRef("pRef", p.dimensions(), thermo->lookup("pRef"));
|
|
||||||
|
|
||||||
Info<< "Creating field pd\n" << endl;
|
|
||||||
volScalarField pd
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"pd",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
p = pd + rho*gh + pRef;
|
|
||||||
thermo->correct();
|
|
||||||
|
|
||||||
|
|
||||||
label pdRefCell = 0;
|
|
||||||
scalar pdRefValue = 0.0;
|
|
||||||
setRefCell
|
|
||||||
(
|
|
||||||
pd,
|
|
||||||
mesh.solutionDict().subDict("SIMPLE"),
|
|
||||||
pdRefCell,
|
|
||||||
pdRefValue
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
Info<< "Creating radiation model\n" << endl;
|
|
||||||
autoPtr<radiation::radiationModel> radiation
|
|
||||||
(
|
|
||||||
radiation::radiationModel::New(T)
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
dimensionedScalar initialMass = fvc::domainIntegrate(rho);
|
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
Info<< "Creating radiation model\n" << endl;
|
||||||
|
autoPtr<radiation::radiationModel> radiation
|
||||||
|
(
|
||||||
|
radiation::radiationModel::New(thermo->T())
|
||||||
|
);
|
||||||
@ -1,7 +0,0 @@
|
|||||||
// initialize values for convergence checks
|
|
||||||
|
|
||||||
scalar eqnResidual = 1, maxResidual = 0;
|
|
||||||
scalar convergenceCriterion = 0;
|
|
||||||
|
|
||||||
simple.readIfPresent("convergence", convergenceCriterion);
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user