FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

createFields.H

Go to the documentation of this file.
00001 Info<< nl << "Reading thermophysicalProperties" << endl;
00002 autoPtr<rhoChemistryModel> pChemistry
00003 (
00004     rhoChemistryModel::New(mesh)
00005 );
00006 rhoChemistryModel& chemistry = pChemistry();
00007 
00008 hsReactionThermo& thermo = chemistry.thermo();
00009 
00010 basicMultiComponentMixture& composition = thermo.composition();
00011 PtrList<volScalarField>& Y = composition.Y();
00012 
00013 word inertSpecie(thermo.lookup("inertSpecie"));
00014 
00015 volScalarField rho
00016 (
00017     IOobject
00018     (
00019         "rho",
00020         runTime.timeName(),
00021         mesh
00022     ),
00023     thermo.rho()
00024 );
00025 
00026 Info<< "Reading field U\n" << endl;
00027 volVectorField U
00028 (
00029     IOobject
00030     (
00031         "U",
00032         runTime.timeName(),
00033         mesh,
00034         IOobject::MUST_READ,
00035         IOobject::AUTO_WRITE
00036     ),
00037     mesh
00038 );
00039 
00040 
00041 volScalarField& p = thermo.p();
00042 const volScalarField& psi = thermo.psi();
00043 volScalarField& hs = thermo.hs();
00044 const volScalarField& T = thermo.T();
00045 
00046 
00047 #include <finiteVolume/compressibleCreatePhi.H>
00048 
00049 volScalarField kappa
00050 (
00051     IOobject
00052     (
00053         "kappa",
00054         runTime.timeName(),
00055         mesh,
00056         IOobject::NO_READ,
00057         IOobject::AUTO_WRITE
00058     ),
00059     mesh,
00060     dimensionedScalar("zero", dimless, 0.0)
00061 );
00062 
00063 Info << "Creating turbulence model.\n" << nl;
00064 autoPtr<compressible::turbulenceModel> turbulence
00065 (
00066     compressible::turbulenceModel::New
00067     (
00068         rho,
00069         U,
00070         phi,
00071         thermo
00072     )
00073 );
00074 
00075 Info<< "Creating field DpDt\n" << endl;
00076 volScalarField DpDt =
00077     fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
00078 
00079 multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
00080 
00081 forAll(Y, i)
00082 {
00083     fields.add(Y[i]);
00084 }
00085 fields.add(hs);
00086 
00087 DimensionedField<scalar, volMesh> chemistrySh
00088 (
00089     IOobject
00090     (
00091         "chemistry::Sh",
00092         runTime.timeName(),
00093         mesh,
00094         IOobject::NO_READ,
00095         IOobject::NO_WRITE
00096     ),
00097     mesh,
00098     dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
00099 );
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines