autoPtr thermo ( basicThermo::New(mesh) ); const volScalarField& h = thermo->he(); // Register copy of thermo density volScalarField rho ( IOobject ( "rho", runTime.timeName(), mesh ), thermo->rho() ); // Construct turbulence model (if fluid) autoPtr UPtr; autoPtr phiPtr; autoPtr turbulence; if (isA(thermo())) { UPtr.reset ( new volVectorField ( IOobject ( "U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ) ); const volVectorField& U = UPtr(); #include "compressibleCreatePhi.H" // Copy phi to autoPtr. Rename to make sure copy is now registered as 'phi'. phi.rename("phiFluid"); phiPtr.reset(new surfaceScalarField("phi", phi)); turbulence = compressible::turbulenceModel::New ( rho, U, phiPtr(), refCast(thermo()) ); } // Read radiative heat-flux if available volScalarField Qr ( IOobject ( "Qr", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE ), mesh, dimensionedScalar("Qr", dimMass/pow3(dimTime), 0.0) );