... | @@ -13,33 +13,28 @@ |
... | @@ -13,33 +13,28 @@ |
|
`double ouverture_damage= driver.getDamageOpening(); ` | an initial opening must be evaluated, even if the part is virgin. |
|
|
`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. |
|
|
| `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. |
|
|
| `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*. |
|
|
| `curveWriter effdep(filterF); ` | declaration of an output curve: the definition is given in the *main.h*. |
|
|
| `// test_param.setCurveWriter(effdep); ` | ... |
|
|
| `// test_param.setCurveWriter(effdep); ` | set the CurveWriter objet to the driver of the TLS problem. |
|
|
| ` // ls in definition ` | ... |
|
|
| ` 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. |
|
|
| ` xPointToDouble initial_crack=xOppositeP2Double(xSphere(mPoint(xmid , 0.,0.), ouverture_damage)); ` | ... |
|
|
| `test_param.setLsInDef(initial_crack); ` | set the initial level set to the driver of the TLS problem. |
|
|
| `// xPointToDouble initial_crack=xOppositeP2Double(xGrownSegment(mPoint(xmid , 0.,0.), mPoint(xmid , distance_h/2.,0.) , lc*1.01)); ` | ...
|
|
| ` 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) |
|
|
| `test_param.setLsInDef(initial_crack); ` | ... |
|
|
| ` mPoint point2(xmid+distance_a/2.,0.,0.); ` | - |
|
|
| ` // 2 points on both side of the crack at the botom ` | ... |
|
|
| ` std::map < int, Trellis_Util::mPoint > points; ` | declaration of a `map` of point. This map will be a parameter of ` xeExportSensors sensors` below. |
|
|
| ` mPoint point1(xmid-distance_a/2.,0.,0.); ` | ... |
|
|
| ` points[0] = point1; ` | - |
|
|
| ` mPoint point2(xmid+distance_a/2.,0.,0.); ` | ... |
|
|
| ` points[1] = point2; ` | - |
|
|
| ` std::map < int, Trellis_Util::mPoint > points; ` | ... |
|
|
| ` xeExportSensors sensors(0, points); ` | declaration of a sensor in the first direction (x) = direction 0 |
|
|
| ` points[0] = point1; ` | ... |
|
|
| ` double young_modulus = 0.; ` | material parameters must be set in the main file. The main.dat is not used at now. |
|
|
| ` points[1] = point2; ` | ... |
|
|
| ` double poisson = 0.; ` | - |
|
|
| ` xeExportSensors sensors(0, points); ` | ... |
|
|
| ` 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. |
|
|
| ` // test_param.setSensors(sensors); ` | ... |
|
|
| ` 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* |
|
|
| ` double young_modulus = 0.; ` | ... |
|
|
| ` xEvalYoungModulus eval_young(young_modulus); ` | the same for the Young modulus |
|
|
| ` double poisson = 0.; ` | ... |
|
|
| ` xEvalConstant < double > eval_poisson(poisson); ` | the same for the Poisson ratio |
|
|
| ` readYoungPoisson("data/matrix.mat", young_modulus, poisson); ` | ... |
|
|
| ` test_param.setCaractEval(eval_young,eval_poisson,eval_Yc); | set the evaluators to the driver of the TLS problem. |
|
|
| ` // evals young and Yc ` | ... |
|
|
| ` driver.init_test(); ` | initialize the TLS problem. |
|
|
| ` xEvalConstant < double > eval_Yc(damageinfo.getDouble("Yc")); ` | ... |
|
|
| `driver.run_test(); ` | run the TLS problem. |
|
|
| ` xEvalYoungModulus eval_young(young_modulus); ` | ... |
|
|
| `driver.end_test(); ` | end the TLS problem. |
|
|
| ` xEvalConstant < double > eval_poisson(poisson); ` | ... |
|
|
| `} ` | - |
|
|
| ` test_param.setCaractEval(eval_young,eval_poisson,eval_Yc); | ... |
|
|
|
|
| ` driver.init_test(); ` | ... |
|
|
|
|
| `driver.run_test(); ` | ... |
|
|
|
|
| `driver.end_test(); ` | ... |
|
|
|
|
| `} ` | ... |
|
|
|
|
|
|
|
|
|
|
|