32. Sensor¶
Note
The granular plugin must be activated before a sensor can be created in the scene. This requires a Momentum Granular license.
A Sensor is an object that can be created and attached to a solid in the simulation, which can both be used to apply one or more actions and record information of granular bodies that come into contact with the coupled solid. Example actions include: coloring, removing granular bodies, setting velocity and recording of particle snapshot information. The sensor executes it’s enabled actions each time step of the simulation.
32.1. Usage¶
Select the Sensor tool from the ribbon menu and left-click on any solid in the simulation that is used in a rigid body. A blue sensor icon will appear at the center of the solid.
The solid coupled to the sensor has the Sensor property set to True to remove contact force calculation. See Geometry/Solid Properties. This is done because the most of the actions that can be activated in the sensor work best when the coupled solid is transparent with regards to contacts.
By default, no action on the sensor is activated on creation.
In the example image above, two sensors are inserted to operate on the granular flow created by an emitter.
32.2. Properties¶
When one sensor ( or multiple sensors ) is selected, the properties of that sensor can be changed from the properties tab.
32.2.1. General Properties¶
Sink: Specifies whether the sensor should act as a granular sink and remove granular bodies that come into contact with the sensor solid.
Attention
The sink functionality is typically executed last of all the activated operations. This means that operations that record granular particle information will be able to do so before the particles are removed.
Execution Order: Specifies the execution order of the sensor relative to the other sensors. The lower the number, the earlier the execution. Possible order interval is 0-100.
Blocker: Specifies if the sensor should block the execution of other overlapping sensors from acting on the same particles. If this is set to true, this sensor will block other sensors, acting after, from affecting the granular particles in contact with this sensor.
32.2.2. Color Properties¶
This functionality colors particles that come into contact with the sensor.
Color Particles: Set to true or false depending on if coloring on particles should occur in the sensor.
Color: Sets the color of the particles that touch this sensor.
Blend Color: Enables the sensor to mix it’s applied color with the color present on granulars that has been colored earlier in the execution order by others sensors in the same timestep. This allows for color mixing between different sensors in an overlapping volume.
Note
This feature does NOT work with emitted Rigid Bodies, only with particles.
32.2.3. Kinematic Granular Flow¶
These settings add the functionality to make granular bodies kinematic. This can be used to reduce non-changing granular flow to a kinematic flow where contact calculations between kinematic particles are omitted. A sensor can either make a flow kinematic or dynamic depending on the Kinematic Mode setting.
Enable: Specifies whether the sensor should use this functionality.
Kinematic Mode: Set to Make Granular Kinematic or Make Granulars Dynamic. Make Granulars Kinematic causes granular bodies to become kinematic, keeping their current motion, unnafected by external forces. Make Granulars Dynamic causes kinematic particles to become dynamic again.
Attention
The “Kinematic Granular Flow” functionality can be combined with sensor velocity operations to steer the kinematic flow.
32.2.4. Particle Snapshot Journal¶
A sensor can record a snapshot of the particle state inside its coupled solid at a specific time stamp.
Enable: Specifies whether the sensor should record a particle snapshot journal.
Journal File: Opens a dialog to specify where the snapshot journal should be created.
Attention
The created snapshot journals can be loaded in the Load Particle Journal operation.
32.2.5. Record Particle Flow Journal¶
A sensor can record a continuous stream of contacting particles to an external journal file. This journal file can then be loaded in a sensor in another simulation to recreate the outgoing flow from the previous simulation to an incoming flow in the new simulation. The time offset will follow to the journal depeding on if recording starts with the first contact or on simulation start.
Enable: Set to True or False depending if contact recording should be enabled or not.
Begin Store On Contact: Specifies if the journal recording should begin when the first particle comes into contact with the sensor.
Journal File: Opens a dialog to specify where the snapshot journal should be created.
Attention
The created particle journals can be loaded in the Load Granular Journal operation.
32.2.6. Load Granular Journal¶
A sensor has the capability to load a granular configuration saved in an external journal or snapshot created by other sensor operations. The bodies created from the journal are positioned relative to the sensor solid center point with an offset relative to the center of the sensor that recorded the journal.
Enable: Specifies whether this functionality should be used or not.
Load After: Specify in seconds when the particle journal/snapshot should begin to load the recorded information into the simulation.
Load File: Select the particle journal file (.agxJournal) or snapshot file (.agx/.agxJournal to load into the simulation.
Initial Material: Select the material that should be set on the loaded bodies. Particle mass will be calculated from the density in the material when a particle is loaded.
Note
NSS bodies loaded from this functionality will NOT recompute their mass properties from the Initial Material.
Note
Particle snapshots ( in .agx format ) can also be loaded via the scripting interface.
32.2.7. Record Contacts¶
Contacts between granular particles and the sensor geometry can be sampled into a .csv file. Data such as particle radius, id and incoming velocity is stored in a generated .csv file in the same directory as the active SpaceClaim document.
Enable: Set to True or False depending on if particle contacts with the sensor geometry should be recorded or not.
Frequency: Select the frequency of the contact sampling. Will round to nearest multiple of the current time step.
Record Contact Once: Set to True or False depending on if a contact with a particle should be recorded only once per interaction. If the particle is separated from the sensor and then in contact again, it will register the contact again even if set to True.
32.2.8. Velocity¶
This functionality enables the sensor to apply a velocity to the granular bodies that come into contact with the sensor.
Set Particle Velocity: Specifies if the sensor should apply a velocity to the contacting granular bodies.
Use Local Frame: Specifies if the velocity direction will follow the orientation of the solid during the simulation.
Axis X: Specifies the velocity in the x-direction.
Axis Y: Specifies the velocity in the y-direction.
Axis Z: Specifies the velocity in the z-direction.
Angular X: Specifies the rotational velocity around the X-axis.
Angular Y: Specifies the rotational velocity around the Y-axis.
Angular Z: Specifies the rotational velocity around the Z-axis.
32.2.9. Switch Particle Material¶
This functionality enables the sensor to switch material on granular bodies that comes into contact with the sensor. The mass of contacting bodies will also be updated when the material is changed.
Switch Material: Specifies if the sensor should switch material on contacting granular bodies.
Material Name: The name of the SpaceClaim material that should be set.
32.2.10. Teleport Options¶
The sensor can teleport an incoming flow of granular material to another sensor active in the simulation. This can be used to quickly transport material over a distance without the need to manually specify/construct the transport chain.
Enable: Specifies whether the teleport option should be enabled or not.
Time Dilation: Specify in seconds the time dilation of the teleportation of the material.
Target Sensor: Specify the target sensor in the simulation where the material should be transported to. A line will be drawn to the target from the this sensor when it is selected if the teleportation is enabled.
Note
This feature does NOT work with emitted Rigid Bodies, only with particles.