diff --git a/src/main.cpp b/src/main.cpp index a494dc7..201d0ce 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -20,9 +20,9 @@ int main(int argc, char* argv[]) bool WarmStartingFlag = false; int Resolution = 0; - double nu1 = 0.0, nu2 = 0.0, CompositeYoungs = 0.0, CompositePoissonsRatio = 0.0, alpha = 0.0, - ElasticComplianceCorrection = 0.0, GridSize = 0.0, Tolerance = 0.0, E1 = 0.0, E2 = 0.0, - LateralLength = 0.0, Delta = 0.0; + double nu1 = 0.0, nu2 = 0.0, CompositeYoungs = 0.0, CompositePoissonsRatio = 0.0, + ShapeFactor = 0.0, ElasticComplianceCorrection = 0.0, GridSize = 0.0, Tolerance = 0.0, + E1 = 0.0, E2 = 0.0, LateralLength = 0.0, Delta = 0.0; bool RandomTopologyFlag = false; bool RandomSeedFlag = false; double Hurst = 0.0; @@ -33,9 +33,9 @@ int main(int argc, char* argv[]) bool PressureGreenFunFlag = false; MIRCO::SetParameters(E1, E2, LateralLength, nu1, nu2, CompositeYoungs, CompositePoissonsRatio, - alpha, ElasticComplianceCorrection, GridSize, Tolerance, Delta, TopologyFilePath, Resolution, - InitialTopologyStdDeviation, inputFileName, RandomTopologyFlag, Hurst, RandomSeedFlag, - RandomGeneratorSeed, WarmStartingFlag, MaxIteration, PressureGreenFunFlag); + ShapeFactor, ElasticComplianceCorrection, GridSize, Tolerance, Delta, TopologyFilePath, + Resolution, InitialTopologyStdDeviation, inputFileName, RandomTopologyFlag, Hurst, + RandomSeedFlag, RandomGeneratorSeed, WarmStartingFlag, MaxIteration, PressureGreenFunFlag); // Identical Vectors/Matricies, therefore only created one here. int ngrid = int(ceil((LateralLength - (GridSize / 2)) / GridSize)); diff --git a/src/mirco_setparameters.cpp b/src/mirco_setparameters.cpp index b720cb3..4beb8dc 100644 --- a/src/mirco_setparameters.cpp +++ b/src/mirco_setparameters.cpp @@ -10,7 +10,7 @@ #include "mirco_filesystem_utils.h" void MIRCO::SetParameters(double& E1, double& E2, double& LateralLength, double& nu1, double& nu2, - double& CompositeYoungs, double& CompositePoissonsRatio, double& alpha, + double& CompositeYoungs, double& CompositePoissonsRatio, double& ShapeFactor, double& ElasticComplianceCorrection, double& GridSize, double& Tolerance, double& Delta, std::string& TopologyFilePath, int& Resolution, double& InitialTopologyStdDeviation, const std::string& inputFileName, bool& RandomTopologyFlag, double& Hurst, bool& RandomSeedFlag, @@ -51,19 +51,23 @@ void MIRCO::SetParameters(double& E1, double& E2, double& LateralLength, double& // Composite Poisson's ratio CompositePoissonsRatio = CompositeYoungs / (2 * CompositeShear) - 1; - // Correction factor vectors - // These are the correction factors to calculate the elastic compliance of the micro-scale contact - // constitutive law for various resolutions. + // Shape factors (See section 3.3 of https://doi.org/10.1007/s00466-019-01791-3) + // These are the shape factors to calculate the elastic compliance correction of the micro-scale + // contact constitutive law for various resolutions. + // NOTE: Currently MIRCO works for resouluion of 1 to 8. The following vectors store the shape + // factors for resolution of 1 to 8. + // The following pressure based constants are calculated by solving a flat indentor problem using // the pressure based Green function described in Pohrt and Li (2014). // http://dx.doi.org/10.1134/s1029959914040109 - std::vector alpha_con_pressure{0.961389237917602, 0.924715342432435, 0.899837531880697, - 0.884976751041942, 0.876753783192863, 0.872397956576882, 0.871958228537090, + const std::vector shape_factors_pressure{0.961389237917602, 0.924715342432435, + 0.899837531880697, 0.884976751041942, 0.876753783192863, 0.872397956576882, 0.871958228537090, 0.882669916668780}; + // The following force based constants are taken from Table 1 of Bonari et al. (2020). // https://doi.org/10.1007/s00466-019-01791-3 - std::vector alpha_con_force{0.778958541513360, 0.805513388666376, 0.826126871395416, - 0.841369158110513, 0.851733020725652, 0.858342234203154, 0.862368243479785, + const std::vector shape_factors_force{0.778958541513360, 0.805513388666376, + 0.826126871395416, 0.841369158110513, 0.851733020725652, 0.858342234203154, 0.862368243479785, 0.864741597831785}; // Setting up the geometrical parameters. @@ -79,13 +83,13 @@ void MIRCO::SetParameters(double& E1, double& E2, double& LateralLength, double& if (PressureGreenFunFlag) { - alpha = alpha_con_pressure[Resolution - 1]; + ShapeFactor = shape_factors_pressure[Resolution - 1]; } else { - alpha = alpha_con_force[Resolution - 1]; + ShapeFactor = shape_factors_force[Resolution - 1]; } - ElasticComplianceCorrection = LateralLength * CompositeYoungs / alpha; + ElasticComplianceCorrection = LateralLength * CompositeYoungs / ShapeFactor; GridSize = LateralLength / (pow(2, Resolution) + 1); }