Imposed Motions

Wall boundary particles can be moved during a simulation with a prescribed motion. Depending on the type of the imposed motion, different values have to be defined.

The principal concept is to define a motion for a specific phase and apply this motion within a given time-frame. Similar to the “phases”, different motions are defined consecutively. Using this approach it is possible to combine different motions for one and the same phase at different times. Thus, it is possible to realize more complex motions with a combination of existing motion types. However, if a special motion is required it is worth it to contact the nanoFluidX support – it might be easier/faster to improve the available motion types for special customer requests.

Before proceeding with the glossary of related commands for the motion setup, there is an important disclaimer that has to be made. Given the current structure of nanoFluidX, there are clear rules regarding which motions can be combined, executed in sequence or modified upon restart.

Motion combinations that are well-behaved and accounted for:
  • A - impose_vel+impose_vel (allowed for all)
  • C - rotate_axis+rotate_axis (allowed if only different in time and freq, other differences may cause unknown behavior)
  • D - planetary+planetary (allowed if only different in time and freq)
  • E - conrod+conrod (allowed if only different in time and freq)
  • F - position_file+position_file (not allowed)
  • G - trn_osc+trn_osc (allowed if only different in time and freq)
  • H - passive_rigid_body+passive_rigid_body (not allowed)
  • K - C+A (allowed)
  • L - D+A (allowed)
  • M - E+A (not allowed, unknown behavior)
  • N - C+D or D+C (not allowed, unknown behavior)
  • O - A+C (allowed, A is discarded)
  • P - A+D (allowed, A is discarded)
  • Q - F+Others or Others+F (not allowed, A+F/F+A may behave correctly though)
  • R - G+Others or Others+G (not allowed, unknown behavior)
  • S - H+Others or Others+H (not allowed)
Restart/continue (recon) clarifications:
  • Motions should not be removed from a restart/continue
  • Motions may be added to the restart/continue
  • If a motion has to have a transition at the restart time, one may modify the ending of the first motion and add the second one from the start of the restart/continue time.
