From 0fb6a01280c937392d6dac942ce3d222f4037bb5 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Wed, 15 Jul 2015 21:57:16 +0100 Subject: [PATCH] fluxRequired: Added setFluxRequired function to fvSchemes class Added calls to setFluxRequired for p, p_rgh etc. in all solvers which avoids the need to add fluxRequired entries in fvSchemes dictionaries. --- .../solvers/DNS/dnsFoam/createFields.H | 52 +-- .../solvers/combustion/PDRFoam/createFields.H | 416 +++++++++--------- .../solvers/combustion/XiFoam/createFields.H | 241 +++++----- .../combustion/fireFoam/createFields.H | 254 +++++------ .../combustion/reactingFoam/createFields.H | 2 + .../rhoReactingBuoyantFoam/createFields.H | 1 + .../rhoReactingFoam/createFields.H | 3 +- .../compressible/rhoPimpleFoam/createFields.H | 174 ++++---- .../compressible/rhoSimpleFoam/createFields.H | 140 +++--- .../rhoPorousSimpleFoam/createFields.H | 138 +++--- .../compressible/sonicFoam/createFields.H | 99 ++--- .../sonicFoam/sonicLiquidFoam/createFields.H | 74 ++-- .../electromagnetics/mhdFoam/createFields.H | 183 ++++---- .../createFields.H | 218 ++++----- .../createFields.H | 218 ++++----- .../buoyantPimpleFoam/createFields.H | 168 +++---- .../buoyantSimpleFoam/createFields.H | 139 +++--- .../fluid/createFluidFields.H | 408 ++++++++--------- .../fluid/createFluidFields.H | 400 ++++++++--------- .../pimpleFoam/pimpleDyMFoam/createFields.H | 2 - .../solvers/lagrangian/DPMFoam/createFields.H | 299 ++++++------- .../coalChemistryFoam/createFields.H | 258 +++++------ .../reactingParcelFilmFoam/createFields.H | 272 ++++++------ .../reactingParcelFoam/createFields.H | 246 ++++++----- .../simpleReactingParcelFoam/createFields.H | 231 +++++----- .../lagrangian/sprayFoam/createFields.H | 242 +++++----- .../cavitatingDyMFoam/correctPhi.H | 2 + .../multiphase/cavitatingFoam/createFields.H | 171 +++---- .../compressibleInterFoam/createFields.H | 176 ++++---- .../createFields.H | 112 ++--- .../multiphase/driftFluxFoam/createFields.H | 224 +++++----- .../multiphase/interFoam/createFields.H | 225 +++++----- .../interFoam/interMixingFoam/createFields.H | 199 ++++----- .../interPhaseChangeFoam/createFields.H | 179 ++++---- .../multiphaseEulerFoam/createFields.H | 205 ++++----- .../multiphaseInterFoam/createFields.H | 158 +++---- .../potentialFreeSurfaceFoam/createFields.H | 139 +++--- .../reactingTwoPhaseEulerFoam/createFields.H | 144 +++--- .../twoLiquidMixingFoam/createFields.H | 185 ++++---- .../twoPhaseEulerFoam/createFields.H | 178 ++++---- .../solidDisplacementFoam/createFields.H | 2 + .../cfdTools/general/CorrectPhi/CorrectPhi.C | 4 + .../finiteVolume/fvSchemes/fvSchemes.C | 2 +- .../finiteVolume/fvSchemes/fvSchemes.H | 4 +- .../MPPIC/PackingModels/Implicit/Implicit.C | 7 +- .../kinematicSingleLayer.C | 3 +- tutorials/Alltest | 2 - .../DNS/dnsFoam/boxTurb16/system/fvSchemes | 6 - .../laplacianFoam/flange/system/fvSchemes | 6 - .../pitzDaily/system/fvSchemes | 6 - .../system/fvSchemes | 6 - .../ras/moriyoshiHomogeneous/system/fvSchemes | 6 - .../combustion/chemFoam/gri/system/fvSchemes | 4 - .../combustion/chemFoam/h2/system/fvSchemes | 4 - .../chemFoam/ic8h18/system/fvSchemes | 4 - .../engineFoam/kivaTest/system/fvSchemes | 6 - .../system/filmRegion/fvSchemes | 6 - .../system/fvSchemes | 6 - .../system/pyrolysisRegion/fvSchemes | 4 - .../oppositeBurningPanels/system/fvSchemes | 8 - .../system/panelRegion/fvSchemes | 4 - .../les/smallPoolFire2D/system/fvSchemes | 6 - .../les/smallPoolFire3D/system/fvSchemes | 6 - .../ras/counterFlowFlame2D/system/fvSchemes | 6 - .../counterFlowFlame2DLTS/system/fvSchemes | 6 - .../annularThermalMixer/system/fvSchemes | 8 - .../les/pitzDaily/system/fvSchemes | 6 - .../ras/angledDuct/system/fvSchemes | 6 - .../ras/angledDuctLTS/system/fvSchemes | 6 - .../rhoPimpleFoam/ras/cavity/system/fvSchemes | 6 - .../ras/mixerVessel2D/system/fvSchemes | 6 - .../angledDuctExplicit/system/fvSchemes | 6 - .../angledDuctImplicit/system/fvSchemes | 6 - .../system/fvSchemes | 6 - .../rhoSimpleFoam/squareBend/system/fvSchemes | 6 - .../sonicDyMFoam/movingCone/system/fvSchemes | 8 - .../laminar/forwardStep/system/fvSchemes | 6 - .../laminar/shockTube/system/fvSchemes | 6 - .../ras/nacaAirfoil/system/fvSchemes | 6 - .../sonicFoam/ras/prism/system/fvSchemes | 6 - .../decompressionTank/system/fvSchemes | 6 - .../freeSpacePeriodic/system/fvSchemes | 6 - .../dsmcFoam/freeSpaceStream/system/fvSchemes | 6 - .../supersonicCorner/system/fvSchemes | 6 - .../dsmcFoam/wedge15Ma5/system/fvSchemes | 6 - .../periodicCubeArgon/system/fvSchemes | 6 - .../periodicCubeWater/system/fvSchemes | 6 - .../mdFoam/nanoNozzle/system/fvSchemes | 6 - .../chargedWire/system/fvSchemes | 6 - .../mhdFoam/hartmann/system/fvSchemes | 8 - .../hotRoom/system/fvSchemes | 6 - .../hotRoom/system/fvSchemes | 6 - .../iglooWithFridges/system/fvSchemes | 6 - .../hotRoom/system/fvSchemes | 6 - .../buoyantCavity/system/fvSchemes | 6 - .../circuitBoardCooling/system/fvSchemes | 6 - .../externalCoupledCavity/system/fvSchemes | 6 - .../hotRadiationRoom/system/fvSchemes | 6 - .../hotRadiationRoomFvDOM/system/fvSchemes | 6 - .../system/bottomWater/fvSchemes | 6 - .../multiRegionHeater/system/fvSchemes | 4 - .../multiRegionHeater/system/heater/fvSchemes | 4 - .../system/bottomAir/fvSchemes | 6 - .../snappyMultiRegionHeater/system/fvSchemes | 4 - .../system/heater/fvSchemes | 4 - .../heatExchanger/system/air/fvSchemes | 6 - .../heatExchanger/system/fvSchemes | 4 - .../heatExchanger/system/porous/fvSchemes | 6 - .../system/bottomAir/fvSchemes | 6 - .../system/fvSchemes | 4 - .../system/heater/fvSchemes | 4 - .../DPMFoam/Goldschmidt/system/fvSchemes | 6 - .../MPPICFoam/Goldschmidt/system/fvSchemes | 6 - .../MPPICFoam/column/system/fvSchemes | 6 - .../MPPICFoam/cyclone/system/fvSchemes | 6 - .../injectionChannel/system/fvSchemes | 6 - .../simplifiedSiwek/system/fvSchemes | 6 - .../cylinder/system/fvSchemes | 6 - .../cylinder/system/wallFilmRegion/fvSchemes | 6 - .../hotBoxes/system/fvSchemes | 6 - .../system/wallFilmRegion.org/fvSchemes | 6 - .../rivuletPanel/system/fvSchemes | 6 - .../system/wallFilmRegion/fvSchemes | 6 - .../splashPanel/system/fvSchemes | 6 - .../system/wallFilmRegion/fvSchemes | 6 - .../counterFlowFlame2DLTS/system/fvSchemes | 6 - .../filter/system/fvSchemes | 6 - .../parcelInBox/system/fvSchemes | 6 - .../verticalChannel/system/fvSchemes | 7 - .../verticalChannelLTS/system/fvSchemes | 6 - .../verticalChannel/system/fvSchemes | 7 - .../sprayFoam/aachenBomb/system/fvSchemes | 6 - .../mesh/foamyHexMesh/blob/system/fvSchemes | 6 - .../mesh/foamyHexMesh/flange/system/fvSchemes | 6 - .../foamyHexMesh/mixerVessel/system/fvSchemes | 8 - .../simpleShapes/system/fvSchemes | 6 - .../foamyQuadMesh/OpenCFD/system/fvSchemes | 6 - .../jaggedBoundary/system/fvSchemes | 6 - .../foamyQuadMesh/square/system/fvSchemes | 6 - .../SnakeRiverCanyon/system/fvSchemes | 6 - .../les/throttle/system/fvSchemes | 8 - .../les/throttle3D/system/fvSchemes | 8 - .../ras/throttle/system/fvSchemes | 7 - .../ras/sloshingTank2D/system/fvSchemes | 8 - .../laminar/depthCharge2D/system/fvSchemes | 8 - .../laminar/depthCharge3D/system/fvSchemes | 8 - .../laminar/damBreak4phase/system/fvSchemes | 8 - .../driftFluxFoam/ras/dahl/system/fvSchemes | 8 - .../ras/mixerVessel2D/system/fvSchemes | 8 - .../driftFluxFoam/ras/tank3D/system/fvSchemes | 8 - .../interDyMFoam/ras/DTCHull/system/fvSchemes | 8 - .../ras/damBreakWithObstacle/system/fvSchemes | 7 - .../ras/floatingObject/system/fvSchemes | 8 - .../ras/mixerVesselAMI/system/fvSchemes | 8 - .../ras/sloshingTank2D/system/fvSchemes | 8 - .../ras/sloshingTank2D3DoF/system/fvSchemes | 8 - .../ras/sloshingTank3D/system/fvSchemes | 8 - .../ras/sloshingTank3D3DoF/system/fvSchemes | 8 - .../ras/sloshingTank3D6DoF/system/fvSchemes | 8 - .../ras/testTubeMixer/system/fvSchemes | 8 - .../laminar/capillaryRise/system/fvSchemes | 8 - .../laminar/damBreak/system/fvSchemes | 8 - .../laminar/mixerVessel2D/system/fvSchemes | 8 - .../les/nozzleFlow2D/system/fvSchemes | 8 - .../interFoam/ras/DTCHull/system/fvSchemes | 8 - .../interFoam/ras/angledDuct/system/fvSchemes | 8 - .../interFoam/ras/damBreak/system/fvSchemes | 8 - .../ras/damBreakPorousBaffle/system/fvSchemes | 8 - .../ras/waterChannel/system/fvSchemes | 8 - .../ras/weirOverflow/system/fvSchemes | 8 - .../laminar/damBreak/system/fvSchemes | 8 - .../propeller/system/fvSchemes | 8 - .../cavitatingBullet/system/fvSchemes | 8 - .../bubbleColumn/system/fvSchemes | 8 - .../damBreak4phase/system/fvSchemes | 8 - .../damBreak4phaseFine/system/fvSchemes | 8 - .../mixerVessel2D/system/fvSchemes | 8 - .../laminar/mixerVesselAMI2D/system/fvSchemes | 8 - .../laminar/damBreak4phase/system/fvSchemes | 8 - .../damBreak4phaseFine/system/fvSchemes | 8 - .../laminar/mixerVessel2D/system/fvSchemes | 8 - .../oscillatingBox/system/fvSchemes | 8 - .../oscillatingBox/system/fvSchemes | 6 - .../LES/bubbleColumn/system/fvSchemes | 6 - .../RAS/bubbleColumn/system/fvSchemes | 6 - .../constant/phaseProperties | 2 +- .../system/fvSchemes | 6 - .../RAS/fluidisedBed/system/fvSchemes | 7 - .../laminar/bubbleColumn/system/fvSchemes | 6 - .../constant/phaseProperties | 2 +- .../bubbleColumnEvaporating/system/fvSchemes | 6 - .../constant/phaseProperties | 2 +- .../system/fvSchemes | 6 - .../laminar/bubbleColumnIATE/system/fvSchemes | 6 - .../laminar/fluidisedBed/system/fvSchemes | 8 - .../laminar/injection/system/fvSchemes | 6 - .../laminar/mixerVessel2D/system/fvSchemes | 6 - .../lockExchange/system/fvSchemes | 8 - .../LES/bubbleColumn/system/fvSchemes | 6 - .../RAS/bubbleColumn/system/fvSchemes | 6 - .../RAS/fluidisedBed/system/fvSchemes | 8 - .../laminar/bubbleColumn/system/fvSchemes | 6 - .../laminar/bubbleColumnIATE/system/fvSchemes | 6 - .../laminar/fluidisedBed/system/fvSchemes | 8 - .../laminar/injection/system/fvSchemes | 6 - .../laminar/mixerVessel2D/system/fvSchemes | 6 - .../plateHole/system/fvSchemes | 8 - .../beamEndLoad/system/fvSchemes | 6 - 208 files changed, 3643 insertions(+), 4591 deletions(-) delete mode 100644 applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/createFields.H diff --git a/applications/solvers/DNS/dnsFoam/createFields.H b/applications/solvers/DNS/dnsFoam/createFields.H index 6c1bb42929..7584773636 100644 --- a/applications/solvers/DNS/dnsFoam/createFields.H +++ b/applications/solvers/DNS/dnsFoam/createFields.H @@ -1,29 +1,31 @@ - Info<< "Reading field p\n" << endl; - volScalarField p +Info<< "Reading field p\n" << endl; +volScalarField p +( + IOobject ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "p", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - Info<< "Reading field U\n" << endl; - volVectorField U +Info<< "Reading field U\n" << endl; +volVectorField U +( + IOobject ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - #include "createPhi.H" +#include "createPhi.H" + +mesh.setFluxRequired(p.name()); diff --git a/applications/solvers/combustion/PDRFoam/createFields.H b/applications/solvers/combustion/PDRFoam/createFields.H index 2af6ecd53f..fb958b3b52 100644 --- a/applications/solvers/combustion/PDRFoam/createFields.H +++ b/applications/solvers/combustion/PDRFoam/createFields.H @@ -1,227 +1,229 @@ - Info<< "Reading thermophysical properties\n" << endl; +Info<< "Reading thermophysical properties\n" << endl; - autoPtr pThermo +autoPtr pThermo +( + psiuReactionThermo::New(mesh) +); +psiuReactionThermo& thermo = pThermo(); +thermo.validate(args.executable(), "ha", "ea"); + +basicMultiComponentMixture& composition = thermo.composition(); + +volScalarField rho +( + IOobject ( - psiuReactionThermo::New(mesh) - ); - psiuReactionThermo& thermo = pThermo(); - thermo.validate(args.executable(), "ha", "ea"); - - basicMultiComponentMixture& composition = thermo.composition(); - - volScalarField rho - ( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - thermo.rho() - ); - - volScalarField& p = thermo.p(); - const volScalarField& psi = thermo.psi(); - - volScalarField& b = composition.Y("b"); - Info<< "min(b) = " << min(b).value() << endl; - - Info<< "\nReading field U\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - #include "compressibleCreatePhi.H" - - Info<< "Creating turbulence model\n" << endl; - autoPtr turbulence - ( - compressible::RASModel::New - ( - rho, - U, - phi, - thermo - ) - ); - - - Info<< "Creating field dpdt\n" << endl; - volScalarField dpdt - ( - IOobject - ( - "dpdt", - runTime.timeName(), - mesh - ), + "rho", + runTime.timeName(), mesh, - dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) - ); + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + thermo.rho() +); - Info<< "Creating field kinetic energy K\n" << endl; - volScalarField K("K", 0.5*magSqr(U)); +volScalarField& p = thermo.p(); +const volScalarField& psi = thermo.psi(); +volScalarField& b = composition.Y("b"); +Info<< "min(b) = " << min(b).value() << endl; - Info<< "Creating the unstrained laminar flame speed\n" << endl; - autoPtr unstrainedLaminarFlameSpeed +Info<< "\nReading field U\n" << endl; +volVectorField U +( + IOobject ( - laminarFlameSpeed::New(thermo) - ); + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); +#include "compressibleCreatePhi.H" - Info<< "Reading strained laminar flame speed field Su\n" << endl; - volScalarField Su +mesh.setFluxRequired(p.name()); + +Info<< "Creating turbulence model\n" << endl; +autoPtr turbulence +( + compressible::RASModel::New ( - IOobject - ( - "Su", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - Info<< "Reading field betav\n" << endl; - volScalarField betav - ( - IOobject - ( - "betav", - mesh.facesInstance(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE - ), - mesh - ); - - Info<< "Reading field Lobs\n" << endl; - volScalarField Lobs - ( - IOobject - ( - "Lobs", - mesh.facesInstance(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE - ), - mesh - ); - - Info<< "Reading field CT\n" << endl; - volSymmTensorField CT - ( - IOobject - ( - "CT", - mesh.facesInstance(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE - ), - mesh - ); - - Info<< "Reading field Nv\n" << endl; - volScalarField Nv - ( - IOobject - ( - "Nv", - mesh.facesInstance(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE - ), - mesh - ); - - Info<< "Reading field nsv\n" << endl; - volSymmTensorField nsv - ( - IOobject - ( - "nsv", - mesh.facesInstance(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE - ), - mesh - ); - - IOdictionary PDRProperties - ( - IOobject - ( - "PDRProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE - ) - ); - - //- Create the drag model - autoPtr drag = PDRDragModel::New - ( - PDRProperties, - turbulence, rho, U, - phi - ); + phi, + thermo + ) +); - //- Create the flame-wrinkling model - autoPtr flameWrinkling = XiModel::New + +Info<< "Creating field dpdt\n" << endl; +volScalarField dpdt +( + IOobject ( - PDRProperties, - thermo, - turbulence, - Su, - rho, - b, - phi - ); + "dpdt", + runTime.timeName(), + mesh + ), + mesh, + dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) +); - Info<< "Calculating turbulent flame speed field St\n" << endl; - volScalarField St +Info<< "Creating field kinetic energy K\n" << endl; +volScalarField K("K", 0.5*magSqr(U)); + + +Info<< "Creating the unstrained laminar flame speed\n" << endl; +autoPtr unstrainedLaminarFlameSpeed +( + laminarFlameSpeed::New(thermo) +); + + +Info<< "Reading strained laminar flame speed field Su\n" << endl; +volScalarField Su +( + IOobject ( - IOobject - ( - "St", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - flameWrinkling->Xi()*Su - ); + "Su", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); + +Info<< "Reading field betav\n" << endl; +volScalarField betav +( + IOobject + ( + "betav", + mesh.facesInstance(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ), + mesh +); + +Info<< "Reading field Lobs\n" << endl; +volScalarField Lobs +( + IOobject + ( + "Lobs", + mesh.facesInstance(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ), + mesh +); + +Info<< "Reading field CT\n" << endl; +volSymmTensorField CT +( + IOobject + ( + "CT", + mesh.facesInstance(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ), + mesh +); + +Info<< "Reading field Nv\n" << endl; +volScalarField Nv +( + IOobject + ( + "Nv", + mesh.facesInstance(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ), + mesh +); + +Info<< "Reading field nsv\n" << endl; +volSymmTensorField nsv +( + IOobject + ( + "nsv", + mesh.facesInstance(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ), + mesh +); + +IOdictionary PDRProperties +( + IOobject + ( + "PDRProperties", + runTime.constant(), + mesh, + IOobject::MUST_READ_IF_MODIFIED, + IOobject::NO_WRITE + ) +); + +//- Create the drag model +autoPtr drag = PDRDragModel::New +( + PDRProperties, + turbulence, + rho, + U, + phi +); + +//- Create the flame-wrinkling model +autoPtr flameWrinkling = XiModel::New +( + PDRProperties, + thermo, + turbulence, + Su, + rho, + b, + phi +); + +Info<< "Calculating turbulent flame speed field St\n" << endl; +volScalarField St +( + IOobject + ( + "St", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + flameWrinkling->Xi()*Su +); - multivariateSurfaceInterpolationScheme::fieldTable fields; +multivariateSurfaceInterpolationScheme::fieldTable fields; - if (composition.contains("ft")) - { - fields.add(composition.Y("ft")); - } +if (composition.contains("ft")) +{ + fields.add(composition.Y("ft")); +} - fields.add(b); - fields.add(thermo.he()); - fields.add(thermo.heu()); - flameWrinkling->addXi(fields); +fields.add(b); +fields.add(thermo.he()); +fields.add(thermo.heu()); +flameWrinkling->addXi(fields); diff --git a/applications/solvers/combustion/XiFoam/createFields.H b/applications/solvers/combustion/XiFoam/createFields.H index 17103885e5..fa573b9b77 100644 --- a/applications/solvers/combustion/XiFoam/createFields.H +++ b/applications/solvers/combustion/XiFoam/createFields.H @@ -1,140 +1,141 @@ - Info<< "Reading thermophysical properties\n" << endl; +Info<< "Reading thermophysical properties\n" << endl; - autoPtr pThermo +autoPtr pThermo +( + psiuReactionThermo::New(mesh) +); +psiuReactionThermo& thermo = pThermo(); +thermo.validate(args.executable(), "ha", "ea"); + +basicMultiComponentMixture& composition = thermo.composition(); + +volScalarField rho +( + IOobject ( - psiuReactionThermo::New(mesh) - ); - psiuReactionThermo& thermo = pThermo(); - thermo.validate(args.executable(), "ha", "ea"); - - basicMultiComponentMixture& composition = thermo.composition(); - - volScalarField rho - ( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - thermo.rho() - ); - - volScalarField& p = thermo.p(); - const volScalarField& psi = thermo.psi(); - - volScalarField& b = composition.Y("b"); - Info<< "min(b) = " << min(b).value() << endl; - - - Info<< "\nReading field U\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - #include "compressibleCreatePhi.H" - - - Info<< "Creating turbulence model\n" << endl; - autoPtr turbulence - ( - compressible::turbulenceModel::New - ( - rho, - U, - phi, - thermo - ) - ); - - Info<< "Creating field dpdt\n" << endl; - volScalarField dpdt - ( - IOobject - ( - "dpdt", - runTime.timeName(), - mesh - ), + "rho", + runTime.timeName(), mesh, - dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) - ); + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + thermo.rho() +); - Info<< "Creating field kinetic energy K\n" << endl; - volScalarField K("K", 0.5*magSqr(U)); +volScalarField& p = thermo.p(); +const volScalarField& psi = thermo.psi(); - Info<< "Creating field Xi\n" << endl; - volScalarField Xi +volScalarField& b = composition.Y("b"); +Info<< "min(b) = " << min(b).value() << endl; + + +Info<< "\nReading field U\n" << endl; +volVectorField U +( + IOobject ( - IOobject - ( - "Xi", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); + +#include "compressibleCreatePhi.H" + +mesh.setFluxRequired(p.name()); + +Info<< "Creating turbulence model\n" << endl; +autoPtr turbulence +( + compressible::turbulenceModel::New + ( + rho, + U, + phi, + thermo + ) +); + +Info<< "Creating field dpdt\n" << endl; +volScalarField dpdt +( + IOobject + ( + "dpdt", + runTime.timeName(), mesh - ); + ), + mesh, + dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) +); +Info<< "Creating field kinetic energy K\n" << endl; +volScalarField K("K", 0.5*magSqr(U)); - Info<< "Creating the unstrained laminar flame speed\n" << endl; - autoPtr unstrainedLaminarFlameSpeed +Info<< "Creating field Xi\n" << endl; +volScalarField Xi +( + IOobject ( - laminarFlameSpeed::New(thermo) - ); + "Xi", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - Info<< "Reading strained laminar flame speed field Su\n" << endl; - volScalarField Su +Info<< "Creating the unstrained laminar flame speed\n" << endl; +autoPtr unstrainedLaminarFlameSpeed +( + laminarFlameSpeed::New(thermo) +); + + +Info<< "Reading strained laminar flame speed field Su\n" << endl; +volScalarField Su +( + IOobject ( - IOobject - ( - "Su", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "Su", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - dimensionedScalar SuMin = 0.01*Su.average(); - dimensionedScalar SuMax = 4*Su.average(); +dimensionedScalar SuMin = 0.01*Su.average(); +dimensionedScalar SuMax = 4*Su.average(); - Info<< "Calculating turbulent flame speed field St\n" << endl; - volScalarField St +Info<< "Calculating turbulent flame speed field St\n" << endl; +volScalarField St +( + IOobject ( - IOobject - ( - "St", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - Xi*Su - ); + "St", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + Xi*Su +); - multivariateSurfaceInterpolationScheme::fieldTable fields; +multivariateSurfaceInterpolationScheme::fieldTable fields; - if (composition.contains("ft")) - { - fields.add(composition.Y("ft")); - } +if (composition.contains("ft")) +{ + fields.add(composition.Y("ft")); +} - fields.add(b); - fields.add(thermo.he()); - fields.add(thermo.heu()); +fields.add(b); +fields.add(thermo.he()); +fields.add(thermo.heu()); diff --git a/applications/solvers/combustion/fireFoam/createFields.H b/applications/solvers/combustion/fireFoam/createFields.H index 72b5e0869b..c5fcc21c90 100644 --- a/applications/solvers/combustion/fireFoam/createFields.H +++ b/applications/solvers/combustion/fireFoam/createFields.H @@ -1,148 +1,150 @@ - Info<< "Creating combustion model\n" << endl; +Info<< "Creating combustion model\n" << endl; - autoPtr combustion +autoPtr combustion +( + combustionModels::psiCombustionModel::New ( - combustionModels::psiCombustionModel::New - ( - mesh - ) - ); - - Info<< "Reading thermophysical properties\n" << endl; - - psiReactionThermo& thermo = combustion->thermo(); - thermo.validate(args.executable(), "h", "e"); - - SLGThermo slgThermo(mesh, thermo); - - basicMultiComponentMixture& composition = thermo.composition(); - PtrList& Y = composition.Y(); - - const word inertSpecie(thermo.lookup("inertSpecie")); - - Info<< "Creating field rho\n" << endl; - volScalarField rho - ( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - thermo.rho() - ); - - volScalarField& p = thermo.p(); - const volScalarField& T = thermo.T(); - const volScalarField& psi = thermo.psi(); - - Info<< "\nReading field U\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), mesh - ); + ) +); - #include "compressibleCreatePhi.H" +Info<< "Reading thermophysical properties\n" << endl; - Info<< "Creating turbulence model\n" << endl; - autoPtr turbulence +psiReactionThermo& thermo = combustion->thermo(); +thermo.validate(args.executable(), "h", "e"); + +SLGThermo slgThermo(mesh, thermo); + +basicMultiComponentMixture& composition = thermo.composition(); +PtrList& Y = composition.Y(); + +const word inertSpecie(thermo.lookup("inertSpecie")); + +Info<< "Creating field rho\n" << endl; +volScalarField rho +( + IOobject ( - compressible::turbulenceModel::New - ( - rho, - U, - phi, - thermo - ) - ); - - // Set the turbulence into the combustion model - combustion->setTurbulence(turbulence()); - - volScalarField dQ - ( - IOobject - ( - "dQ", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), + "rho", + runTime.timeName(), mesh, - dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) - ); + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + thermo.rho() +); +volScalarField& p = thermo.p(); +const volScalarField& T = thermo.T(); +const volScalarField& psi = thermo.psi(); - Info<< "Creating field dpdt\n" << endl; - volScalarField dpdt +Info<< "\nReading field U\n" << endl; +volVectorField U +( + IOobject ( - IOobject - ( - "dpdt", - runTime.timeName(), - mesh - ), + "U", + runTime.timeName(), mesh, - dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) - ); + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - Info<< "Creating field kinetic energy K\n" << endl; - volScalarField K("K", 0.5*magSqr(U)); +#include "compressibleCreatePhi.H" - - #include "readGravitationalAcceleration.H" - #include "readhRef.H" - #include "gh.H" - - - volScalarField p_rgh +Info<< "Creating turbulence model\n" << endl; +autoPtr turbulence +( + compressible::turbulenceModel::New ( - IOobject - ( - "p_rgh", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), + rho, + U, + phi, + thermo + ) +); + +// Set the turbulence into the combustion model +combustion->setTurbulence(turbulence()); + +volScalarField dQ +( + IOobject + ( + "dQ", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) +); + + +Info<< "Creating field dpdt\n" << endl; +volScalarField dpdt +( + IOobject + ( + "dpdt", + runTime.timeName(), mesh - ); + ), + mesh, + dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) +); - // Force p_rgh to be consistent with p - p_rgh = p - rho*gh; +Info<< "Creating field kinetic energy K\n" << endl; +volScalarField K("K", 0.5*magSqr(U)); - multivariateSurfaceInterpolationScheme::fieldTable fields; - forAll(Y, i) - { - fields.add(Y[i]); - } - fields.add(thermo.he()); +#include "readGravitationalAcceleration.H" +#include "readhRef.H" +#include "gh.H" - IOdictionary additionalControlsDict + +volScalarField p_rgh +( + IOobject ( - IOobject - ( - "additionalControls", - runTime.constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE - ) - ); + "p_rgh", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - Switch solvePrimaryRegion +// Force p_rgh to be consistent with p +p_rgh = p - rho*gh; + +mesh.setFluxRequired(p_rgh.name()); + +multivariateSurfaceInterpolationScheme::fieldTable fields; + +forAll(Y, i) +{ + fields.add(Y[i]); +} +fields.add(thermo.he()); + +IOdictionary additionalControlsDict +( + IOobject ( - additionalControlsDict.lookup("solvePrimaryRegion") - ); + "additionalControls", + runTime.constant(), + mesh, + IOobject::MUST_READ_IF_MODIFIED, + IOobject::NO_WRITE + ) +); + +Switch solvePrimaryRegion +( + additionalControlsDict.lookup("solvePrimaryRegion") +); diff --git a/applications/solvers/combustion/reactingFoam/createFields.H b/applications/solvers/combustion/reactingFoam/createFields.H index 32bdd372ee..19c115a8f2 100644 --- a/applications/solvers/combustion/reactingFoam/createFields.H +++ b/applications/solvers/combustion/reactingFoam/createFields.H @@ -45,6 +45,8 @@ const volScalarField& T = thermo.T(); #include "compressibleCreatePhi.H" +mesh.setFluxRequired(p.name()); + Info << "Creating turbulence model.\n" << nl; autoPtr turbulence ( diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/createFields.H b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/createFields.H index 5298950425..9caa9effab 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/createFields.H +++ b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/createFields.H @@ -46,6 +46,7 @@ const volScalarField& T = thermo.T(); #include "compressibleCreatePhi.H" +mesh.setFluxRequired(p.name()); Info << "Creating turbulence model.\n" << nl; autoPtr turbulence diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/createFields.H b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/createFields.H index e99639e189..32dc5f0483 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/createFields.H +++ b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/createFields.H @@ -43,9 +43,10 @@ volScalarField& p = thermo.p(); const volScalarField& psi = thermo.psi(); const volScalarField& T = thermo.T(); - #include "compressibleCreatePhi.H" +mesh.setFluxRequired(p.name()); + Info << "Creating turbulence model.\n" << nl; autoPtr turbulence diff --git a/applications/solvers/compressible/rhoPimpleFoam/createFields.H b/applications/solvers/compressible/rhoPimpleFoam/createFields.H index fc82f631d0..0e214011de 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoPimpleFoam/createFields.H @@ -1,90 +1,92 @@ - Info<< "Reading thermophysical properties\n" << endl; +Info<< "Reading thermophysical properties\n" << endl; - autoPtr pThermo +autoPtr pThermo +( + psiThermo::New(mesh) +); +psiThermo& thermo = pThermo(); +thermo.validate(args.executable(), "h", "e"); + +volScalarField& p = thermo.p(); +const volScalarField& psi = thermo.psi(); + +volScalarField rho +( + IOobject ( - psiThermo::New(mesh) - ); - psiThermo& thermo = pThermo(); - thermo.validate(args.executable(), "h", "e"); - - volScalarField& p = thermo.p(); - const volScalarField& psi = thermo.psi(); - - volScalarField rho - ( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::READ_IF_PRESENT, - IOobject::AUTO_WRITE - ), - thermo.rho() - ); - - Info<< "Reading field U\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - #include "compressibleCreatePhi.H" - - dimensionedScalar rhoMax - ( - dimensionedScalar::lookupOrDefault - ( - "rhoMax", - pimple.dict(), - GREAT, - dimDensity - ) - ); - - dimensionedScalar rhoMin - ( - dimensionedScalar::lookupOrDefault - ( - "rhoMin", - pimple.dict(), - 0, - dimDensity - ) - ); - - Info<< "Creating turbulence model\n" << endl; - autoPtr turbulence - ( - compressible::turbulenceModel::New - ( - rho, - U, - phi, - thermo - ) - ); - - Info<< "Creating field dpdt\n" << endl; - volScalarField dpdt - ( - IOobject - ( - "dpdt", - runTime.timeName(), - mesh - ), + "rho", + runTime.timeName(), mesh, - dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) - ); + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + thermo.rho() +); - Info<< "Creating field kinetic energy K\n" << endl; - volScalarField K("K", 0.5*magSqr(U)); +Info<< "Reading field U\n" << endl; +volVectorField U +( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); + +#include "compressibleCreatePhi.H" + +dimensionedScalar rhoMax +( + dimensionedScalar::lookupOrDefault + ( + "rhoMax", + pimple.dict(), + GREAT, + dimDensity + ) +); + +dimensionedScalar rhoMin +( + dimensionedScalar::lookupOrDefault + ( + "rhoMin", + pimple.dict(), + 0, + dimDensity + ) +); + +Info<< "Creating turbulence model\n" << endl; +autoPtr turbulence +( + compressible::turbulenceModel::New + ( + rho, + U, + phi, + thermo + ) +); + +mesh.setFluxRequired(p.name()); + +Info<< "Creating field dpdt\n" << endl; +volScalarField dpdt +( + IOobject + ( + "dpdt", + runTime.timeName(), + mesh + ), + mesh, + dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) +); + +Info<< "Creating field kinetic energy K\n" << endl; +volScalarField K("K", 0.5*magSqr(U)); diff --git a/applications/solvers/compressible/rhoSimpleFoam/createFields.H b/applications/solvers/compressible/rhoSimpleFoam/createFields.H index fd303612c6..2d89e2b566 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoSimpleFoam/createFields.H @@ -1,81 +1,83 @@ - Info<< "Reading thermophysical properties\n" << endl; +Info<< "Reading thermophysical properties\n" << endl; - autoPtr pThermo +autoPtr pThermo +( + psiThermo::New(mesh) +); +psiThermo& thermo = pThermo(); +thermo.validate(args.executable(), "h", "e"); + +volScalarField rho +( + IOobject ( - psiThermo::New(mesh) - ); - psiThermo& thermo = pThermo(); - thermo.validate(args.executable(), "h", "e"); + "rho", + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + thermo.rho() +); - volScalarField rho +volScalarField& p = thermo.p(); +const volScalarField& psi = thermo.psi(); + +Info<< "Reading field U\n" << endl; +volVectorField U +( + IOobject ( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::READ_IF_PRESENT, - IOobject::AUTO_WRITE - ), - thermo.rho() - ); + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - volScalarField& p = thermo.p(); - const volScalarField& psi = thermo.psi(); +#include "compressibleCreatePhi.H" - Info<< "Reading field U\n" << endl; - volVectorField U + +label pRefCell = 0; +scalar pRefValue = 0.0; +setRefCell(p, simple.dict(), pRefCell, pRefValue); + +mesh.setFluxRequired(p.name()); + +dimensionedScalar rhoMax +( + dimensionedScalar::lookupOrDefault ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "rhoMax", + simple.dict(), + GREAT, + dimDensity + ) +); - #include "compressibleCreatePhi.H" - - - label pRefCell = 0; - scalar pRefValue = 0.0; - setRefCell(p, simple.dict(), pRefCell, pRefValue); - - dimensionedScalar rhoMax +dimensionedScalar rhoMin +( + dimensionedScalar::lookupOrDefault ( - dimensionedScalar::lookupOrDefault - ( - "rhoMax", - simple.dict(), - GREAT, - dimDensity - ) - ); + "rhoMin", + simple.dict(), + 0, + dimDensity + ) +); - dimensionedScalar rhoMin +Info<< "Creating turbulence model\n" << endl; +autoPtr turbulence +( + compressible::RASModel::New ( - dimensionedScalar::lookupOrDefault - ( - "rhoMin", - simple.dict(), - 0, - dimDensity - ) - ); + rho, + U, + phi, + thermo + ) +); - Info<< "Creating turbulence model\n" << endl; - autoPtr turbulence - ( - compressible::RASModel::New - ( - rho, - U, - phi, - thermo - ) - ); - - dimensionedScalar initialMass = fvc::domainIntegrate(rho); +dimensionedScalar initialMass = fvc::domainIntegrate(rho); diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/createFields.H b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/createFields.H index ced5e478bf..3ce8270b5e 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/createFields.H @@ -1,80 +1,82 @@ - Info<< "Reading thermophysical properties\n" << endl; +Info<< "Reading thermophysical properties\n" << endl; - autoPtr pThermo +autoPtr pThermo +( + rhoThermo::New(mesh) +); +rhoThermo& thermo = pThermo(); +thermo.validate(args.executable(), "h", "e"); + +volScalarField rho +( + IOobject ( - rhoThermo::New(mesh) - ); - rhoThermo& thermo = pThermo(); - thermo.validate(args.executable(), "h", "e"); + "rho", + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + thermo.rho() +); - volScalarField rho +volScalarField& p = thermo.p(); + +Info<< "Reading field U\n" << endl; +volVectorField U +( + IOobject ( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::READ_IF_PRESENT, - IOobject::AUTO_WRITE - ), - thermo.rho() - ); + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - volScalarField& p = thermo.p(); +#include "compressibleCreatePhi.H" - Info<< "Reading field U\n" << endl; - volVectorField U + +label pRefCell = 0; +scalar pRefValue = 0.0; +setRefCell(p, simple.dict(), pRefCell, pRefValue); + +mesh.setFluxRequired(p.name()); + +dimensionedScalar rhoMax +( + dimensionedScalar::lookupOrDefault ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "rhoMax", + simple.dict(), + GREAT, + dimDensity + ) +); - #include "compressibleCreatePhi.H" - - - label pRefCell = 0; - scalar pRefValue = 0.0; - setRefCell(p, simple.dict(), pRefCell, pRefValue); - - dimensionedScalar rhoMax +dimensionedScalar rhoMin +( + dimensionedScalar::lookupOrDefault ( - dimensionedScalar::lookupOrDefault - ( - "rhoMax", - simple.dict(), - GREAT, - dimDensity - ) - ); + "rhoMin", + simple.dict(), + 0, + dimDensity + ) +); - dimensionedScalar rhoMin +Info<< "Creating turbulence model\n" << endl; +autoPtr turbulence +( + compressible::RASModel::New ( - dimensionedScalar::lookupOrDefault - ( - "rhoMin", - simple.dict(), - 0, - dimDensity - ) - ); + rho, + U, + phi, + thermo + ) +); - Info<< "Creating turbulence model\n" << endl; - autoPtr turbulence - ( - compressible::RASModel::New - ( - rho, - U, - phi, - thermo - ) - ); - - dimensionedScalar initialMass = fvc::domainIntegrate(rho); +dimensionedScalar initialMass = fvc::domainIntegrate(rho); diff --git a/applications/solvers/compressible/sonicFoam/createFields.H b/applications/solvers/compressible/sonicFoam/createFields.H index c3421369e7..ad4b4a3019 100644 --- a/applications/solvers/compressible/sonicFoam/createFields.H +++ b/applications/solvers/compressible/sonicFoam/createFields.H @@ -1,55 +1,56 @@ - Info<< "Reading thermophysical properties\n" << endl; +Info<< "Reading thermophysical properties\n" << endl; - autoPtr pThermo +autoPtr pThermo +( + psiThermo::New(mesh) +); +psiThermo& thermo = pThermo(); +thermo.validate(args.executable(), "e"); + +volScalarField& p = thermo.p(); +volScalarField& e = thermo.he(); +const volScalarField& psi = thermo.psi(); + +volScalarField rho +( + IOobject ( - psiThermo::New(mesh) - ); - psiThermo& thermo = pThermo(); - thermo.validate(args.executable(), "e"); - - volScalarField& p = thermo.p(); - volScalarField& e = thermo.he(); - const volScalarField& psi = thermo.psi(); - - volScalarField rho - ( - IOobject - ( - "rho", - runTime.timeName(), - mesh - ), - thermo.rho() - ); - - Info<< "Reading field U\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), + "rho", + runTime.timeName(), mesh - ); + ), + thermo.rho() +); - #include "compressibleCreatePhi.H" - - - Info<< "Creating turbulence model\n" << endl; - autoPtr turbulence +Info<< "Reading field U\n" << endl; +volVectorField U +( + IOobject ( - compressible::turbulenceModel::New - ( - rho, - U, - phi, - thermo - ) - ); + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - Info<< "Creating field kinetic energy K\n" << endl; - volScalarField K("K", 0.5*magSqr(U)); +#include "compressibleCreatePhi.H" + +mesh.setFluxRequired(p.name()); + +Info<< "Creating turbulence model\n" << endl; +autoPtr turbulence +( + compressible::turbulenceModel::New + ( + rho, + U, + phi, + thermo + ) +); + +Info<< "Creating field kinetic energy K\n" << endl; +volScalarField K("K", 0.5*magSqr(U)); diff --git a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/createFields.H b/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/createFields.H index 1268cbb7b0..54f26a90c0 100644 --- a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/createFields.H +++ b/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/createFields.H @@ -1,44 +1,46 @@ - Info<< "Reading field p\n" << endl; - volScalarField p +Info<< "Reading field p\n" << endl; +volScalarField p +( + IOobject ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "p", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - Info<< "Reading field U\n" << endl; - volVectorField U +Info<< "Reading field U\n" << endl; +volVectorField U +( + IOobject ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - volScalarField rho +volScalarField rho +( + IOobject ( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - rhoO + psi*p - ); + "rho", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + rhoO + psi*p +); - #include "compressibleCreatePhi.H" +#include "compressibleCreatePhi.H" + +mesh.setFluxRequired(p.name()); diff --git a/applications/solvers/electromagnetics/mhdFoam/createFields.H b/applications/solvers/electromagnetics/mhdFoam/createFields.H index a514f11416..528bcd1b54 100644 --- a/applications/solvers/electromagnetics/mhdFoam/createFields.H +++ b/applications/solvers/electromagnetics/mhdFoam/createFields.H @@ -1,107 +1,110 @@ - Info<< "Reading transportProperties\n" << endl; +Info<< "Reading transportProperties\n" << endl; - IOdictionary transportProperties +IOdictionary transportProperties +( + IOobject ( - IOobject - ( - "transportProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE - ) - ); + "transportProperties", + runTime.constant(), + mesh, + IOobject::MUST_READ_IF_MODIFIED, + IOobject::NO_WRITE + ) +); - dimensionedScalar rho +dimensionedScalar rho +( + transportProperties.lookup("rho") +); + +dimensionedScalar nu +( + transportProperties.lookup("nu") +); + +dimensionedScalar mu +( + transportProperties.lookup("mu") +); + +dimensionedScalar sigma +( + transportProperties.lookup("sigma") +); + +Info<< "Reading field p\n" << endl; +volScalarField p +( + IOobject ( - transportProperties.lookup("rho") - ); + "p", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - dimensionedScalar nu + +Info<< "Reading field U\n" << endl; +volVectorField U +( + IOobject ( - transportProperties.lookup("nu") - ); + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - dimensionedScalar mu +#include "createPhi.H" + +Info<< "Reading field pB\n" << endl; +volScalarField pB +( + IOobject ( - transportProperties.lookup("mu") - ); + "pB", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - dimensionedScalar sigma + +Info<< "Reading field B\n" << endl; +volVectorField B +( + IOobject ( - transportProperties.lookup("sigma") - ); - - Info<< "Reading field p\n" << endl; - volScalarField p - ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "B", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - Info<< "Reading field U\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); +#include "createPhiB.H" - #include "createPhi.H" +dimensionedScalar DB = 1.0/(mu*sigma); +DB.name() = "DB"; - Info<< "Reading field pB\n" << endl; - volScalarField pB - ( - IOobject - ( - "pB", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); +dimensionedScalar DBU = 1.0/(2.0*mu*rho); +DBU.name() = "DBU"; - Info<< "Reading field B\n" << endl; - volVectorField B - ( - IOobject - ( - "B", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); +label pRefCell = 0; +scalar pRefValue = 0.0; +setRefCell(p, piso.dict(), pRefCell, pRefValue); - - #include "createPhiB.H" - - dimensionedScalar DB = 1.0/(mu*sigma); - DB.name() = "DB"; - - dimensionedScalar DBU = 1.0/(2.0*mu*rho); - DBU.name() = "DBU"; - - - label pRefCell = 0; - scalar pRefValue = 0.0; - setRefCell(p, piso.dict(), pRefCell, pRefValue); +mesh.setFluxRequired(p.name()); +mesh.setFluxRequired(pB.name()); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H index 0f554ef78d..f98c472e11 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H @@ -1,120 +1,122 @@ - Info<< "Reading thermophysical properties\n" << endl; +Info<< "Reading thermophysical properties\n" << endl; - Info<< "Reading field T\n" << endl; - volScalarField T +Info<< "Reading field T\n" << endl; +volScalarField T +( + IOobject ( - IOobject - ( - "T", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), + "T", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); + +Info<< "Reading field p_rgh\n" << endl; +volScalarField p_rgh +( + IOobject + ( + "p_rgh", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); + +Info<< "Reading field U\n" << endl; +volVectorField U +( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); + +#include "createPhi.H" + +#include "readTransportProperties.H" + +Info<< "Creating turbulence model\n" << endl; +autoPtr turbulence +( + incompressible::RASModel::New(U, phi, laminarTransport) +); + +// Kinematic density for buoyancy force +volScalarField rhok +( + IOobject + ( + "rhok", + runTime.timeName(), mesh - ); + ), + 1.0 - beta*(T - TRef) +); - Info<< "Reading field p_rgh\n" << endl; - volScalarField p_rgh +// kinematic turbulent thermal thermal conductivity m2/s +Info<< "Reading field alphat\n" << endl; +volScalarField alphat +( + IOobject ( - IOobject - ( - "p_rgh", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "alphat", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - Info<< "Reading field U\n" << endl; - volVectorField U + +#include "readGravitationalAcceleration.H" +#include "readhRef.H" +#include "gh.H" + + +volScalarField p +( + IOobject ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "p", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + p_rgh + rhok*gh +); - #include "createPhi.H" +label pRefCell = 0; +scalar pRefValue = 0.0; +setRefCell +( + p, + p_rgh, + pimple.dict(), + pRefCell, + pRefValue +); - #include "readTransportProperties.H" - - Info<< "Creating turbulence model\n" << endl; - autoPtr turbulence +if (p_rgh.needReference()) +{ + p += dimensionedScalar ( - incompressible::RASModel::New(U, phi, laminarTransport) + "p", + p.dimensions(), + pRefValue - getRefCellValue(p, pRefCell) ); +} - // Kinematic density for buoyancy force - volScalarField rhok - ( - IOobject - ( - "rhok", - runTime.timeName(), - mesh - ), - 1.0 - beta*(T - TRef) - ); - - // kinematic turbulent thermal thermal conductivity m2/s - Info<< "Reading field alphat\n" << endl; - volScalarField alphat - ( - IOobject - ( - "alphat", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - - #include "readGravitationalAcceleration.H" - #include "readhRef.H" - #include "gh.H" - - - volScalarField p - ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - p_rgh + rhok*gh - ); - - label pRefCell = 0; - scalar pRefValue = 0.0; - setRefCell - ( - p, - p_rgh, - pimple.dict(), - pRefCell, - pRefValue - ); - - if (p_rgh.needReference()) - { - p += dimensionedScalar - ( - "p", - p.dimensions(), - pRefValue - getRefCellValue(p, pRefCell) - ); - } +mesh.setFluxRequired(p_rgh.name()); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H index c54cebc9f4..17306f7d46 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H @@ -1,120 +1,122 @@ - Info<< "Reading thermophysical properties\n" << endl; +Info<< "Reading thermophysical properties\n" << endl; - Info<< "Reading field T\n" << endl; - volScalarField T +Info<< "Reading field T\n" << endl; +volScalarField T +( + IOobject ( - IOobject - ( - "T", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), + "T", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); + +Info<< "Reading field p_rgh\n" << endl; +volScalarField p_rgh +( + IOobject + ( + "p_rgh", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); + +Info<< "Reading field U\n" << endl; +volVectorField U +( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); + +#include "createPhi.H" + +#include "readTransportProperties.H" + +Info<< "Creating turbulence model\n" << endl; +autoPtr turbulence +( + incompressible::RASModel::New(U, phi, laminarTransport) +); + +// Kinematic density for buoyancy force +volScalarField rhok +( + IOobject + ( + "rhok", + runTime.timeName(), mesh - ); + ), + 1.0 - beta*(T - TRef) +); - Info<< "Reading field p_rgh\n" << endl; - volScalarField p_rgh +// kinematic turbulent thermal thermal conductivity m2/s +Info<< "Reading field alphat\n" << endl; +volScalarField alphat +( + IOobject ( - IOobject - ( - "p_rgh", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "alphat", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - Info<< "Reading field U\n" << endl; - volVectorField U + +#include "readGravitationalAcceleration.H" +#include "readhRef.H" +#include "gh.H" + + +volScalarField p +( + IOobject ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "p", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + p_rgh + rhok*gh +); - #include "createPhi.H" +label pRefCell = 0; +scalar pRefValue = 0.0; +setRefCell +( + p, + p_rgh, + simple.dict(), + pRefCell, + pRefValue +); - #include "readTransportProperties.H" - - Info<< "Creating turbulence model\n" << endl; - autoPtr turbulence +if (p_rgh.needReference()) +{ + p += dimensionedScalar ( - incompressible::RASModel::New(U, phi, laminarTransport) + "p", + p.dimensions(), + pRefValue - getRefCellValue(p, pRefCell) ); +} - // Kinematic density for buoyancy force - volScalarField rhok - ( - IOobject - ( - "rhok", - runTime.timeName(), - mesh - ), - 1.0 - beta*(T - TRef) - ); - - // kinematic turbulent thermal thermal conductivity m2/s - Info<< "Reading field alphat\n" << endl; - volScalarField alphat - ( - IOobject - ( - "alphat", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - - #include "readGravitationalAcceleration.H" - #include "readhRef.H" - #include "gh.H" - - - volScalarField p - ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - p_rgh + rhok*gh - ); - - label pRefCell = 0; - scalar pRefValue = 0.0; - setRefCell - ( - p, - p_rgh, - simple.dict(), - pRefCell, - pRefValue - ); - - if (p_rgh.needReference()) - { - p += dimensionedScalar - ( - "p", - p.dimensions(), - pRefValue - getRefCellValue(p, pRefCell) - ); - } +mesh.setFluxRequired(p_rgh.name()); diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H index eaa078c6ad..977fb1542a 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H @@ -1,88 +1,90 @@ - Info<< "Reading thermophysical properties\n" << endl; +Info<< "Reading thermophysical properties\n" << endl; - autoPtr pThermo(rhoThermo::New(mesh)); - rhoThermo& thermo = pThermo(); - thermo.validate(args.executable(), "h", "e"); +autoPtr pThermo(rhoThermo::New(mesh)); +rhoThermo& thermo = pThermo(); +thermo.validate(args.executable(), "h", "e"); - volScalarField rho +volScalarField rho +( + IOobject ( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - thermo.rho() - ); - - volScalarField& p = thermo.p(); - const volScalarField& psi = thermo.psi(); - - - Info<< "Reading field U\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - #include "compressibleCreatePhi.H" - - - Info<< "Creating turbulence model\n" << endl; - autoPtr turbulence - ( - compressible::turbulenceModel::New - ( - rho, - U, - phi, - thermo - ) - ); - - Info<< "Calculating field g.h\n" << endl; - volScalarField gh("gh", g & mesh.C()); - surfaceScalarField ghf("ghf", g & mesh.Cf()); - - Info<< "Reading field p_rgh\n" << endl; - volScalarField p_rgh - ( - IOobject - ( - "p_rgh", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - // Force p_rgh to be consistent with p - p_rgh = p - rho*gh; - - Info<< "Creating field dpdt\n" << endl; - volScalarField dpdt - ( - IOobject - ( - "dpdt", - runTime.timeName(), - mesh - ), + "rho", + runTime.timeName(), mesh, - dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) - ); + IOobject::NO_READ, + IOobject::NO_WRITE + ), + thermo.rho() +); - Info<< "Creating field kinetic energy K\n" << endl; - volScalarField K("K", 0.5*magSqr(U)); +volScalarField& p = thermo.p(); +const volScalarField& psi = thermo.psi(); + + +Info<< "Reading field U\n" << endl; +volVectorField U +( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); + +#include "compressibleCreatePhi.H" + + +Info<< "Creating turbulence model\n" << endl; +autoPtr turbulence +( + compressible::turbulenceModel::New + ( + rho, + U, + phi, + thermo + ) +); + +Info<< "Calculating field g.h\n" << endl; +volScalarField gh("gh", g & mesh.C()); +surfaceScalarField ghf("ghf", g & mesh.Cf()); + +Info<< "Reading field p_rgh\n" << endl; +volScalarField p_rgh +( + IOobject + ( + "p_rgh", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); + +// Force p_rgh to be consistent with p +p_rgh = p - rho*gh; + +mesh.setFluxRequired(p_rgh.name()); + +Info<< "Creating field dpdt\n" << endl; +volScalarField dpdt +( + IOobject + ( + "dpdt", + runTime.timeName(), + mesh + ), + mesh, + dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) +); + +Info<< "Creating field kinetic energy K\n" << endl; +volScalarField K("K", 0.5*magSqr(U)); diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H index f60eb1481c..5b07f643b1 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H @@ -1,86 +1,87 @@ - Info<< "Reading thermophysical properties\n" << endl; +Info<< "Reading thermophysical properties\n" << endl; - autoPtr pThermo(rhoThermo::New(mesh)); - rhoThermo& thermo = pThermo(); - thermo.validate(args.executable(), "h", "e"); +autoPtr pThermo(rhoThermo::New(mesh)); +rhoThermo& thermo = pThermo(); +thermo.validate(args.executable(), "h", "e"); - volScalarField rho +volScalarField rho +( + IOobject ( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - thermo.rho() - ); + "rho", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + thermo.rho() +); - volScalarField& p = thermo.p(); - const volScalarField& psi = thermo.psi(); +volScalarField& p = thermo.p(); +const volScalarField& psi = thermo.psi(); - Info<< "Reading field U\n" << endl; - volVectorField U +Info<< "Reading field U\n" << endl; +volVectorField U +( + IOobject ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - #include "compressibleCreatePhi.H" +#include "compressibleCreatePhi.H" - Info<< "Creating turbulence model\n" << endl; - autoPtr turbulence +Info<< "Creating turbulence model\n" << endl; +autoPtr turbulence +( + compressible::RASModel::New ( - compressible::RASModel::New - ( - rho, - U, - phi, - thermo - ) - ); + rho, + U, + phi, + thermo + ) +); - Info<< "Calculating field g.h\n" << endl; - volScalarField gh("gh", g & mesh.C()); - surfaceScalarField ghf("ghf", g & mesh.Cf()); +Info<< "Calculating field g.h\n" << endl; +volScalarField gh("gh", g & mesh.C()); +surfaceScalarField ghf("ghf", g & mesh.Cf()); - Info<< "Reading field p_rgh\n" << endl; - volScalarField p_rgh +Info<< "Reading field p_rgh\n" << endl; +volScalarField p_rgh +( + IOobject ( - IOobject - ( - "p_rgh", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); + "p_rgh", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - // Force p_rgh to be consistent with p - p_rgh = p - rho*gh; +// Force p_rgh to be consistent with p +p_rgh = p - rho*gh; +label pRefCell = 0; +scalar pRefValue = 0.0; +setRefCell +( + p, + p_rgh, + simple.dict(), + pRefCell, + pRefValue +); - label pRefCell = 0; - scalar pRefValue = 0.0; - setRefCell - ( - p, - p_rgh, - simple.dict(), - pRefCell, - pRefValue - ); +mesh.setFluxRequired(p_rgh.name()); - dimensionedScalar initialMass = fvc::domainIntegrate(rho); - dimensionedScalar totalVolume = sum(mesh.V()); +dimensionedScalar initialMass = fvc::domainIntegrate(rho); +dimensionedScalar totalVolume = sum(mesh.V()); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H index f41f8f97e3..bd7452ae9e 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H @@ -1,222 +1,224 @@ - // Initialise fluid field pointer lists - PtrList thermoFluid(fluidRegions.size()); - PtrList rhoFluid(fluidRegions.size()); - PtrList UFluid(fluidRegions.size()); - PtrList phiFluid(fluidRegions.size()); - PtrList gFluid(fluidRegions.size()); - PtrList turbulence(fluidRegions.size()); - PtrList p_rghFluid(fluidRegions.size()); - PtrList ghFluid(fluidRegions.size()); - PtrList ghfFluid(fluidRegions.size()); - PtrList radiation(fluidRegions.size()); +// Initialise fluid field pointer lists +PtrList thermoFluid(fluidRegions.size()); +PtrList rhoFluid(fluidRegions.size()); +PtrList UFluid(fluidRegions.size()); +PtrList phiFluid(fluidRegions.size()); +PtrList gFluid(fluidRegions.size()); +PtrList turbulence(fluidRegions.size()); +PtrList p_rghFluid(fluidRegions.size()); +PtrList ghFluid(fluidRegions.size()); +PtrList ghfFluid(fluidRegions.size()); +PtrList radiation(fluidRegions.size()); - List initialMassFluid(fluidRegions.size()); - List