chtMultiRegionFoam: Corrected multiple fluid region support for nEcorr

Resolves bug-report https://bugs.openfoam.org/view.php?id=3799
This commit is contained in:
Henry Weller
2022-02-04 15:05:53 +00:00
parent c8cecdfff4
commit 66600b5497
3 changed files with 5 additions and 4 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -88,7 +88,7 @@ int main(int argc, char *argv[])
// --- PIMPLE loop
while (pimples.loop())
{
tmp<fvVectorMatrix> tUEqn;
List<tmp<fvVectorMatrix>> UEqns(fluidRegions.size());
for(int Ecorr=0; Ecorr<nEcorr; Ecorr++)
{

View File

@ -2,7 +2,7 @@
MRF.correctBoundaryVelocity(U);
tUEqn =
UEqns[i] =
(
fvm::ddt(rho, U) + fvm::div(phi, U)
+ MRF.DDt(rho, U)
@ -10,7 +10,7 @@
==
fvModels.source(rho, U)
);
fvVectorMatrix& UEqn = tUEqn.ref();
fvVectorMatrix& UEqn = UEqns[i].ref();
UEqn.relax();

View File

@ -46,6 +46,7 @@ else
if (Ecorr == nEcorr - 1)
{
tmp<fvVectorMatrix>& tUEqn = UEqns[i];
fvVectorMatrix& UEqn = tUEqn.ref();
// --- PISO loop