... | ... | @@ -13,33 +13,28 @@ |
|
|
`double ouverture_damage= driver.getDamageOpening(); ` | an initial opening must be evaluated, even if the part is virgin. |
|
|
|
| `double lc = damageinfo.getDouble("lc"); ` | return a parameter read by the parser. |
|
|
|
| (...) | ... |
|
|
|
| `xAcceptRangeXY filterF(xmid-distance_c/2.,xmid+distance_c/2.,distance_h+distance_c-epsilon,distance_h+distance_c+epsilon); ` | create a filter to evaluate a mean displacement on a physical zone (given to `curveWriter` below. |
|
|
|
| `xAcceptRangeXY filterF(xmid-distance_c/2.,xmid+distance_c/2.,distance_h+distance_c-epsilon,distance_h+distance_c+epsilon); ` | create a filter to evaluate a mean displacement on a physical zone ( will be a parameter of `curveWriter` below). |
|
|
|
| `test_param.setRefLoadFactor(distance_c * specimen_thickness); ` | resize the reference load factor, here for 2D problem : pressure has to be converted to force. |
|
|
|
| `curveWriter effdep(filterF); ` | declaration of an output curve: the definition is given in the *main.h*. |
|
|
|
| `// test_param.setCurveWriter(effdep); ` | ... |
|
|
|
| ` // ls in definition ` | ... |
|
|
|
| ` xPointToDouble initial_crack=xOppositeP2Double(xSphere(mPoint(xmid , 0.,0.), ouverture_damage)); ` | ... |
|
|
|
| `// xPointToDouble initial_crack=xOppositeP2Double(xGrownSegment(mPoint(xmid , 0.,0.), mPoint(xmid , distance_h/2.,0.) , lc*1.01)); ` | ...
|
|
|
| `test_param.setLsInDef(initial_crack); ` | ... |
|
|
|
| ` // 2 points on both side of the crack at the botom ` | ... |
|
|
|
| ` mPoint point1(xmid-distance_a/2.,0.,0.); ` | ... |
|
|
|
| ` mPoint point2(xmid+distance_a/2.,0.,0.); ` | ... |
|
|
|
| ` std::map < int, Trellis_Util::mPoint > points; ` | ... |
|
|
|
| ` points[0] = point1; ` | ... |
|
|
|
| ` points[1] = point2; ` | ... |
|
|
|
| ` xeExportSensors sensors(0, points); ` | ... |
|
|
|
| ` // test_param.setSensors(sensors); ` | ... |
|
|
|
| ` double young_modulus = 0.; ` | ... |
|
|
|
| ` double poisson = 0.; ` | ... |
|
|
|
| ` readYoungPoisson("data/matrix.mat", young_modulus, poisson); ` | ... |
|
|
|
| ` // evals young and Yc ` | ... |
|
|
|
| ` xEvalConstant < double > eval_Yc(damageinfo.getDouble("Yc")); ` | ... |
|
|
|
| ` xEvalYoungModulus eval_young(young_modulus); ` | ... |
|
|
|
| ` xEvalConstant < double > eval_poisson(poisson); ` | ... |
|
|
|
| ` test_param.setCaractEval(eval_young,eval_poisson,eval_Yc); | ... |
|
|
|
| ` driver.init_test(); ` | ... |
|
|
|
| `driver.run_test(); ` | ... |
|
|
|
| `driver.end_test(); ` | ... |
|
|
|
| `} ` | ... |
|
|
|
| `// test_param.setCurveWriter(effdep); ` | set the CurveWriter objet to the driver of the TLS problem. |
|
|
|
| ` xPointToDouble initial_crack=xOppositeP2Double(xSphere(mPoint(xmid , 0.,0.), ouverture_damage)); ` | declare an initial level set: it must be a pre-damaged zone or a fictivious zone, but the declaration is mandatory. |
|
|
|
| `test_param.setLsInDef(initial_crack); ` | set the initial level set to the driver of the TLS problem. |
|
|
|
| ` mPoint point1(xmid-distance_a/2.,0.,0.); ` | create two points arround the crack lips to evaluate the opening (if the initiation zone is known a fortiori) |
|
|
|
| ` mPoint point2(xmid+distance_a/2.,0.,0.); ` | - |
|
|
|
| ` std::map < int, Trellis_Util::mPoint > points; ` | declaration of a `map` of point. This map will be a parameter of ` xeExportSensors sensors` below. |
|
|
|
| ` points[0] = point1; ` | - |
|
|
|
| ` points[1] = point2; ` | - |
|
|
|
| ` xeExportSensors sensors(0, points); ` | declaration of a sensor in the first direction (x) = direction 0 |
|
|
|
| ` double young_modulus = 0.; ` | material parameters must be set in the main file. The main.dat is not used at now. |
|
|
|
| ` double poisson = 0.; ` | - |
|
|
|
| ` readYoungPoisson("data/matrix.mat", young_modulus, poisson); ` | after declaration, the parameters are read in a file. For multiple material problem, this had to be done as such as their are materials. |
|
|
|
| ` xEvalConstant < double > eval_Yc(damageinfo.getDouble("Yc")); ` | declare a evaluator for the energy release rate of the material, initialized with the parameter given in the *damageinfo.dat* |
|
|
|
| ` xEvalYoungModulus eval_young(young_modulus); ` | the same for the Young modulus |
|
|
|
| ` xEvalConstant < double > eval_poisson(poisson); ` | the same for the Poisson ratio |
|
|
|
| ` test_param.setCaractEval(eval_young,eval_poisson,eval_Yc); | set the evaluators to the driver of the TLS problem. |
|
|
|
| ` driver.init_test(); ` | initialize the TLS problem. |
|
|
|
| `driver.run_test(); ` | run the TLS problem. |
|
|
|
| `driver.end_test(); ` | end the TLS problem. |
|
|
|
| `} ` | - |
|
|
|
|
|
|
|