Skip to content

Commit 4603ef2

Browse files
committed
Improved SIMPLEC consistency in two-phase flow solver. Only effects flows with gravity and/or surface tension (PIMPLE is still likely better in such cases)
1 parent d1935fc commit 4603ef2

File tree

2 files changed

+6
-4
lines changed
  • fe40/src/solvers/rheoInterFoam
  • of60/src/solvers/rheoInterFoam

2 files changed

+6
-4
lines changed

fe40/src/solvers/rheoInterFoam/pEqn.H

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
rAtU().rename("rAtU");
3737

3838
phi += fvc::interpolate(rAtU() - rAU)*fvc::snGrad(pd)*mesh.magSf();
39-
U -= (rAU - rAtU())*fvc::grad(pd);
39+
U -= (rAU - rAtU()) * fvc::reconstruct( fvc::snGrad(pd) * mesh.magSf() );
4040
}
4141

4242

@@ -66,7 +66,8 @@
6666

6767
if (simplec)
6868
{
69-
U += rAU*fvc::reconstruct(phig/rAUf) - rAtU()*fvc::grad(pd);
69+
surfaceScalarField rAtUf("rAtUf", fvc::interpolate(rAtU()));
70+
U += rAU*fvc::reconstruct(phig/rAUf) - rAtU()*fvc::reconstruct(pdEqn.flux()/rAtUf);
7071
}
7172
else
7273
{

of60/src/solvers/rheoInterFoam/pEqn.H

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
{
4242
rAtU = 1.0/(1.0/rAU() - UEqn.H1());
4343
phiHbyA += fvc::interpolate(rAtU() - rAU())*fvc::snGrad(p_rgh)*mesh.magSf();
44-
HbyA -= (rAU() - rAtU())*fvc::grad(p_rgh);
44+
HbyA -= (rAU() - rAtU()) * fvc::reconstruct( fvc::snGrad(p_rgh) * mesh.magSf() );
4545

4646
// Update the pressure BCs to ensure flux consistency
4747
constrainPressure(p_rgh, U, phiHbyA, rAtU(), MRF);
@@ -78,7 +78,8 @@
7878

7979
if (simplec)
8080
{
81-
U = HbyA + rAU()*fvc::reconstruct(phig/rAUf) - rAtU()*fvc::grad(p_rgh);
81+
surfaceScalarField rAtUf("rAtUf", fvc::interpolate(rAtU()));
82+
U = HbyA + rAU()*fvc::reconstruct(phig/rAUf) - rAtU()*fvc::reconstruct(p_rghEqn.flux()/rAtUf);
8283
}
8384
else
8485
{

0 commit comments

Comments
 (0)