This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/applications/solvers/compressible/sonicFoam/createFields.H

53 lines
1 KiB
C
Raw Normal View History

2010-08-26 14:22:03 +00:00
Info<< "Reading thermophysical properties\n" << endl;
2010-08-26 14:22:03 +00:00
autoPtr<basicPsiThermo> pThermo
(
2010-08-26 14:22:03 +00:00
basicPsiThermo::New(mesh)
);
2010-08-26 14:22:03 +00:00
basicPsiThermo& thermo = pThermo();
2010-08-26 14:22:03 +00:00
volScalarField& p = thermo.p();
volScalarField& e = thermo.e();
2016-01-05 14:09:02 +00:00
volScalarField psis("psi", thermo.psi()/thermo.Cp()*thermo.Cv());
psis.oldTime();
2010-08-26 14:22:03 +00:00
volScalarField rho
(
IOobject
(
2010-08-26 14:22:03 +00:00
"rho",
runTime.timeName(),
2010-08-26 14:22:03 +00:00
mesh
),
2010-08-26 14:22:03 +00:00
thermo.rho()
);
Info<< "Reading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
2016-01-05 14:09:02 +00:00
# include "compressibleCreatePhi.H"
2010-08-26 14:22:03 +00:00
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence
(
2010-08-26 14:22:03 +00:00
compressible::turbulenceModel::New
(
2010-08-26 14:22:03 +00:00
rho,
U,
phi,
thermo
)
);