12. Sensor
The sensor command is specified as *Sensor
. It must have a unique name, and names cannot be duplicated. With *Sensor
, you can define a sensor object that enables the output of displacement, velocity, acceleration, and strain at any location within the model.
*Sensor
Specify the sensor.
*Sensor, Type=type, Name=name
...
Keyword line
- Type=type: Coordinate system type
- Point: Defines a sensor for a set of measurement points
- Line: Defines a sensor for a set of multiple measurement points along a spline
- TrackTwist: Defines a sensor for track twist within the track
- Name=name: Sensor name
The Sensor command is used to output field values such as strain, displacement, velocity, and acceleration at any position and direction within the finite element model, or for special analysis purposes. A Sensor represents a collection of measurement points and has a unique name. Sensors are generally categorized into standard sensors, which measure strain, displacement, velocity, and acceleration at specific locations, and special sensors. Standard sensors are further divided into PointSensor, where the user specifies location and direction directly, and LineSensor, where a spline is specified and points along the spline are measured. In LineSensor, the direction uses the tangent vector calculated from the spline. Special sensors currently include a track twist sensor.
▪ Output Purpose
For specified Sensors, values at sensing points within the sensor can be output using the *Output
, *Print
, or *History
command by specifying the sensor name.
▪ Special Analysis Purpose
Sensors are used in *Step, Type=ModelUpdating
to compare analysis values with measured values. Only standard sensors can be used for this purpose.
*Sensor, Type=Point
Defines a PointSensor that reports strain, displacement, velocity, and acceleration at a given point.
*Sensor, Type=Point, Name=name
Strain|Displacement|Velocity|Acceleration, hostElset
id, x, y, z, dx, dy, dz
...
First dataline
- Strain|Displacement|Velocity|Acceleration: Select sensor type
- hostElset: Parent elset containing the measurement point
Second dataline and subsequent datalines
- id: Unique identifier for the measurement point (required). Duplicate IDs are not allowed.
- x, y, z, dx, dy, dz: Coordinates and direction vector of the measurement point (required). The provided direction vector is normalized to a unit vector.
Example
*Sensor, Type=Point, Name=sensor1
Strain, girder
1, 1, 0.0, 0, 1,0,0 # id, x, y, z, dx, dy, dz
2, 5, -2.3, 0, 1,0,0
3, 10, 0.0, 0, 1,0,0
*Step
...
*Output
D, sensor1
*Print File=Case1.prn
D@Left, sensor1
*History, File=history.csv
D-X@N10 # Dx at node 10
sensor1 # Values for measurement points in `sensor1`
*Sensor, Type=Line
Defines a LineSensor that reports strain, displacement, velocity, and acceleration along a spline.
*Sensor, Type=Line, Name=name
Strain|Displacement|Velocity|Acceleration, hostElset, spline, startId
s1, s2, ..., n@s
...
First dataline
- Strain|Displacement|Velocity|Acceleration: Select sensor type
- hostElset: Parent elset containing the measurement point
- spline: Spline where the sensor measurement points are placed (required)
- startId: Starting unique identifier for measurement points (optional, default is 1)
Second dataline and subsequent datalines
- s1, s2, ...: Sensor installation positions; the sensor's direction vector is calculated from the direction vector on the spline.
- n@s: Provided for convenience, indicating
n
positions at an interval ofs
from the previous location.
Example
*Construction, Type=Spline, Name=spline
0, 0, 0
10, 0.8,0
20, 0, 0
*Sensor, Type=Line, Name=lineSensor1
Strain, girder, spline, 1
0, 1, 2, 5
3@3 # Indicates 8, 11, 14
*Step
...
*History, File=history.csv
D-X@N10 # Dx at node 10
lineSensor1 # Values for measurement points in lineSensor1
*Sensor, Type=TrackTwist
Track twist within the track
*Sensor, Type=TrackTwist, Name=name
line1, line2, spacing, advance, startId
First dataline
- line1, line2: Elsets forming the track with beam elements (required)
- spacing: Length in the direction of progression for each rectangular block, typically set to 3 m (required)
- advance: Distance the rectangular block shifts, typically
spacing/10
(required) - startId: Starting unique identifier for measurement points (optional, default is 1)
Track twist can be calculated for a track composed of beam elements. The two lines must be straight, parallel, and of equal length. In design standards, spacing
represents the length subject to track twist, typically set to 3 m, but it should be specified according to the unit in use. advance
is the distance that each rectangular block moves, producing one twist value per block. Thus, the number of sensor points is (track length – spacing)/advance
. The sensor point IDs start from 1. For example, on a 30 m rail with spacing = 3 m
and advance = 0.5 m
, (30 - 3)/0.5 = 54
sensor points will be created.
■ Note
When calculating twist or displacement for points on the track formed by beam elements, always use the shape function of the B3D2H
element (Bernoulli beam). Even if using B3D2MH
, which accounts for shear deformation, the shape function of B3D2H
is applied, based on the assumption that the rail is sufficiently slender.
Example
*Sensor, Type=TrackTwist, Name=TrackIrr
line1, line2, 3, 0.3
*Step, TYPE=Dynamic, Name=DYN
...
*Output
D, TrackIrr
*History, Name=TrackOutput
DYN
TrackIrr