IV.2.4.3 Using predefined criteria
The example given in file “RUBY/EX05/calcHoneyAccel.rb” explains how a predfined criterion can
be calculated. This is done for the “HoneycombAirbusSR” predefined criterion presented in detail in
section X.D.1.2. The operations can be sorted in three steps:
- First the Cauchy Stress Tensor Result is extracted fro a Group of elements:
targetGrp = db.getGroupCopy("pan_PZ_Honey_72")
stress = db.getResultCopy("ORBIT_ONE_MS2_Z","Statics","Stress Tensor",
"ElemCorners",targetGrp,[])
- Then an Array of parameters is prepared:
criterionData=[]
criterionData << db
criterionData << 1.5625
criterionData << 2.41e6
criterionData << 1.41e6
criterionData << "XZ"
criterionData << "YZ"
criterionData << stress
(The reader will easily check that these parameters correspond to those liste in
section X.D.1.2.
- The criterion is calculated by a call to “Post.calcPredefinedCriterion” method:
output=Post.calcPredefinedCriterion("HoneycombAirbusSR",criterionData)
- Finally, the “output” Array returned by the method is exploited:
puts
puts "Worst results in panel +Z honeycomb :"
puts
STDOUT.printf(" on element %d' n",output[0])
STDOUT.printf(" on node %d' n",output[1])
STDOUT.printf(" on layer %d' n",output[2])
STDOUT.printf(" on sub-layer %d' n",output[3])
STDOUT.printf(" SL = %g' n",output[4])
STDOUT.printf(" SW = %g' n",output[5])
STDOUT.printf(" SR max = %g' n",output[6])
puts
Util.printRes(STDOUT,"Honey SR",output[7])
In this case, the “exploitation” consists simply in prints to standard output.
Note that the seventh element of the “output” Array above is the only Result object created and
returned by the predefined criterion. The same object could be obtained by a few ruby statements
like:
shearL=@@stressTensor.deriveTensorToOneScal("Component XZ")
shearW=@@stressTensor.deriveTensorToOneScal("Component YZ")
tmp=sq(shearL/allL)+sq(shearW/allW)
sr=fos*sqrt(tmp)
The computational cost of these few statement can be very important however. Indeed, several
FeResPost Result objects are created by these few lines. One creates consecutively the following result
objects:
-
1.
- One “shearL” scalar Result by extraction of XZ component.
-
2.
- One “shearW” scalar Result by extraction of YZ component.
-
3.
- One “shearL/allL” scalar Result (division by real value).
-
4.
- One “shearW/allW” scalar Result (division by real value).
-
5.
- One “sq(shearL/allL)” scalar Result (scalar Result to the square).
-
6.
- One “sq(shearW/allW)” scalar Result (scalar Result to the square).
-
7.
- One “tmp” Result obtained by summation of two scalar Results.
-
8.
- One “sqrt(tmp)” Result obtaiend by extracting the square root of a scalar Result.
-
9.
- And finally, the “sr” Result, which is the only one that shall be kept.
This means that 8 intermediate Result objects have been created and are discared at the end. Each of the 8
intermediate Result creation involves a loop on all the key-value pairs of the operations
argument(s), and insertion in the new Result. If the initial Cauchy Stress Tensor Result
contains a large number of key-value pairs, the computation cost of this criterion can be very
important.
In the same ruby file, one provides a second computation of the Airbus criterion using the
“interaction” approach:
lStress=stress.deriveTensorToOneScal("Component XZ")
wStress=stress.deriveTensorToOneScal("Component YZ")
criterionData=[]
criterionData << Post.abs(lStress)*(1.5625/2.41e6)
criterionData << 2.0
criterionData << Post.abs(wStress)*(1.5625/1.41e6)
criterionData << 2.0
#~ output=Post.calcPredefinedCriterion("Interaction_2_SR",criterionData)
output=Post.calcPredefinedCriterion("Interaction_N_SR",criterionData)
srMax=output[1].extractResultMax()
maxData=srMax.getData("int","int","int","int","int")[0];
Of couse, this calculation method is less efficient than the previous one. It illustrates however the
calculation of Strength Ratios via interaction of failure criteria.