Difference between revisions of "Transform Command"

From OSUPDOCS
Jump to navigation Jump to search
 
Line 34: Line 34:
=== Comments on Transform Command ===
=== Comments on Transform Command ===


# When not transforming particles, [[MPM Region and Hole Commands|Region commands]] keep track of which locations in each cell are occupied by a material point. If two [[MPM Region and Hole Commands|Region commands]] try to create particles at the same location, the first will create a particle and the second will do nothing. This feature lets you overlay regions without causing particle interferences. When particles are transformed, however, the particle locations of free from the grid and therefore particle locations are no longer tracked. In other words, whenever transforming particles, your input file in responsible for insuring that material points are not created in the same location. Similarly, transformed particle will be created in their new locations without regard to whether or that the location has been marked using a [[MPM Region and Hole Commands|Region or Hole command]].
# When not transforming particles, [[MPM Region and Hole Commands|Region commands]] keep track of which locations in each cell are occupied by a material point. If two [[MPM Region and Hole Commands|Region commands]] try to create particles at the same location, the first will create a particle and the second will do nothing. This feature lets you overlay regions without causing particle interferences. When particles are transformed, however, the particle locations of free from the grid and therefore particle locations are no longer tracked. In other words, whenever transforming particles, your input file in responsible for insuring that material points are not created in the same location. Similarly, transformed particle will be created in their new locations without regard to whether or not that the location has been marked using a [[MPM Region and Hole Commands|Region or Hole command]].
# Only one transformation is allowed in each [[MPM Region and Hole Commands|Region command]] and the transformation applies to all particles created by that command.
# Only one transformation is allowed in each [[MPM Region and Hole Commands|Region command]] and the transformation applies to all particles created by that command.
# When transforming rigid particles, the effect of rotations will not affect the simulation results unless shape functions account for particle deformation (''e.g.'', by using [[MPM Methods and Simulation Timing|CPDI shape functions]]).
# When transforming rigid particles, the effect of rotations will not affect the simulation results unless shape functions account for particle deformation (''e.g.'', by using [[MPM Methods and Simulation Timing|CPDI shape functions]]).

Latest revision as of 15:58, 3 August 2021

Introduction

A standard Region command will allocate particles within shapes defined for that region and those particles will by aligned with the grid. Depending on the current number of particle per cell, the command will assign particles to specific locations within cells. The transform options on this page add new options for moving particles away from the standard locations.

Transforming Created Particles in Script Files

To transform all particles within the current Region command when running 2D simulations and using script input, use the command:

Transform (angle),(Tx),(Ty),(Ox),(Oy)

Each particle will start at initial (or "init") location by standard methods as if it was not being transformed and then the location of that particle will change to a "new" position defined by

      [math]\displaystyle{ \vec X_p^{(new)} = \vec X_p^{(init)} + (\mathbf{R}-\mathbf{I})(\vec X_p^{(init)} - \vec O) + \vec T }[/math]

where

  • [math]\displaystyle{ \mathbf{R} }[/math] is 2D rotation matrix for rotation about the z axis by specified (angle) (in degrees)
  • [math]\displaystyle{ \mathbf{I} }[/math] is the identity matrix
  • [math]\displaystyle{ \vec O = ((Ox),(Oy)) }[/math] is the origin for the rotation (in length units)
  • [math]\displaystyle{ \vec T = ((Tx),(Ty)) }[/math] is a translation (in length units)

Any unspecified parameters will default to zero.

In script files for 3D simulations, this command allows four additional parameters

Transform (angle),(Tx),(Ty),(Ox),(Oy),(angle2),(angle3),(Tz),(Oz)

The transformation equation is the same as defined above in 2D, but now the rotation matrix, [math]\displaystyle{ \mathbf{R} }[/math] is for rotation using 3D Euler angles corresponding to rotation about z axis by (angle), rotation about y axis by (angle2), and last rotation about z axis by (angle3) (all in degrees). The (Tz) and (Oz) add z components to the translation and rotation origin vectors.

Comments on Transform Command

  1. When not transforming particles, Region commands keep track of which locations in each cell are occupied by a material point. If two Region commands try to create particles at the same location, the first will create a particle and the second will do nothing. This feature lets you overlay regions without causing particle interferences. When particles are transformed, however, the particle locations of free from the grid and therefore particle locations are no longer tracked. In other words, whenever transforming particles, your input file in responsible for insuring that material points are not created in the same location. Similarly, transformed particle will be created in their new locations without regard to whether or not that the location has been marked using a Region or Hole command.
  2. Only one transformation is allowed in each Region command and the transformation applies to all particles created by that command.
  3. When transforming rigid particles, the effect of rotations will not affect the simulation results unless shape functions account for particle deformation (e.g., by using CPDI shape functions).

Transforming Created Particles in XML Files

To transform particles in XML input files, use a <Deform> element within a <Body> element:

<Deform dX="dx" dY="dy" F11="Fij" F21="Fij"/>

where

  • F11, F12, F13, ... F33 can specify up to nine elements of the initial particle deformation gradient (dimensionless).

If the provided deformation gradient corresponds to rigid rotation, this transformation will be identical to a corresponding Transform command in a script file. The XML command, however, provides three additional options:

  1. In XML files, you can have more than one Deform command in a single <Body> element interspersed between shape commands used to create materials points. Each new <Deform> element will replace the transformation settings of the previous element. Each shape command within the <Body> will use the most recent transformation. To revert to creating particles with no transformations, you can insert an <Undeform/> element to remove previous settings and create subsequent particle by standard methods.
  2. In XML files, you can deform particles using general deformation gradient that need not correspond to a rigid rotation materials. Normally you should not deform particles this way because the initial state would not have the correct initial stress state. An important except is when using rigid particles. A non-rotation deformation matrix can be used to deform rigid particle shapes to better conformed to a rigid surface. One example is to shear particles to create an angled surface.
  3. dX, dY, and dZ can be user-defined functions while the Transform scripting command only numerical values (and applications convert those numerical values for rotation angle, origin, and translation into user-defined functions for dX, dY, and dZ.

Comments on Deform Command

  1. Comment #1 above also applies to particles transformed using the <Deform> command
  2. When deforming rigid particles, the effect of the resulting deformed shapes will not affect the simulation results unless shape functions account for particle deformation (e.g., by using CPDI shape functions).
  3. Deforming non-rigid particles by anything other than rigid body rotation may give unreliable results.