Example for restart/continue, clean run:
motion1{ROTATE_AXIS; start 0; end 10}
Example for restart/continue from 5, add a second motion:
motion1{ROTATE_AXIS; start 0; end 5}
motion2{ROTATE_AXIS; start 5; end 10}
The commands for defining motions in nanoFluidX are presented below:
motions
{
       motion
       {
            phase_motion                1
            motion_type                 IMPOSE_VEL 
            impose_vel                  "0. 0. 1."
            tstart_prescribe            0.
            tend_prescribe              2.
            t_damping                   0.5
        }
        motion
        {
            phase_motion                 2
            motion_type                  ROTATE
            freq_unit                    RPM			
            rot_freq                     "50. 0. 0."
            rot_freq_init                "0. 0. 0."
            rot_cntr                     "0. 0. 0."
            tstart_prescribe             0.
            tend_prescribe               3.
            t_damping                    0.5
            max_dist                     0.1
        }
        motion
        {   
            phase_motion                 2
            motion_type                  ROTATE_AXIS
            freq_unit                    Hz			 
            rot_axis                     "1. 0. 0."
            rot_axis_freq		   50.0
            rot_axis_freq_init           0.0
            rot_cntr                     "0. 0. 0."
            tstart_prescribe		0.
            tend_prescribe		  3.
            t_damping                    0.5
            max_dist                     0.1
        }
        motion
        {
            phase_motion                 1
            motion_type		     POSITION_FILE
            positionFile		    motionfile.txt
            rot_cntr                     “0. 0. 0.”		
            isOrientation                false
            tstart_prescribe             0.
            tend_prescribe               1.
        }
        motion
        {
            phase_motion                 3
            motion_type                  PLANETARY    
            freq_unit		       Rad/s			               
            orbit_cntr		      "0.0 0.0 0.0"
            orbit_radius                 0.06
            year_rotationVec		"1.0 0.0 0.0"
            year_frequency               1.73
            year_frequency_init          0.0
            day_rotationVec              "1.0 0.0 0.0"
            day_frequency                6.11
            day_frequency_init           0.0
            initial_centerOfDayRotation  "0.58 0.22 0.34"
            tstart_prescribe		0.0
            tend_prescribe               1.0
            max_dist                     0.1
        }
        motion
        {
            phase_motion                  3
            motion_type                   OSCILLATE
            freq_unit                     Hz
            oscill_ampl                   "0.0 0.07 0.0"
            oscill_freq_init              “0.0 0.0 0.0”
            oscill_freq                   "0.0 50.0 0.0"
            oscill_phaseshift             "0.0 90.0 0.0"
            tstart_prescribe              0.0
            tend_prescribe                0.0
            t_damping                     0.0
        }
        motion
        {
            motion_type                    CONROD
            phase_piston                   5               
            phase_conrod                   7
            freq_unit                      Rad/min		  
            crankshaft_rot_freq            -100.0
            crankshaft_rot_freq_init       0.0
            crankshaft_axis                "0.0 1.0 0.0"
            crankshaft_cntr                "1.15 0.11 0.6"
            crankshaft_normal              "0.2 0.0 -0.9"
            crankshaft_phaseshift          0.0
            crankshaft_rad                 0.12
            conrod_length                  0.15
            piston_offset                  0.01
            tstart_prescribe               0.0
            tend_prescribe                 1.0 
            t_damping                      0.1
        }
        motion
        {
            phase_motion                   1
            motion_type                    PASSIVE_RIGID_BODY       
            freq_unit                      Rad/s                    
            init_CoM                       "1.0 1.0 1.0"            
            mom_inert_diag                 "1.0 1.0 1.0"            
            mom_inert_offdiag              "0.0 1.0 0.0"            
            body_mass                      10                       
            init_vel                       "0.0 0.0 1.0"            
            init_angvel                    "0.0 0.0 0.5"            
            mom_principal_ax_x_i           "1.0 0.0 0.0"            
            mom_principal_ax_y_i           "0.0 1.0 0.0"            
            mom_principal_ax_z_i           "0.0 0.0 1.0"            
            prbcon_ax_x_i                  "1.0 0.0 0.0"            
            prbcon_ax_y_i                  "1.0 0.0 0.0"            
            prbcon_ax_z_i                  "1.0 0.0 0.0"            
            prbcon_linlck_c                "1.0 1.0 0.0"            
            prbcon_anglck_c                "1.0 1.0 1.0"            
            prbcon_linspr_k_c              "5.0 0.0 0.0"            
            prbcon_linspr_p_c              "0.0 0.0 0.0"            
            prbcon_angspr_k_c              "0.0 0.0 8.0"
            prbcon_lindmp_c_c              "0.0 0.0 0.0"
            prbcon_angdmp_c_c              "0.0 0.0 0.0"            
            prbcon_angspr_p_c              "0.0 0.0 0.0"            
            prbcon_linlim_pls_c            "2.0 0.0 -3.0"           
            prbcon_linlim_mns_c            "1.0 0.0 -2.0"           
            prbcon_anglim_pls_c            "2.0 0.0 -3.0"           
            prbcon_anglim_mns_c            "1.0 0.0 -2.0"           
            prbcon_pt_i                    "0.0 0.0 0.0"            
            prbcon_ax_hinge_c              "0.0 1.0 0.0"
            prbcon_cnstfrc_c               "3.0 -1.0 0.0"
            prbcon_cnsttrq_c               "1.0 5.0 -2.0"            
            prbcon_linvel_ctoi             true
            prbcon_linvel_a_c              "1.0 0.0 0.0"
            prbcon_linvel_f_c              "prb_tlvs.txt"
            prbcon_angvel_ctoi             true
            prbcon_angvel_a_c              "1.0 0.0 0.0"
            prbcon_angvel_f_c              " prb_alvs.txt"
        }
...
}
Important: ROTATE and ROTATE_AXIS motion types have the same function, albeit slightly different definitions. In ROTATE_AXIS we separate the rotational frequency from the rotational axis definition, while in ROTATE we multiply the axis vector definition by the frequency scalar. Both functions can be used and we leave it up to user preference to choose which one is more convenient.
phase_motion
The following motion is applied to this phase number.
Note: The type of these phases needs to be MOVINGWALL or WALL. The WALL phase types can only be assigned IMPOSE_VEL and ROTATE_AXIS motion types, in which case the velocities on these WALL phases will be set as a velocity boundary condition (in accordance with the specified motion).
Options: The phase number must not exceed the number of defined phases. Counting starts with "1."
motion_type
The type of the imposed motion.
Options: IMPOSE_VEL / ROTATE / ROTATE_AXIS / POSITION_FILE / PLANETARY / OSCILLATE / CONROD / Passive_RIGID_BODY
freq_unit
Defines which unit will be used to specify rotational frequencies for this motion.
Options: Hz, RPM, Rad/s, Rad/min
Default: Hz (same as rotations per second) except for PASSIVE_RIGID_BODY (Rad/s).
impose_vel
For motion_type = IMPOSE_VEL
This is the imposed velocity of the moving wall particles defined as a vector in x, y and z directions.
Default: “0. 0. 0”
tstart_prescribe / tend_prescribe
Within the time-frame tstart_prescribe and tend_prescribe, the velocity of the moving wall particles is set to impose_vel.
Note: tend_prescribe should be greater equal tstart_prescribe.
Default: 0.0
t_damping
In SPH, impulsively started motions always cause pressure oscillations since in a weakly-compressible method disturbances can only travel at the numerical speed of sound. To alleviate this effect it is possible to slowly increase the imposed motion starting at tstart_prescribe for an interval of t_damping.
Example:
  • Before tstart_damping: No imposed motion
  • tstart_ presribe < current time < tstart_prescribe + t_damping: smoothly increase impose_vel to the specified value
  • tstart_prescribe + t_damping < current time < tend_prescribe: the full impose_vel is applied
  • tend_prescribe < current time: no change of the motion, i.e. current status is maintained.
