data_in_material_coord Package

data_in_material_coord Module

Defines:
  • data_in_material_coord(bdf, op2, in_place=False)
pyNastran.op2.data_in_material_coord.angle2vec(v1, v2)[source]

Using the definition of the dot product to get the angle

v1 o v2 = |v1| * |v2| * cos(theta) theta = np.arccos( (v1 o v2) / (|v1|*|v2|))

pyNastran.op2.data_in_material_coord.calc_imat(normals, csysi)[source]

Calculates the i vector in the material coordinate system.

j = k x ihat jhat = j / |j| i = jhat x k

Notes

i is not a unit vector because k (the element normal) is not a unit vector.

pyNastran.op2.data_in_material_coord.check_theta(elem)[source]
pyNastran.op2.data_in_material_coord.data_in_material_coord(bdf, op2, in_place=False)[source]

Convert OP2 2D element outputs to material coordinates

Nastran allows the use of ‘PARAM,OMID,YES’ to print 2D element forces, stresses and strains based on the material direction. However, the convertion only takes place in the F06 output file, whereas the OP2 output file remains in the element coordinate system.

This function converts the 2D element vectors to the material OP2 similarly to most of the post-processing tools (Patran, Femap, HyperView, etc). It handles both 2D elements with MCID or THETA.

Parameters:
bdf : BDF object

A BDF object that corresponds to the ‘op2’.

op2 : OP2 object

A OP2 object that corresponds to the ‘bdf’.

in_place : bool; default=False

If true the original op2 object is modified, otherwise a new one is created.

Returns:
op2_new : OP2 object

A OP2 object with the abovementioned changes.

Warning

doesn’t handle composite stresses/strains/forces ..

Warning

doesn’t handle solid stresses/strains/forces (e.g. MAT11) ..

Warning

zeros out data for CQUAD8s ..

pyNastran.op2.data_in_material_coord.get_eids_from_op2_vector(vector)[source]

Obtain the element ids for a given op2 vector

Parameters:
vector : op2 vector

An op2 vector obtained, for example, doing:

vector = op2.cquad4_force[1]
vector = op2.cquad8_stress[1]
vector = op2.ctriar_force[1]
vector = op2.ctria3_stress[1]
pyNastran.op2.data_in_material_coord.is_mcid(elem)[source]

Determines if the element uses theta or the mcid (projected material coordinate system)

Parameters:
elem : varies

an element object CQUAD4, CQUAD8, CQUADR CTRIA3, CTRIA6, CTRIAR

Returns:
is_mcid : bool

the projected material coordinate system is used

pyNastran.op2.data_in_material_coord.thetadeg_to_principal(Sxx, Syy, Sxy)[source]

Calculate the angle to the principal plane stress state

Parameters:
Sxx, Syy, Sxy : array-like

Sigma_xx, Sigma_yy, Sigma_xy stresses.

Returns:
thetadeg : np.ndarray

Array with angles for which the given stresses are transformed to the principal stress state.

pyNastran.op2.data_in_material_coord.transf_Mohr(Sxx, Syy, Sxy, thetarad)[source]

Mohr’s Circle-based Plane Stress Transformation

Parameters:
Sxx, Syy, Sxy : array-like

Sigma_xx, Sigma_yy, Sigma_xy stresses.

thetarad : array-like

Array with angles for wich the stresses should be transformed.

Returns:
Sxx_theta, Syy_theta, Sxy_theta : np.ndarray

Transformed stresses.