IV.2.5.3 Calculation of a total force and moment
One explains here how the resulting global force and moment can be calculated from distributed
force and moments. This example illustrates the use of method “calcResultingFM” in class
“Result”.
The ruby function that performs the calculation of the total force and moments looks like
follows:
def calcOneGlobFM(db,lcName,scName,elemGrp,nodeGrp,locCS,coords)
# Target Group :
targetGrp = Group.new()
tmpNodeGrp=db.getNodesAssociatedToElements(elemGrp)
targetGrp = tmpNodeGrp * nodeGrp
tmpElemGrp=db.getElementsAssociatedToNodes(targetGrp)
targetGrp += tmpElemGrp * elemGrp
# Inspecting and reading Results :
tpNameF = "Grid Point Forces, Internal Forces"
tpNameM = "Grid Point Forces, Internal Moments"
tmpF = db.getResultCopy(lcName,scName,tpNameF,"ElemNodes",targetGrp,[])
tmpM = db.getResultCopy(lcName,scName,tpNameM,"ElemNodes",targetGrp,[])
resFM = Result.calcResultingFM(db,tmpF,tmpM,locCS,coords)
return resFM
end
The arguments of the function are:
-
1.
- “db”, the DataBase given as argument to “calcResultingFM”.
-
2.
- “lcName”, a String containing the name of the load case for which the results are
retrieved.
-
3.
- “scName”, a String containing the name of the sub-case for which the results are
retrieved.
-
4.
- “elemGrp”, a Group containing the elements from which one recovers the local forces
and moments.
-
5.
- “nodeGrp”, a Group containing the nodes on which the forces will be recovered.
-
6.
- “locCS”, the coordinate system in which results are recovered. Its value can be of integer
or CoordSys type.
-
7.
- “coords”, an Array of three Real values containing the coordinates of the recovery point
expressed in the coordinate system.
The function builds a Group called “targetGrp” containing the list of elements and nodes on which Grid
Point Forces and Moments are recovered. To reduce the computation cost, the targetGrp object
contains only the elements and nodes on which the results are recovered. One this Group is
defined, one recovers the corresponding Force and Moment fields, and an appropriate call to
“Result.calcResultingFM” calculates the resulting total force and moment which are returned by the
function.
The main part of the example consists in building the DataBase, loading the Results and
performing the calculations for any combination of three load cases and six interfaces. The definition
of load cases and interfaces are done as follows:
lcNames = ["LAUNCH_ONE_MS2_X", "LAUNCH_ONE_MS2_Y", "LAUNCH_ONE_MS2_Z"]
scName = "Statics"
interfaces=Array.new()
interfaces << ["pan_PZ", "fitting_PXMYMZ",1001,[ 0.440000,-0.440, 0.6445]]
interfaces << ["pan_PZ", "fitting_MXMZ", 1001,[-0.426667, 0.000, 0.6445]]
interfaces << ["pan_SUP","fitting_MXMYPZ",1002,[ 0.310835,-120.0, 1.4000]]
interfaces << ["pan_SUP","fitting_PXPZ", 1002,[ 0.310835, 0.0, 1.4000]]
interfaces << ["pan_SUP","fitting_MXPYPZ",1002,[ 0.310835, 120.0, 1.4000]]
interfaces << ["pan_PZ", "fitting_PXPYMZ",1001,[ 0.440000, 0.440, 0.6445]]
Then the loops on data are performed, with the calls to “calcOneGlobFM”, and the results are
printed:
for lcName in lcNames
printf "' n %s :' n' n",lcName
for interf in interfaces
elemGrp = db.getGroupCopy(interf[0])
nodeGrp = db.getGroupCopy(interf[1])
cs=interf[2]
coords=interf[3]
fm = calcOneGlobFM(db,lcName,scName,elemGrp,nodeGrp,cs,coords)
f=fm[0]
m=fm[1]
printf "%20s%20s%10d%10.3f%10.3f%10.3f%10.3f%10.3f%10.3f' n",'
elemGrp.Name,nodeGrp.Name,cs,'
f[0],f[1],f[2],m[0],m[1],m[2]
end
end
printf "' n"
Typically, the calculation of global force and moment for a given interface can be used to estimate
loads to be used to calculate a detailed model (of a metallic fitting, for example). It can also be used
for post-processing (for example to calculate margins of safety for a global sliding of an
interface).
The example is provided in file "RUBY/EX10/makeTempFields.rb".