**init_z7p_rotations#

Description#

The goal is there to compute a material frame (material rotation) for the given elset. For all the integration points of this elset, the positions if each points is given to a t should then return a rotation matrix which will be used as the material for that integration point. This is very useful for composite materials.

Syntax#

**init_z7p_rotations \(~\,~\,\) *elset_name name_elset \(~\,~\,\) *script name_script

name_elset

character name of the element set. This must be the name of a valid elset defined in the geometry file. The rotation will be imposed at every Gauss point in this element set.

name_script

The character name of the Zlanguage script which defined the material frame as a function of the gauss point positions.

Example#

The following example apply a rotation to all gauss points of the elset called elbow. The rotation is around the z axis, such that the center is cx=27. and cy=10..

***pre_problem
   **init_z7p_rotations
      *script rotation.z7p
      *elset_name elbow

The script called rotation.z7p is given as follows :

void initialize()
{
  global double cx,cy;

  cx=27.; cy=10.;
}

void apply()
{
// X,Y,Z : position of the current integration point
// to be filled by the end-user : FRAME
        double angle;
        angle = atan((X-cx)/(cy-Y));
        angle = angle*180./pi;
        FRAME.set_euler_angles_3D(0.,0.,angle);
}