COORDINATE_SYSTEM_FUNCTION

Coordinate system
*COORDINATE_SYSTEM_FUNCTION
"Optional title"
csysid, $x_0$, $y_0$, $z_0$
$\hat{x}_x$, $\hat{x}_y$, $\hat{x}_z$, $\bar{y}_x$, $\bar{y}_y$, $\bar{y}_z$
Parameter definition
VariableDescription
csysid Unique identification number
$x_0$, $y_0$, $z_0$ Coordinate of origin
options: constant, fcn
$\hat{x}_x$, $\hat{x}_y$, $\hat{x}_z$ Direction of local x-axis
options: constant, fcn
$\bar{y}_x$, $\bar{y}_y$, $\bar{y}_z$ Vector needed for the definition of the local y- and z-axis
options: constant, fcn
Description

This command defines a local cartesian coordinate system. The parameters can either be constants or functions.

The origin is located at ($x_0$, $y_0$, $z_0$) and the local x-direction is ($\hat{x}_x$, $\hat{x}_y$, $\hat{x}_z$). The local z-direction is defined as $\hat{\mathbf{z}} = \hat{\mathbf{x}} \times \bar{\mathbf{y}} / \vert \hat{\mathbf{x}} \times \bar{\mathbf{y}} \vert$ and the local y-direction as $\hat{\mathbf{y}} = \hat{\mathbf{z}} \times \hat{\mathbf{x}}$.

Example
Coordinate system defined with functions

A local coordinate system with its origin following sensor ID=1 and with prescribed, time dependent, direction cosines.

The coordinate system is rotating 360° around its Z-axis and is used as a translational constraint for a box, restricting its motion in the current local Y- and Z-axis. The box is given a prescribed displacement in the X-direction.


The cube's motion during the simulation. Numbering in sequential order.
*UNIT_SYSTEM
SI
*PARAMETER
%tend = 1, "Termination time"
%disp_x = 1, "Displacement in X-direction"
*TIME
[%tend]
*OUTPUT
[%tend/100]
*COMPONENT_BOX
1, 1, 1, 1, 1
-0.5, -0.5, -0.5, 0.5, 0.5, 0.5
*OUTPUT_SENSOR
1, 1, 0, 0, 0.5
*COORDINATE_SYSTEM_FUNCTION
1, fcn(10), fcn(11), fcn(12)
fcn(13), fcn(14), 0, fcn(15), fcn(13), 0
*FUNCTION
10
xs(1)
*FUNCTION
11
ys(1)
*FUNCTION
12
zs(1)
*FUNCTION
13
cos(360*t)
*FUNCTION
14
sin(360*t)
*FUNCTION
15
-sin(360*t)
*PART
1, 1
*MAT_ELASTIC
1, 7800, 21e9, 0.3
*BC_MOTION
"Cube 1"
1
P, 1, YZ, 0, 1
D, X, 1, 1
*FUNCTION
1
%disp_x*(t/%tend)
*END