mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
52 lines
1.0 KiB
C
52 lines
1.0 KiB
C
fvSolution solutionDict(runTime);
|
|
|
|
bool coupled(solutionDict.getOrDefault("coupledEnergyField", false));
|
|
|
|
autoPtr<fvMatrix<scalar>> fvMatrixAssemblyPtr;
|
|
|
|
forAll(fluidRegions, i)
|
|
{
|
|
const rhoThermo& thermo = refCast<const rhoThermo>(thermoFluid[i]);
|
|
const auto& bpsi = thermo.T().boundaryField();
|
|
|
|
forAll (bpsi, patchI)
|
|
{
|
|
if (bpsi[patchI].useImplicit())
|
|
{
|
|
coupled = true;
|
|
}
|
|
}
|
|
}
|
|
|
|
forAll(solidRegions, i)
|
|
{
|
|
solidThermo& thermo = thermos[i];
|
|
const auto& bpsi = thermo.T().boundaryField();
|
|
|
|
forAll (bpsi, patchI)
|
|
{
|
|
if (bpsi[patchI].useImplicit())
|
|
{
|
|
coupled = true;
|
|
}
|
|
}
|
|
}
|
|
|
|
forAll(fluidRegions, i)
|
|
{
|
|
const rhoThermo& thermo = refCast<const rhoThermo>(thermoFluid[i]);
|
|
if (coupled)
|
|
{
|
|
Info << "Create fvMatrixAssembly." << endl;
|
|
fvMatrixAssemblyPtr.reset
|
|
(
|
|
new fvMatrix<scalar>
|
|
(
|
|
thermo.he(),
|
|
dimEnergy/dimTime
|
|
)
|
|
);
|
|
break;
|
|
}
|
|
}
|