further regulate the phase field
This commit is contained in:
parent
e73a466b5f
commit
ea64630cc7
@ -161,6 +161,9 @@ extern "C" void ScaLBL_D3Q7_AAodd_FreeLeeModel_PhaseField(int *neighborList, int
|
|||||||
fq = hq[nread];
|
fq = hq[nread];
|
||||||
phi += fq;
|
phi += fq;
|
||||||
|
|
||||||
|
if (phi > 1.f) phi = 1.0;
|
||||||
|
if (phi < -1.f) phi = -1.0;
|
||||||
|
|
||||||
// save the number densities
|
// save the number densities
|
||||||
Den[n] = rhoA + 0.5*(1.0-phi)*(rhoB-rhoA);
|
Den[n] = rhoA + 0.5*(1.0-phi)*(rhoB-rhoA);
|
||||||
|
|
||||||
@ -207,6 +210,9 @@ extern "C" void ScaLBL_D3Q7_AAeven_FreeLeeModel_PhaseField(int *Map, double *hq,
|
|||||||
fq = hq[5*Np+n];
|
fq = hq[5*Np+n];
|
||||||
phi += fq;
|
phi += fq;
|
||||||
|
|
||||||
|
if (phi > 1.f) phi = 1.0;
|
||||||
|
if (phi < -1.f) phi = -1.0;
|
||||||
|
|
||||||
// save the number densities
|
// save the number densities
|
||||||
Den[n] = rhoA + 0.5*(1.0-phi)*(rhoB-rhoA);
|
Den[n] = rhoA + 0.5*(1.0-phi)*(rhoB-rhoA);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user