diff --git a/models/ColorModel.cpp b/models/ColorModel.cpp index 3d726296..6cd9f195 100644 --- a/models/ColorModel.cpp +++ b/models/ColorModel.cpp @@ -203,6 +203,15 @@ void ScaLBL_ColorModel::ReadParams(string filename){ if (rank==0) printf("WARNING: protocol (core flooding) supports only volumetric flux boundary condition \n"); } domain_db->putScalar( "BC", BoundaryCondition ); + if (color_db->keyExists( "capillary_number" )){ + double capillary_number = color_db->getScalar( "capillary_number" ); + double MuB = rhoB*(tauB - 0.5)/3.0; + double IFT = 6.0*alpha; + double CrossSectionalArea = (double) (nprocx*(Nx-2)*nprocy*(Ny-2)); + flux = Dm->Porosity()*CrossSectionalArea*IFT*capillary_number/MuB; + if (rank==0) printf(" protocol (core flooding): set flux=%f to achieve Ca=%f \n",flux, capillary_number); + } + color_db->putScalar( "flux", flux ); } }