Default: 0.0
Note: t_damping will be renamed to t_ramping in the future, as it describes better the effect it has in the simulation. The exact version wherein this switch will take place is unknown, but will be appropriately announced via Release Notes.
rot_freq
For motion_type= ROTATE
Rotational frequency vector [rot/s] specified as a vector with x, y, and z-axis components.
Default: “0. 0. 0”
rot_freq_init
For motion_type= ROTATE
In case that the case is a restart you can specify initial frequency of rotation. With this you can start from, for example, 1000 RPM to an arbitrary RPM.
Default: “0. 0. 0”
rot_cntr
For motion_type= ROTATE and ROTATE_AXIS
Center-of-rotation for the rotational motion. For a body that is rotating around its axis of symmetry (for example, a gear), the center of rotation needs only to lie anywhere along the specified direction of the rotation vector (for example, on the axis of the gear).
Default: “0. 0. 0”
rot_axis
For motion_type= ROTATE_AXIS
Defines the axis of rotation of a body.
Default: “0. 0. 0”
rot_axis_freq
For motion_type= ROTATE_AXIS
Defines the frequency of rotation of the body.
Default: “0. 0. 0.” or 0.0 (depending on the motion type)
rot_axis_freq_init
For motion_type= ROTATE_AXIS
In case that the case is a restart you can specify initial frequency of rotation. With this you can start from, for example, 1000 RPM to an arbitrary RPM.
Default: 0.0
positionFile
The name of the file that contains the prescribed motion information.
Related options/commands: Motion: POSITION_FILE
rot_cntr
If this command is defined in the configuration file, it will use this point as the center of rotation and it will move it as specified by the position text file.
If this command is not specified, the code will rotate the body around the calculated center of mass.
Related options/commands: Motion: POSITION_FILE
isOrientation
If this switch is set to false, the code will look for a 7-column format input, reading the rotational velocity vectors. If it is set to true, the code will look for an 8-column format, which defines cosine values of the axis vector and the orientation scalar (in radians).
Related options/commands: Motion: POSITION_FILE
Default: false
orbit_cntr
Defines the planetary carrier center location.
It is sufficient that it lies on the year rotation axis, since the year rotation axis is specified separately.
orbit_radius
Distance between the orbit_cntr and the planet gear center (initial_centerOfDayRotation).
year_rotationVec
Axis of year rotation.
Can be defined as an arbitrary vector (it will be normalized automatically).
year_frequency
Frequency of the year rotation.
Units: [rot/s]
year_frequency_init
In case that the case is a restart you can specify initial year frequency of rotation. With this you can start from, for example, 1000 RPM to an arbitrary RPM.
Default: “0. 0. 0.” or 0.0 (depending on the motion type).
day_rotationVec
Axis of day rotation.
Can be defined as an arbitrary vector (it will be normalized automatically).
day_frequency
Frequency of the day rotation.
Units: [rot/s]
day_frequency_init
In case that the case is a restart you can specify initial day frequency of rotation. With this you can start from, for example, 1000 RPM to an arbitrary RPM.
Default: “0. 0. 0.” or 0.0 (depending on the motion type).
initial_centerOfDayRotation
Initial coordinates of the planetary gear for which the motion is defined.
Oscillatory motion is based on a cosine trigonometric function and it is defined by three parameters: oscillation amplitude, frequency and initial phase shift. It is only translatory oscillating motion (for example, piston motion), not rotational (for example, wiper motion).
oscill_ampl
Amplitude of the oscillatory motion.
Units: [m]
oscill_freq_init
Initial frequency of the oscillating motion.
When the case is a restart, you can specify initial frequency of oscillation. For example, you can start from 1000 Hz and go to an arbitrary oscillation frequency.
oscill_freq
Frequency of the oscillating motion.
oscill_phaseshift
Initial phase shift along the cosine function (for example, which defines the initial piston position).
Units: [deg]
Below commands are related to the CONROD type of motion. Given that the motion is rather complex, please refer to the Motion: CONROD section for a more detailed description.
phase_piston
CONROD motion is the only motion that defines the motion for two phases at a time – the piston and the conrod phase.
This command defines which piston phase belongs to a particular conrod.
phase_conrod
CONROD motion is the only motion that defines the motion for two phases at a time – the piston and the conrod phase.
This command defines which conrod phase belongs to a particular piston.
crankshaft_rot_freq
Rotational frequency of the crankshaft (needed for proper conrod/piston motion definition).
Keep in mind that the actual crankshaft motion is defined separately by ROTATE or ROTATE_AXIS.
Units: [rot/s]
crankshaft_rot_freq_init
Initial rotational frequency of the crankshaft, in case of a restart.
Units: [rot/s]
crankshaft_axis
Defines the axis of the crankshaft (necessary for proper conrod/piston motion definition).
crankshaft_cntr
Point belonging to the crankshaft axis (lying on the crankshaft axis).
crankshaft_normal
Cylinder-parallel vector in a direction pointing closer to crankshaft axis unit vector (careful with the sign, try the opposite direction if not working).
In other words, this is a vector parallel to the piston's line of movement and pointing in the direction of piston movement when moving away from TDC.
crankshaft_phaseshift
This command defines the initial angular position (phaseshift) of the particular conrod/piston pair with respect to the crankshaft_normal direction.
The refence point for this angle is when the crankshaft is parallel to the cylinder and the piston is closer to TDC. The sign is with respect to crankshaft axis.
Units: [deg]
crankshaft_rad
This defines the radius of the crankshaft – distance between the crankshaft axis and the conrod-crankshaft connection center.
Units: [m]
conrod_length
Defines the length of the conrod; the distance between the conrod-crankshaft and conrod-piston connections.
Units: [m]
piston_offset
Positive or negative offset in the direction of crankshaft_axis x crankshaft_normal (cross product).
Units:[m]
max_dist
max_dist command provides a maximum radius of the geometry with the center of the circle being on the rotation axis. In combination with the other motion definitions, this help calculate the reference velocity.
This value is automatically exported by SimLab pre-processor.
Best practice remains that the user should specify the ref_vel explicitly and avoid using the fall back option of automatic ref_vel calculation.
Units: [m]
The below options pertain only to the PASSIVE_RIGID_BODY motion. Use these options to add linear and torsional spring forces to the rigid body, as well as linear and angular constraints on the motion, which enables a number of new applications.
Note: There are no rigid-rigid body interactions or rigid-wall interactions in nanoFluidX, therefore collisions and impacts among multiple bodies is not possible.
body_mass
If the MOVINGWALL phase is a passive rigid body, you need to prescribe the mass of the body, as the discretized geometry based on particles that may not reflect the real geometry. For example, you can create just the hull of a ship and assign specific masses to the body, as if the geometry was a full ship.
This option recalculate the density of each particle, and the rho_0 of this phase is ignored.
init_CoM
Initial location of the center of mass.
Related options/commands: fluidCoupledMotion, Motion:PASSIVE_RIGID_BODY
init_vel
Initial linear velocity of the rigid body.
This is a vector value.
Units: [m/s]
init_angvel
Initial angular velocity of the rigid body.
This is a vector value.
Units: [rad/s]
mom_inert_diag
Diagonal components of the moment of inertia around the global x, y and z axes (for more details see Motion: PASSIVE_RIGID_BODY).
The corresponding values refer to xx, yy and zz components.
Units: [kg*m2]
mom_inert_offdiag
Off-diagonal components of the moment of inertia around the global x, y and z axes (for more details see Motion: PASSIVE_RIGID_BODY).
The corresponding values refer to xy, xz and yz components.
Units: [kg*m2]
If the inertial reference frame does not align with the global axes, for example, if the moment of inertia needs to be defined around the principal axes of the body, then additional information needs to be supplied to define the principal axes. To do this you need to define any two unit vectors of the principal axes, a third vector will be calculated by the code. The coordinates need to be specified with respect to the global axes.
mom_principal_ax_x_i
Unit vector in the x direction of the principal axis (for more details see Motion: PASSIVE_RIGID_BODY).
This is a vector value, for example “1.0 0 0” implies the principal axis is aligned with the global x axis in this case.
mom_principal_ax_y_i
Unit vector in the y direction of the principal axis (for more details see Motion: PASSIVE_RIGID_BODY).
This is a vector value, for example “0.0 1.0 0” implies the principal axis is aligned with the global y axis in this case.
mom_principal_ax_z_i
Unit vector in the z direction of the principal axis (for more details see Motion: PASSIVE_RIGID_BODY).
This is a vector value, for example “0 0 1.0” implies the principal axis is aligned with the global z axis in this case.
With the above rigid body related commands, you can simulate a freely moving rigid body that is interacting with the fluid. However, additional options are available to constrain motion and add linear or torsional springs. Unless another coordinate system is defined for the constraints (constraint reference frame), the code assumes constraint alignment with the global axes. However, if this is not the case, if some of the constraints are under angles, then constraint reference frame needs to be defined by specifying any two unit vectors that will define it. The coordinates need to be specified with respect to the global axes.
prbcon_ax_x_i
Unit vector in the x direction of the constraint axis (for more details see Motion: PASSIVE_RIGID_BODY).
This is a vector value, for example “1.0 0 0” implies the x axis of the constraint frame is aligned with the global x axis in this case.
prbcon_ax_y_i
Unit vector in the y direction of the constraint axis (for more details see Motion: PASSIVE_RIGID_BODY).
This is a vector value, for example “0.0 1.0 0” implies the y axis of the constraint frame is aligned with the global y axis in this case.
prbcon_ax_z_i
Unit vector in the z direction of the constraint axis (for more details see Motion: PASSIVE_RIGID_BODY).
This is a vector value, for example “0 0 1.0” implies the z axis of the constraint frame is aligned with the global z axis in this case.
Once the constraint reference frame has been defined, you can proceed to defining the constraints themselves. If you want to lock linear or angular degrees of freedom you can use the following.
prbcon_linlck_c
This is a vector value that defines which of the linear motions will be locked.
Use 1.0 to lock the motion and 0 to unlock the motion.
Example: “1.0 0 0” locks the linear motion in the x direction of the constraint frame.
prbcon_anglck_c
This is a vector value that defines which of the angular motions will be locked.
Use 1.0 to lock the motion and 0 to unlock the motion.
Example: “1.0 0 0” locks the angular motion around the x direction of the constraint frame.
Define linear and torsional springs using the following.
prbcon_linspr_k_c
Linear spring stiffness coefficient.
This is a vector value.
Units: [N/m]
prbcon_linspr_p_c
Pre-deformation distance with respect to the initial (equilibrium) position.
This is a vector value.
Units: [m]
prbcon_angspr_k_c
Torsional spring stiffness coefficient.
This is a vector value.
Units: [Nm/rad]
prbcon_angspr_p_c
Pre-deformation angle with respect to the initial (equilibrium) position.
This is a vector value.
Units: [rad]
prbcon_lindmp_c_c
Linear damping coefficients along the corresponding constraint axis.
Inactive when pinned.
Unit: [Ns/m]
prbcon_angdmp_c_c
Torsional damping coefficients around the corresponding constraint axis.
Unit: [Nms/rad]
However, it is often necessary to set the limits of motion, such that the constrained body would not go beyond a certain distance or beyond a certain angle value.
prbcon_linlim_pls_c
Allowed upper limit coordinate of the linear motion with respect to the init_CoM.
This is a vector value (to specify all three directions in the constraint reference frame).
Units: [m]
prbcon_linlim_mns_c
Allowed lower limit coordinate of the linear motion with respect to the init_CoM.
This is a vector value (to specify all three directions in the constraint reference frame).
Units: [m]
prbcon_anglim_pls_c
Allowed upper limit angle of the rotational motion with respect to the initial position.
This is a vector value (to specify all three directions in the constraint reference frame).
Units: [rad]
prbcon_anglim_mns_c
Allowed lower limit angle of the rotational motion with respect to the initial position.
This is a vector value (to specify all three directions in the constraint reference frame).
Units: [rad]
A special case of the limited motion is a hinge whose center of rotation is not the center of mass (axis of rotation does not pass through the center of mass). In this situation the axis of rotation needs to be specified, which can be done by translating the constraint reference frame to a new position and by modifying the rotational lock command.
prbcon_pt_i
This command is specified by the new origin of the constraint frame.
It is defined in the global coordinate system.
This is a vector value.
prbcon_ax_hinge_c
Because the rotations are now moved away from the center of mass, new rotational constraints need to be set in place.
This command overrides the prbcon_anglck_c command.
This is a vector value that defines which of the angular motions will be locked. Use 0.0 to lock the motion and 1 to unlock the motion.
Example: “1.0 0 0” unlocks only the angular motion around the x direction of the constraint frame.
By setting all three values to zero, one enables a spherical joint behavior.
prbcon_cnstfrc_c
A constant force applied in constraint frame.
This command is not active if the motion is pinned in the given direction.
Units: [N]
prbcon_cnsttrq_c
A constant torque applied in constraint frame (around a X, Y and Z axes).
This command is not active if the motion is pinned for the given rotation.
Units: [Nm]
prbcon_linvel_ctoi
Set this command to true to keep constraint frame stationary, set to false to rotate constraint frame with body frame.
Applies only to prbcon_linvel constraint.
prbcon_linvel_a_c
Set any element to a positive number to activate the preset time dependent linear velocity for that constraint axis.
Units: [m/s]
prbcon_linvel_f_c
Name of a 4-column file (t,u,v,w) for preset time dependent linear velocity applied in constraint frame.
Inactive for all pinned motion directions.
Units: [m/s]
prbcon_angvel_ctoi
Set this command to true to keep constraint frame stationary.
Set this command to false to rotate constraint frame with body frame.
Applies only to prbcon_angvel constraint.
prbcon_angvel_a_c
Set any element to a positive number to activate the preset time dependent linear velocity for that constraint axis.
Units: [Rad/s]
prbcon_angvel_f_c
Name of a 4-column file ( t, ω x , ω y , ω z MathType@MTEF@5@5@+= feaahqart1ev3aqatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr 4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbb a9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr 0=vqpWqaaeaabiGaciaacaqabeaadaqaaqaaaOqaaabaaaaaaaaape GaamiDaiaacYcacqaHjpWDpaWaaSbaaSqaa8qacaWG4baapaqabaGc peGaaiilaiabeM8a39aadaWgaaWcbaWdbiaadMhaa8aabeaak8qaca GGSaGaeqyYdC3damaaBaaaleaapeGaamOEaaWdaeqaaaaa@42B5@ ) for preset time dependent linear velocity applied in constraint frame.
Inactive for all pinned motion directions.
Units: [Rad/s]

For further clarification on the PASSIVE_RIGID_BODY motion, refer to the appropriate section of the Motion: PASSIVE_RIGID_BODY section.