From ce57491bce577fdf2ff8c7c27c5cb0000b266842 Mon Sep 17 00:00:00 2001 From: James McClure Date: Sun, 7 Nov 2021 07:55:15 -0500 Subject: [PATCH 1/2] never rescale unsteady cases --- models/ColorModel.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/models/ColorModel.cpp b/models/ColorModel.cpp index 8f924aa2..7b5024f3 100644 --- a/models/ColorModel.cpp +++ b/models/ColorModel.cpp @@ -745,6 +745,8 @@ double ScaLBL_ColorModel::Run(int returntime){ if (CURRENT_TIMESTEP >= MAX_STEADY_TIMESTEPS) isSteady = true; + if (BC != 0 ) isSteady = false; // Never rescale unsteady simulation cases + if (isSteady && (Ca > maxCa || Ca < minCa) && SET_CAPILLARY_NUMBER ){ /* re-run the point if the actual Ca is too far from the target Ca */ isSteady = false; From 1fe39b82231670e840e1250cda404175b28849fa Mon Sep 17 00:00:00 2001 From: James McClure Date: Sun, 7 Nov 2021 07:56:18 -0500 Subject: [PATCH 2/2] never rescale unsteady cases --- models/ColorModel.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/models/ColorModel.cpp b/models/ColorModel.cpp index 7b5024f3..df27a8f2 100644 --- a/models/ColorModel.cpp +++ b/models/ColorModel.cpp @@ -707,7 +707,7 @@ double ScaLBL_ColorModel::Run(int returntime){ analysis.basic(timestep, current_db, *Averages, Phi, Pressure, Velocity, fq, Den ); // allow initial ramp-up to get closer to steady state CURRENT_TIMESTEP += 2; - if (CURRENT_TIMESTEP > MIN_STEADY_TIMESTEPS){ + if (CURRENT_TIMESTEP > MIN_STEADY_TIMESTEPS && BC == 0){ analysis.finish(); double volB = Averages->gwb.V; @@ -744,9 +744,7 @@ double ScaLBL_ColorModel::Run(int returntime){ isSteady = true; if (CURRENT_TIMESTEP >= MAX_STEADY_TIMESTEPS) isSteady = true; - - if (BC != 0 ) isSteady = false; // Never rescale unsteady simulation cases - + if (isSteady && (Ca > maxCa || Ca < minCa) && SET_CAPILLARY_NUMBER ){ /* re-run the point if the actual Ca is too far from the target Ca */ isSteady = false;