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