mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'issue-911' into 'master'
Issue 911 Closes #911 See merge request Development/OpenFOAM-plus!212
This commit is contained in:
@ -2,31 +2,32 @@
|
|||||||
if (pimple.nCorrPIMPLE() > 1)
|
if (pimple.nCorrPIMPLE() > 1)
|
||||||
{
|
{
|
||||||
// If nOuterCorrectors > 1 then for all but the first loop the advection
|
// If nOuterCorrectors > 1 then for all but the first loop the advection
|
||||||
// of alpha is done using an average, 0.5*phi+0.5*phiNew where phi is
|
// of alpha is done using an average, 0.5*phi+0.5*phiNew where phi is
|
||||||
// the flux at the beginning of the time step and phiNew is the flux
|
// the flux at the beginning of the time step and phiNew is the flux
|
||||||
// estimate at the end of the time step from the previous outer
|
// estimate at the end of the time step from the previous outer
|
||||||
// iteration. Similarly we use 0.5*U + 0.5*UNew in later iterations.
|
// iteration. Similarly we use 0.5*U + 0.5*UNew in later iterations.
|
||||||
if (pimple.firstIter())
|
if (pimple.firstIter())
|
||||||
{
|
{
|
||||||
// To recalculate the alpha1 update in subsequent iterations, we
|
// To recalculate the alpha1 update in subsequent iterations, we
|
||||||
// must store its current value before overwriting with the new
|
// must store its current value before overwriting with the new
|
||||||
// value
|
// value
|
||||||
alpha1.prevIter();
|
alpha1.storePrevIter();
|
||||||
// Storing initial phi and U for use in later outer iterations.
|
// Storing initial phi and U for use in later outer iterations.
|
||||||
phi.storePrevIter();
|
phi.storePrevIter();
|
||||||
U.storePrevIter();
|
U.storePrevIter();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Resetting alpha1 to value before advection in first PIMPLE
|
// Resetting alpha1 to value before advection in first PIMPLE
|
||||||
// iteration.
|
// iteration.
|
||||||
alpha1 = alpha1.prevIter();
|
alpha1 = alpha1.prevIter();
|
||||||
|
|
||||||
// Setting U and phi with which to advect interface.
|
// Setting U and phi with which to advect interface.
|
||||||
U = 0.5*U.prevIter() + 0.5*U;
|
U = 0.5*U.prevIter() + 0.5*U;
|
||||||
phi = 0.5*phi.prevIter() + 0.5*phi;
|
phi = 0.5*phi.prevIter() + 0.5*phi;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Updating alpha1
|
// Updating alpha1
|
||||||
advector.advect();
|
advector.advect();
|
||||||
#include "rhofs.H"
|
#include "rhofs.H"
|
||||||
|
|||||||
Reference in New Issue
Block a user