calculate external_work command
Purpose
This command calculates the external work of a mesh (examples).
Syntax
calculate external_work keyword/value pairs
Keywords |
Description |
|---|---|
mandatory keyword, ID of a mesh command |
|
available options:
all or torque_only or force_onlydefault:
all |
|
id |
user-assigned name for the command call |
particle_group |
ID of the group of particles on which the command is applied
default:
all |
Examples
calculate external_work mesh dredge
calculate external_work mesh mixer mode torque_only id mixerTorque
calculate external_work mesh dredge mode force_only particle_group rocks
Description
This command calculates the external work that is performed my a mesh.
The external work is defined as the time integral of the scalar product of
force with velocity plus the scalar product of torque times angular velocity.
In case the keyword mode is defined with a value other than all only the selected
component is integrated, i.e. for force_only and torque_only only the force or the
torque is used in the integration, respectively.
If the torque of the mesh shall be taken into account it is mandatory to set
the reference_point_torque in the mesh command.
Output information
This command calculates a global scalar which contains the value of the external work, the force or the torque (depending on the mode). This value can be used by any command that uses a global scalar value as input. See Section_howto 15 for an overview of Aspherix® output options.
When using the output_settings command the global scalar of the command is automatically written to the simulation_data.csv / result_monitor.csv file.
Alternatively, also the write_to_file command can be used to output the data to a specified file.
Example for saving the result to a separate file
calculate external_work mesh mes1 id external
calculate external_work mesh mes1 mode force_only id external_force
calculate external_work mesh mes1 mode torque_only id external_torque
write_to_file file ext.txt string "id_time id_external id_external_force id_external_torque" &
string "time work force torque"