reactingMultiphaseEulerFoam: Updated using new pair "loop" structure
This commit is contained in:
@ -60,22 +60,16 @@ PtrList<fvVectorMatrix> UEqns(phases.size());
|
|||||||
|
|
||||||
const phasePair& pair(fluid.phasePairs()[VmIter.key()]);
|
const phasePair& pair(fluid.phasePairs()[VmIter.key()]);
|
||||||
|
|
||||||
const phaseModel* phase1 = &pair.phase1();
|
if (pair.contains(phase))
|
||||||
const phaseModel* phase2 = &pair.phase2();
|
|
||||||
|
|
||||||
forAllConstIter(phasePair, pair, iter)
|
|
||||||
{
|
{
|
||||||
if (phase1 == &phase)
|
const phaseModel& otherPhase = pair.other(phase);
|
||||||
{
|
|
||||||
UEqns[phasei] +=
|
|
||||||
Vm
|
|
||||||
*(
|
|
||||||
UgradUs[phasei]
|
|
||||||
- (UgradUs[phase2->index()] & phase2->U())
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Swap(phase1, phase2);
|
UEqns[phasei] +=
|
||||||
|
Vm
|
||||||
|
*(
|
||||||
|
UgradUs[phasei]
|
||||||
|
- (UgradUs[otherPhase.index()] & otherPhase.U())
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -194,18 +194,10 @@ while (pimple.correct())
|
|||||||
|
|
||||||
const phasePair& pair(fluid.phasePairs()[KdfIter.key()]);
|
const phasePair& pair(fluid.phasePairs()[KdfIter.key()]);
|
||||||
|
|
||||||
const phaseModel* phase1 = &pair.phase1();
|
if (pair.contains(phase))
|
||||||
const phaseModel* phase2 = &pair.phase2();
|
|
||||||
|
|
||||||
forAllConstIter(phasePair, pair, iter)
|
|
||||||
{
|
{
|
||||||
if (phase1 == &phase)
|
phiHbyAs[phasei] +=
|
||||||
{
|
rAUfs[phasei]*Kf*MRF.absolute(pair.other(phase).phi());
|
||||||
phiHbyAs[phasei] +=
|
|
||||||
rAUfs[phasei]*Kf*MRF.absolute(phase2->phi());
|
|
||||||
}
|
|
||||||
|
|
||||||
Swap(phase1, phase2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -221,22 +213,14 @@ while (pimple.correct())
|
|||||||
|
|
||||||
const phasePair& pair(fluid.phasePairs()[VmfIter.key()]);
|
const phasePair& pair(fluid.phasePairs()[VmfIter.key()]);
|
||||||
|
|
||||||
const phaseModel* phase1 = &pair.phase1();
|
if (pair.contains(phase))
|
||||||
const phaseModel* phase2 = &pair.phase2();
|
|
||||||
|
|
||||||
forAllConstIter(phasePair, pair, iter)
|
|
||||||
{
|
{
|
||||||
if (phase1 == &phase)
|
phiHbyAs[phasei] +=
|
||||||
{
|
rAUfs[phasei]
|
||||||
phiHbyAs[phasei] +=
|
*(
|
||||||
rAUfs[phasei]
|
Vmf*byDt(MRF.absolute(phase.phi().oldTime()))
|
||||||
*(
|
+ Vmf*ddtPhis[pair.other(phase).index()]
|
||||||
Vmf*byDt(MRF.absolute(phase1->phi()().oldTime()))
|
);
|
||||||
+ Vmf*ddtPhis[phase2->index()]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Swap(phase1, phase2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user