From d53e3bb2649b77a90cc547bc02825fa1da4b5909 Mon Sep 17 00:00:00 2001 From: JamesEMcclure Date: Tue, 24 Sep 2019 14:49:28 -0400 Subject: [PATCH 1/2] fix density in relperm --- models/ColorModel.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/models/ColorModel.cpp b/models/ColorModel.cpp index a31586fe..44fa8fee 100644 --- a/models/ColorModel.cpp +++ b/models/ColorModel.cpp @@ -812,11 +812,11 @@ void ScaLBL_ColorModel::Run(){ double kAeff_connected = h*h*muA*flow_rate_A_connected/(force_mag); double kBeff_connected = h*h*muB*flow_rate_B_connected/(force_mag); - double kAeff_disconnected = h*h*muA*flow_rate_A_disconnected/(rhoA*force_mag); - double kBeff_disconnected = h*h*muB*flow_rate_B_disconnected/(rhoB*force_mag); + double kAeff_disconnected = h*h*muA*flow_rate_A_disconnected/(force_mag); + double kBeff_disconnected = h*h*muB*flow_rate_B_disconnected/(force_mag); - double kAeff = h*h*muA*(flow_rate_A)/(rhoA*force_mag); - double kBeff = h*h*muB*(flow_rate_B)/(rhoB*force_mag); + double kAeff = h*h*muA*(flow_rate_A)/(force_mag); + double kBeff = h*h*muB*(flow_rate_B)/(force_mag); double viscous_pressure_drop = (rhoA*volA + rhoB*volB)*force_mag; double Mobility = muA/muB; From 5ea0b2278c2f749d58f30a8c7ecde8d6c3c469a5 Mon Sep 17 00:00:00 2001 From: JamesEMcclure Date: Tue, 24 Sep 2019 14:54:49 -0400 Subject: [PATCH 2/2] fix label / checker bug --- common/Domain.cpp | 53 ++++++++++++++++++--------------- tests/lbpm_serial_decomp.cpp | 57 ++++++++++++++++++------------------ 2 files changed, 57 insertions(+), 53 deletions(-) diff --git a/common/Domain.cpp b/common/Domain.cpp index 4159a0b3..a2be09e5 100644 --- a/common/Domain.cpp +++ b/common/Domain.cpp @@ -343,6 +343,34 @@ void Domain::Decomp(std::string Filename) } } printf("Read segmented data from %s \n",Filename.c_str()); + + // relabel the data + std::vector LabelCount(ReadValues.size(),0); + for (int k = 0; k 0){ // use checkerboard pattern @@ -470,7 +498,6 @@ void Domain::Decomp(std::string Filename) char *loc_id; loc_id = new char [(nx+2)*(ny+2)*(nz+2)]; - std::vector LabelCount(ReadValues.size(),0); // Set up the sub-domains if (RANK==0){ printf("Distributing subdomains across %i processors \n",nprocs); @@ -503,24 +530,6 @@ void Domain::Decomp(std::string Filename) } } } - // relabel the data - for (k=0;k LabelCount(ReadValues.size(),0); + for (int k = 0; k 0){ // use checkerboard pattern printf("Checkerboard pattern at x inlet for %i layers \n",inlet_count_x); @@ -289,7 +317,6 @@ int main(int argc, char **argv) char *loc_id; loc_id = new char [(nx+2)*(ny+2)*(nz+2)]; - std::vector LabelCount(ReadValues.size(),0); // Set up the sub-domains if (rank==0){ printf("Distributing subdomains across %i processors \n",nprocs); @@ -322,28 +349,6 @@ int main(int argc, char **argv) } } } - // relabel the data - for (k=0;k