force tuning for auto relperm

This commit is contained in:
James E McClure
2018-10-28 10:17:47 -04:00
parent 757805628c
commit a016ae6b42

View File

@@ -552,7 +552,9 @@ void ScaLBL_ColorModel::Run(){
if (lead_timesteps > 5000){
Fz *= capillary_number / Ca;
if (Fz > 1e-3) Fz = 1e-3; // impose ceiling for stability
if (Fz < 1e-6) Fz = 1e-6; // impose floor so we don't do something super dumb
if (Fz < 1e-7) Fz = 1e-6; // impose floor so we don't do something super dumb
if (Fz*vA_z < 0.f || Fz*vB_z < 0.f)
Fz *= 2.f; // bigger forces are needed if flow rate is "too small"
tolerance = fabs(capillary_number - Ca) / capillary_number ;
if (rank == 0) printf(" -- adjust force by %f \n ",tolerance);
}