Command manual

Command list

OUTPUT_SENSOR_THICKNESS

Output
Attention: This command is in the beta stage and the format may change over time.
*OUTPUT_SENSOR_THICKNESS
"Optional title"
coid, pid, $x_0$, $y_0$, $z_0$, fixed, $t_{beg}$, $t_{end}$
$n_x$, $n_y$, $n_z$

Parameter definition

VariableDescription
coid Sensor ID
pid ID of part where the sensor is located
$x_0$ Initial x-coordinate of sensor
$y_0$ Initial y-coordinate of sensor
$z_0$ Initial z-coordinate of sensor
fixed Flag to fix sensor in space
options:
0 $\rightarrow$ sensor follows material
1 $\rightarrow$ sensor is fixed in space
$t_{beg}$ Sensor activation time
default: 0
$t_{end}$ Sensor deactivation time
default: 1.0e20
$n_x$ x-component of thickness measuring direction
default: not used
$n_y$ y-component of thickness measuring direction
default: not used
$n_z$ z-component of thickness measuring direction
default: not used

Description

This command is used to sample the thickness of a part at a given location or material point. The measured thickness is written to sensor_thickness.out. In FUNCTION the thickess can be accessed through thicks(coid).

The vector defining the the thickness measuring direction is optional. It only needs to be specified in situations where the nearest point on the external surface is not defining the thickness direction. The example below shows such a situation. As the workpiece moves forward in positive x-direction, the sensor first reaches the front face of the workpiece. This face does not represent the thickness direction and it should therefore not be used in the measurement. Hence, it is necessary to manually define a vector, in this specific case $(n_x,n_y,n_z)=(0,0,1)$ .

Example

Adjust vertical position of rolls using a thickness sensor

A complete model of a rolling process. The vertical motion of the rolls is adjusted to reach a target thickness of the workpiece.


Command file:

*UNIT_SYSTEM
SI
*PARAMETER
W = 0.01, "width of workpiece"
L = 1.0, "length of workpiece"
h = 0.08, "initial thickness of workpiece"
h_target = 0.06, "target thickness of workpiece"
R1 = 0.06, "roll radius 1"
R2 = 0.08, "roll radius 2"
R3 = 0.12, "roll radius 3"
v0 = 0.1, "rolling speed"
#
# --- INCLUDE PYTHON SCRIPT ---
#
*SCRIPT_PYTHON
rolls.py
#
# --- TIME and OUTPUT ---
#
*TIME
[%L/%v0], 0, 1.0e-5
*OUTPUT_SENSOR_THICKNESS
"sensor 1"
1, 1, [%R3/4], 0.0, 0.0, 1
0, 0, 1
#
# --- MESH ---
#
*COMPONENT_BOX
"workpiece"
1, 1, 50, 1, 4
[-%L], [-%W/2], [-%h/2], 0, [%W/2], [%h/2]
*COMPONENT_PIPE
"upper roll - core"
2, 2, 1, 24, 1
0, [-%W/2], [%h/2+%R3], 0, [%W/2], [%h/2+%R3], [%R1], [%R2]
*COMPONENT_PIPE
"upper roll - rubber"
3, 3, 1, 24, 2
0, [-%W/2], [%h/2+%R3], 0, [%W/2], [%h/2+%R3], [%R2], [%R3]
*COMPONENT_PIPE
"lower roll - core"
4, 4, 1, 24, 1
0, [-%W/2], [-%h/2-%R3], 0, [%W/2], [-%h/2-%R3], [%R1], [%R2]
*COMPONENT_PIPE
"lower roll - rubber"
5, 5, 1, 24, 2
0, [-%W/2], [-%h/2-%R3], 0, [%W/2], [-%h/2-%R3], [%R2], [%R3]
*CHANGE_P-ORDER
ALL, 0, 3
*SMOOTH_MESH
ALL, 0, 45.0, 1
*MERGE_DUPLICATED_NODES
P, 2, P, 3, 1.0e-5
P, 4, P, 5, 1.0e-5
#
# --- MATERIALS ---
#
*MAT_METAL
"workpiece"
1, 1000.0, 1.0e9, 0.49
1
*FUNCTION
1
3.0e6
*MAT_RIGID
"roll - core"
2, 7800.0
*MAT_MOONEY_RIVLIN
"roll - rubber"
3, 1500.0, 1.0e9
1.0e6, 1.0e6
#
# --- PARTS ---
#
*PART
"workpiece"
1, 1
"upper roll - core"
2, 2
"upper roll - rubber"
3, 3
"lower roll - core"
4, 2
"lower roll - rubber"
5, 3
#
# --- INITIAL VELOCITY ---
#
*INITIAL_VELOCITY
P, 1, [%v0]
*INITIAL_VELOCITY
PS, 23, 0, 0, 0, 0, [-%v0/%R3], 0
0, 0, [%h/2+%R3]
*INITIAL_VELOCITY
PS, 45, 0, 0, 0, 0, [%v0/%R3], 0
0, 0, [-%h/2-%R3]
*SET_PART
23
2, 3
*SET_PART
45
4, 5
#
# --- BOUNDARY CONDITIONS and CONTACT ---
#
*BC_MOTION
"upper roll"
2
P, 2, XY, ZX
V, Z, 1000, -1.0
V, RY, 1001, -1.0
*BC_MOTION
"lower roll"
4
P, 4, XY, ZX
V, Z, 1000
V, RY, 1001
*FUNCTION
1000
rolls.adjust(thicks(1), %h_target)
*FUNCTION
1001
%v0/%R3
*CONTACT
"general"
1
ALL, 0, ALL, 0, 0.3
*BC_SYMMETRY
0, 1, 2
*COORDINATE_SYSTEM_FIXED
1, [-%L/2], [-%W/2], 0
*COORDINATE_SYSTEM_FIXED
2, [-%L/2], [%W/2], 0
*END

Python script rolls.py:

#
# SET VERTICAL ROLL VELOCITY TO REACH TARGET THICKNESS
# h_actual = current thickness at sensor
# h_target = target thickness at sensor
#
def adjust(h_actual, h_target):
if (h_actual > 0):
vertical_velocity = h_actual - h_target
else:
vertical_velocity = 0
return vertical_velocity