#### OUTPUT_SENSOR

###### Output
*OUTPUT_SENSOR
"Optional title"
coid, pid, $x_0$, $y_0$, $z_0$, $R$, csysid, ref, lagrange
##### Parameter definition
VariableDescription
coid Sensor ID
pid Sensor type or ID of part where the sensor is located
options: Part ID, DP (discrete particle), SPH or RB (rebar)
default: nearest part
$x_0$ Initial x-coordinate of sensor
$y_0$ Initial y-coordinate of sensor
$z_0$ Initial z-coordinate of sensor
$R$ Sensor radius (for pid=DP only)
csysid Optional local coordinate system ID
ref Reference system for velocity and displacement output
options:
0 $\rightarrow$ Output displacement/velocity relative local coordinate system
1 $\rightarrow$ Output displacement/velocity relative global origin
lagrange Particle sensor (DP) flag to let the sensor follow the material flow
options:
0 $\rightarrow$ Sensor fixed in space
1 $\rightarrow$ Sensor follows material
##### Description

A sensor can either sample the local state at a material point inside a specified part, or sample the discrete particle state at a specified fixed point in space (see PARTICLE_DOMAIN).

If referring to a part ID, the command will sample the local state at a material point initially located at coordinate $(x_0,y_0,z_0)$. The solver uses the nearest integration point and node (in the specified part) and outputs the sampled data to the ASCII file sensor.out.

If specifying pid=DP (discrete particles) the sensor is fixed in space and will sample the average particle density, velocity and pressure inside a sphere with radius $R$. The data is then output to the ASCII file particle_sensor.out.

Stresses, coordinates, displacements and velocities are output in the local coordinate system (if defined). Also the sensor location $(x_0, y_0, z_0)$ is defined in this local coordinate system.