mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
reactingMultiphaseEulerFoam: Updated using new pair "loop" structure
This commit is contained in:
@ -60,23 +60,17 @@ 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();
|
{
|
||||||
|
const phaseModel& otherPhase = pair.other(phase);
|
||||||
|
|
||||||
forAllConstIter(phasePair, pair, iter)
|
|
||||||
{
|
|
||||||
if (phase1 == &phase)
|
|
||||||
{
|
|
||||||
UEqns[phasei] +=
|
UEqns[phasei] +=
|
||||||
Vm
|
Vm
|
||||||
*(
|
*(
|
||||||
UgradUs[phasei]
|
UgradUs[phasei]
|
||||||
- (UgradUs[phase2->index()] & phase2->U())
|
- (UgradUs[otherPhase.index()] & otherPhase.U())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Swap(phase1, phase2);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UEqns[phasei].relax();
|
UEqns[phasei].relax();
|
||||||
|
|||||||
@ -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] +=
|
phiHbyAs[phasei] +=
|
||||||
rAUfs[phasei]*Kf*MRF.absolute(phase2->phi());
|
rAUfs[phasei]*Kf*MRF.absolute(pair.other(phase).phi());
|
||||||
}
|
|
||||||
|
|
||||||
Swap(phase1, phase2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -221,23 +213,15 @@ 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] +=
|
phiHbyAs[phasei] +=
|
||||||
rAUfs[phasei]
|
rAUfs[phasei]
|
||||||
*(
|
*(
|
||||||
Vmf*byDt(MRF.absolute(phase1->phi()().oldTime()))
|
Vmf*byDt(MRF.absolute(phase.phi().oldTime()))
|
||||||
+ Vmf*ddtPhis[phase2->index()]
|
+ Vmf*ddtPhis[pair.other(phase).index()]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Swap(phase1, phase2);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
phiHbyA += alphafs[phasei]*phiHbyAs[phasei];
|
phiHbyA += alphafs[phasei]*phiHbyAs[phasei];
|
||||||
|
|||||||
Reference in New Issue
Block a user