createFields.H
Go to the documentation of this file.00001 Info<< "Reading field p\n" << endl;
00002 volScalarField p
00003 (
00004 IOobject
00005 (
00006 "p",
00007 runTime.timeName(),
00008 mesh,
00009 IOobject::MUST_READ,
00010 IOobject::AUTO_WRITE
00011 ),
00012 mesh
00013 );
00014 p.oldTime();
00015
00016 Info<< "Reading field T\n" << endl;
00017 volScalarField T
00018 (
00019 IOobject
00020 (
00021 "T",
00022 runTime.timeName(),
00023 mesh,
00024 IOobject::MUST_READ,
00025 IOobject::AUTO_WRITE
00026 ),
00027 mesh
00028 );
00029 T.correctBoundaryConditions();
00030
00031 volScalarField psi
00032 (
00033 IOobject
00034 (
00035 "psi",
00036 runTime.timeName(),
00037 mesh,
00038 IOobject::NO_READ,
00039 IOobject::AUTO_WRITE
00040 ),
00041 1.0/(R*T)
00042 );
00043 psi.oldTime();
00044
00045 # include "rhoBoundaryTypes.H"
00046 volScalarField rho
00047 (
00048 IOobject
00049 (
00050 "rho",
00051 runTime.timeName(),
00052 mesh,
00053 IOobject::NO_READ,
00054 IOobject::AUTO_WRITE
00055 ),
00056 p*psi,
00057 rhoBoundaryTypes
00058 );
00059
00060 Info<< "Reading field U\n" << endl;
00061 volVectorField U
00062 (
00063 IOobject
00064 (
00065 "U",
00066 runTime.timeName(),
00067 mesh,
00068 IOobject::MUST_READ,
00069 IOobject::AUTO_WRITE
00070 ),
00071 mesh
00072 );
00073
00074 # include "rhoUboundaryTypes.H"
00075 volVectorField rhoU
00076 (
00077 IOobject
00078 (
00079 "rhoU",
00080 runTime.timeName(),
00081 mesh,
00082 IOobject::NO_READ,
00083 IOobject::AUTO_WRITE
00084 ),
00085 rho*U,
00086 rhoUboundaryTypes
00087 );
00088
00089 # include "rhoEboundaryTypes.H"
00090 volScalarField rhoE
00091 (
00092 IOobject
00093 (
00094 "rhoE",
00095 runTime.timeName(),
00096 mesh,
00097 IOobject::NO_READ,
00098 IOobject::AUTO_WRITE
00099 ),
00100 rho*Cv*T + 0.5*rho*magSqr(rhoU/rho),
00101 rhoEboundaryTypes
00102 );
00103
00104 # include "compressibleCreatePhi.H"
00105 phi.oldTime();
00106
00107 surfaceScalarField phiv
00108 (
00109 IOobject
00110 (
00111 "phiv",
00112 runTime.timeName(),
00113 mesh
00114 ),
00115 phi/linearInterpolate(rho),
00116 phi.boundaryField().types()
00117 );
00118
00119 rhoU.correctBoundaryConditions();
00120
00121 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
00122
00123 volScalarField magRhoU = mag(rhoU);
00124 volScalarField H("H", (rhoE + p)/rho);
00125
00126 fields.add(rho);
00127 fields.add(magRhoU);
00128 fields.add(H);
00129
Copyright © 2000-2009 OpenCFD Ltd