Sensors
Sense an event during simulation and control the future course of the simulation.
The sensor entity tracks a signal (a solver function) during the simulation and gets activated when the value of the signal at the current timestep matches the value and condition to which it is compared. Once the sensor is activated, the next course of the simulation could be changed.
- halt, restart, or execute the next command in sequence for the solver
- evaluate an expression
- change solution parameters such as output step, maximum step size, etc.
For information on how to add or edit an entity like a Sensor, see Entity Creation.
By default, variables names of entities follow a certain convention. For example, all sensor entities have a variable name starting with “Sensor_0”. This is the recommended convention to follow when building models since it has many advantages in model editing and model manipulation.
Sensor Properties
Descriptions of sensor properties in the Property Editor.
| Property Name | Description | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| General | ||||||||||||
| Name | Name of the entity | |||||||||||
| Variable Name | The variable name, a unique identifier string of the entity | |||||||||||
| ID | A unique identifying integer | |||||||||||
| Signal | ||||||||||||
| Type |
Select the type of input for the signal
|
|||||||||||
| User-defined | This is an alternate to the Type
choices. Use a subroutine to define the sensor.
|
|||||||||||
| Compare
To Define the value that the current signal will be compared to. |
||||||||||||
| Value | Enter a Value (Real) to compare the signal with. | |||||||||||
| Error | Specify the tolerance applied to the value to create a numerical bandwidth. | |||||||||||
| Respond if | Select one of the following options for
triggering a response.
|
|||||||||||
| Response Specify one or more actions the solver should take when the signal is within the Compare To range. Click any of the check boxes to activate the response. |
||||||||||||
| Halt simulation | The simulation will stop when the sensor is triggered. | |||||||||||
| Restart simulation | The simulation will start when the sensor is triggered. | |||||||||||
| Print to output | Results will be written to the output files when the sensor is triggered. | |||||||||||
| Evaluate expression | Evaluate the expression provided when the sensor is triggered. | |||||||||||
| New output step | Activating this option allows you to provide a value that will result in the solver using a new output step from that point forward. | |||||||||||
| New integration step | Activating this option allows you to provide a value for the maximum stepsize for the next solver iteration step. | |||||||||||
| Return to command file | Read the next solver command in sequence when the sensor is triggered. | |||||||||||
| New pivot sequence | Reset the pivot sequence for the solver when the sensor is triggered. | |||||||||||
| Export state variable vector | Write the state information to a file when the sensor is triggered. | |||||||||||
| Notes and Tags | ||||||||||||
| Attachment Candidate | Add an attachment candidate tag. See Attachments. | |||||||||||