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<< "Reading thermophysical properties\n" << endl;
00002 
00003     autoPtr<hhuCombustionThermo> pThermo
00004     (
00005         hhuCombustionThermo::New(mesh)
00006     );
00007     hhuCombustionThermo& thermo = pThermo();
00008     basicMultiComponentMixture& composition = thermo.composition();
00009 
00010     volScalarField rho
00011     (
00012         IOobject
00013         (
00014             "rho",
00015             runTime.timeName(),
00016             mesh,
00017             IOobject::NO_READ,
00018             IOobject::AUTO_WRITE
00019         ),
00020         thermo.rho()
00021     );
00022 
00023     volScalarField& p = thermo.p();
00024     const volScalarField& psi = thermo.psi();
00025     volScalarField& h = thermo.h();
00026     volScalarField& hu = thermo.hu();
00027 
00028     volScalarField& b = composition.Y("bprog");
00029     Info<< "min(bprog) = " << min(b).value() << endl;
00030 
00031     //const volScalarField& T = thermo->T();
00032 
00033 
00034     Info<< "\nReading field U\n" << endl;
00035     volVectorField U
00036     (
00037         IOobject
00038         (
00039             "U",
00040             runTime.timeName(),
00041             mesh,
00042             IOobject::MUST_READ,
00043             IOobject::AUTO_WRITE
00044         ),
00045         mesh
00046     );
00047 
00048 #   include <finiteVolume/compressibleCreatePhi.H>
00049 
00050     Info<< "Creating turbulence model\n" << endl;
00051     autoPtr<compressible::RASModel> turbulence
00052     (
00053         compressible::RASModel::New
00054         (
00055             rho,
00056             U,
00057             phi,
00058             thermo
00059         )
00060     );
00061 
00062     Info<< "Creating field DpDt\n" << endl;
00063     volScalarField DpDt
00064     (
00065         "DpDt",
00066         fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
00067     );
00068 
00069 
00070     Info<< "Creating the unstrained laminar flame speed\n" << endl;
00071     autoPtr<laminarFlameSpeed> unstrainedLaminarFlameSpeed
00072     (
00073         laminarFlameSpeed::New(thermo)
00074     );
00075 
00076 
00077     Info<< "Reading strained laminar flame speed field Su\n" << endl;
00078     volScalarField Su
00079     (
00080         IOobject
00081         (
00082             "Su",
00083             runTime.timeName(),
00084             mesh,
00085             IOobject::MUST_READ,
00086             IOobject::AUTO_WRITE
00087         ),
00088         mesh
00089     );
00090 
00091     Info<< "Reading field betav\n" << endl;
00092     volScalarField betav
00093     (
00094         IOobject
00095         (
00096             "betav",
00097             runTime.findInstance(polyMesh::meshSubDir, "betav"),
00098             polyMesh::meshSubDir,
00099             mesh,
00100             IOobject::MUST_READ,
00101             IOobject::NO_WRITE
00102         ),
00103         mesh
00104     );
00105 
00106     IOdictionary PDRProperties
00107     (
00108         IOobject
00109         (
00110             "PDRProperties",
00111             runTime.constant(),
00112             mesh,
00113             IOobject::MUST_READ,
00114             IOobject::NO_WRITE
00115         )
00116     );
00117 
00118     //- Create the drag model
00119     autoPtr<PDRDragModel> drag = PDRDragModel::New
00120     (
00121         PDRProperties,
00122         turbulence,
00123         rho,
00124         U,
00125         phi
00126     );
00127 
00128     //- Create the flame-wrinkling model
00129     autoPtr<XiModel> flameWrinkling = XiModel::New
00130     (
00131         PDRProperties,
00132         thermo,
00133         turbulence,
00134         Su,
00135         rho,
00136         b,
00137         phi
00138     );
00139 
00140     Info<< "Calculating turbulent flame speed field St\n" << endl;
00141     volScalarField St
00142     (
00143         IOobject
00144         (
00145             "St",
00146             runTime.timeName(),
00147             mesh,
00148             IOobject::NO_READ,
00149             IOobject::AUTO_WRITE
00150         ),
00151         flameWrinkling->Xi()*Su
00152     );
00153 
00154 
00155     multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
00156 
00157     if (composition.contains("ft"))
00158     {
00159         fields.add(composition.Y("ft"));
00160     }
00161 
00162     fields.add(b);
00163     fields.add(h);
00164     fields.add(hu);
00165     flameWrinkling->addXi(fields);
00166 
00167 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines