2010-05-12 13:27:55 +00:00
|
|
|
// Initialise fluid field pointer lists
|
2010-08-26 14:22:03 +00:00
|
|
|
PtrList<basicPsiThermo> thermoFluid(fluidRegions.size());
|
|
|
|
PtrList<volScalarField> rhoFluid(fluidRegions.size());
|
|
|
|
PtrList<volScalarField> KFluid(fluidRegions.size());
|
|
|
|
PtrList<volVectorField> UFluid(fluidRegions.size());
|
|
|
|
PtrList<surfaceScalarField> phiFluid(fluidRegions.size());
|
|
|
|
PtrList<uniformDimensionedVectorField> gFluid(fluidRegions.size());
|
|
|
|
PtrList<compressible::turbulenceModel> turbulence(fluidRegions.size());
|
|
|
|
PtrList<volScalarField> DpDtFluid(fluidRegions.size());
|
2010-05-12 13:27:55 +00:00
|
|
|
|
2010-08-26 14:22:03 +00:00
|
|
|
List<scalar> initialMassFluid(fluidRegions.size());
|
2010-05-12 13:27:55 +00:00
|
|
|
|
|
|
|
// Populate fluid field pointer lists
|
|
|
|
forAll(fluidRegions, i)
|
|
|
|
{
|
|
|
|
Info<< "*** Reading fluid mesh thermophysical properties for region "
|
|
|
|
<< fluidRegions[i].name() << nl << endl;
|
|
|
|
|
2010-08-26 14:22:03 +00:00
|
|
|
Info<< " Adding to thermoFluid\n" << endl;
|
|
|
|
thermoFluid.set
|
2010-05-12 13:27:55 +00:00
|
|
|
(
|
|
|
|
i,
|
2010-08-26 14:22:03 +00:00
|
|
|
basicPsiThermo::New(fluidRegions[i]).ptr()
|
2010-05-12 13:27:55 +00:00
|
|
|
);
|
|
|
|
|
2010-08-26 14:22:03 +00:00
|
|
|
Info<< " Adding to rhoFluid\n" << endl;
|
|
|
|
rhoFluid.set
|
2010-05-12 13:27:55 +00:00
|
|
|
(
|
|
|
|
i,
|
|
|
|
new volScalarField
|
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
|
|
|
"rho",
|
|
|
|
runTime.timeName(),
|
|
|
|
fluidRegions[i],
|
|
|
|
IOobject::NO_READ,
|
|
|
|
IOobject::AUTO_WRITE
|
|
|
|
),
|
2010-08-26 14:22:03 +00:00
|
|
|
thermoFluid[i].rho()
|
2010-05-12 13:27:55 +00:00
|
|
|
)
|
|
|
|
);
|
|
|
|
|
2010-08-26 14:22:03 +00:00
|
|
|
Info<< " Adding to KFluid\n" << endl;
|
|
|
|
KFluid.set
|
2010-05-12 13:27:55 +00:00
|
|
|
(
|
|
|
|
i,
|
|
|
|
new volScalarField
|
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
|
|
|
"K",
|
|
|
|
runTime.timeName(),
|
|
|
|
fluidRegions[i],
|
|
|
|
IOobject::NO_READ,
|
|
|
|
IOobject::NO_WRITE
|
|
|
|
),
|
2010-08-26 14:22:03 +00:00
|
|
|
thermoFluid[i].Cp()*thermoFluid[i].alpha()
|
2010-05-12 13:27:55 +00:00
|
|
|
)
|
|
|
|
);
|
|
|
|
|
2010-08-26 14:22:03 +00:00
|
|
|
Info<< " Adding to UFluid\n" << endl;
|
|
|
|
UFluid.set
|
2010-05-12 13:27:55 +00:00
|
|
|
(
|
|
|
|
i,
|
|
|
|
new volVectorField
|
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
|
|
|
"U",
|
|
|
|
runTime.timeName(),
|
|
|
|
fluidRegions[i],
|
|
|
|
IOobject::MUST_READ,
|
|
|
|
IOobject::AUTO_WRITE
|
|
|
|
),
|
|
|
|
fluidRegions[i]
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
2010-08-26 14:22:03 +00:00
|
|
|
Info<< " Adding to phiFluid\n" << endl;
|
|
|
|
phiFluid.set
|
2010-05-12 13:27:55 +00:00
|
|
|
(
|
|
|
|
i,
|
|
|
|
new surfaceScalarField
|
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
|
|
|
"phi",
|
|
|
|
runTime.timeName(),
|
|
|
|
fluidRegions[i],
|
|
|
|
IOobject::READ_IF_PRESENT,
|
|
|
|
IOobject::AUTO_WRITE
|
|
|
|
),
|
2010-08-26 14:22:03 +00:00
|
|
|
linearInterpolate(rhoFluid[i]*UFluid[i])
|
2010-05-12 13:27:55 +00:00
|
|
|
& fluidRegions[i].Sf()
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
2010-08-26 14:22:03 +00:00
|
|
|
Info<< " Adding to gFluid\n" << endl;
|
|
|
|
gFluid.set
|
|
|
|
(
|
|
|
|
i,
|
|
|
|
new uniformDimensionedVectorField
|
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
|
|
|
"g",
|
|
|
|
runTime.constant(),
|
|
|
|
fluidRegions[i],
|
|
|
|
IOobject::MUST_READ,
|
|
|
|
IOobject::NO_WRITE
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
Info<< " Adding to turbulence\n" << endl;
|
|
|
|
turbulence.set
|
2010-05-12 13:27:55 +00:00
|
|
|
(
|
|
|
|
i,
|
2010-08-26 14:22:03 +00:00
|
|
|
autoPtr<compressible::turbulenceModel>
|
2010-05-12 13:27:55 +00:00
|
|
|
(
|
2010-08-26 14:22:03 +00:00
|
|
|
compressible::turbulenceModel::New
|
2010-05-12 13:27:55 +00:00
|
|
|
(
|
2010-08-26 14:22:03 +00:00
|
|
|
rhoFluid[i],
|
|
|
|
UFluid[i],
|
|
|
|
phiFluid[i],
|
|
|
|
thermoFluid[i]
|
2010-05-12 13:27:55 +00:00
|
|
|
)
|
|
|
|
).ptr()
|
|
|
|
);
|
|
|
|
|
2010-08-26 14:22:03 +00:00
|
|
|
Info<< " Adding to DpDtFluid\n" << endl;
|
|
|
|
DpDtFluid.set
|
2010-05-12 13:27:55 +00:00
|
|
|
(
|
|
|
|
i,
|
|
|
|
new volScalarField
|
|
|
|
(
|
2010-08-26 14:22:03 +00:00
|
|
|
"DpDt",
|
2010-05-12 13:27:55 +00:00
|
|
|
fvc::DDt
|
|
|
|
(
|
|
|
|
surfaceScalarField
|
|
|
|
(
|
|
|
|
"phiU",
|
2010-08-26 14:22:03 +00:00
|
|
|
phiFluid[i]/fvc::interpolate(rhoFluid[i])
|
2010-05-12 13:27:55 +00:00
|
|
|
),
|
2010-08-26 14:22:03 +00:00
|
|
|
thermoFluid[i].p()
|
2010-05-12 13:27:55 +00:00
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
2010-08-26 14:22:03 +00:00
|
|
|
initialMassFluid[i] = fvc::domainIntegrate(rhoFluid[i]).value();
|
2010-05-12 13:27:55 +00:00
|
|
|
}
|