Difference between revisions of "Setting Material Point Initial Velocity"
(29 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
When [[MPM Region and Hole Commands|material points are created]] than can be assigned | When [[MPM Region and Hole Commands|material points are created]] than can be assigned an initial velocity or an initial angular momentum using the commands described below. | ||
__TOC__ | __TOC__ | ||
== Setting Initial Velocity == | |||
In scripted input files, the initial velocities are set using parameters to the [[MPM Region and Hole Commands#Region Commands|Region command]]. The velocities apply to all particles in the region. | |||
In | In <tt>XML</tt> input files, the velocity attributes on the [[MPM Region and Hole Commands#Region Commands|<tt><Body></tt> command]] can only be constants and they set a constant velocity to all particles in the region. To set velocities with a user defined function, intersperse the following commands within the <tt><Body></tt> element: | ||
<vel0X>(velx)</vel0X>, | |||
<vel0Y>(velz)</vel0Y>, | |||
<vel0Z>(velz)</vel0Z> | |||
These commands set each component of initial velocity of the particles created in the current region after the command using the supplied [[User Defined Functions|user defined functions]] of particle position (x, y, and z). If used, they override the values used in <tt>vx</tt>, <tt>vy</tt>, and <tt>vz</tt> attributes of the [[MPM Region and Hole Commands#Region Commands|<tt><Body></tt> command]]. The function value should be in [[ConsistentUnits Command#Legacy and Consistent Units|velocity units]]. If multiple commands are used in a single region, the new function replaces the previous one for all subsequently created material points. A command with empty value reverts to zero initial velocity. | |||
< | |||
Note that <tt>XML</tt> input files, unlike scripted files, can apply different functions to different groups of particles within a single [[MPM Region and Hole Commands#Region Commands|<tt><Body></tt> command]]. To do the same in scripted input files, simply create multiple [[MPM Region and Hole Commands#Region Commands|Region command blocks]]. | |||
== Setting Initial Angular Velocity == | |||
In scripted input files, the <tt>AngularMom0</tt> command sets the initial angular velocity for all particles in the current [[MPM Region and Hole Commands#Region Commands|region]] (it is only available in [[OSParticulas]]). In 2D simulations, the command takes one argument: | |||
AngularMom0 (Lp0z) | |||
while for 3D simulations, it takes 3 arguments: | while for 3D simulations, it takes 3 arguments: | ||
AngularMom0 (Lp0x),(Lp0y),(Lp0z) | AngularMom0 (Lp0x),(Lp0y),(Lp0z) | ||
(Lp0x), (Lp0y), and (Lp0z) are numerical values or user-defined functions of particle position that give the initial angular | |||
where <tt>(Lp0x)</tt>, <tt>(Lp0y)</tt>, and <tt>(Lp0z)</tt> are numerical values or [[User Defined Functions|user-defined functions]] of particle position (x, y, and z) that give the initial angular velocity in per [[ConsistentUnits Command#Legacy and Consistent Units|time units]]. The initial values apply to all particles in the current region, including particles created in shape commands before the <tt>AngularMom0</tt> command. | |||
In <tt>XML</tt> input files, the initial angular velocities are set by interspersing the following commands within the [[MPM Region and Hole Commands#Region Commands|<tt><Body></tt> element]]: | |||
<Lp0X>(Lp0x)</Lp0X> | |||
<Lp0Y>(Lp0y)</Lp0Y> | |||
<Lp0Z>(Lp0z)</Lp0ZZ> | |||
These commands set initial angular velocity of the particles in the current region. The value is interpreted as a [[User Defined Functions|user-defined function]] of particle position (x, y, z) that evaluates to angular in radians per [[ConsistentUnits Command#Legacy and Consistent Units|time units]]. If multiple commands are used in a single [[MPM Region and Hole Commands#Region Commands|<tt><Body></tt> element]], the new function replaces the previous one for all subsequently created material points. A command with empty value reverts to zero angular velocity. This initial setting only has an effect for simulations that track velocity gradient. | |||
Note that <tt>XML</tt> input files, unlike scripted files, can apply different functions to different groups of particles within a single [[MPM Region and Hole Commands#Region Commands|<tt><Body></tt> command]]. To do the same in scripted input files, simply create multiple [[MPM Region and Hole Commands#Region Commands|Region command blocks]]. | |||
=== Initial Velocity Gradient === | |||
Note that the above commands are setting angular velocity x, y, and z components that correspond to an antisymmetric velocity gradient. The initial velocity gradients in 2D and 3D become: | |||
<math>\nabla\vec V_p = \left(\begin{array}{cc} 0 & -\omega_z \\ \omega_z & 0 \end{array}\right) | |||
\qquad {\rm and} \qquad | |||
\nabla\vec V_p = \left(\begin{array}{ccc} 0 & -\omega_z & \omega_y \\ \omega_z & 0 & -\omega_x \\ -\omega_y & \omega_x & 0 \end{array}\right)</math> | |||
The initial particle angular momentum of a single particle due to initial angular velocities is: | |||
<math>\left(L_{p,x},L_{p,y},L_{p,z}\right) = | |||
\frac{M_p}{12}\left[\left(\Delta Y^2+\Delta Z^2\right)\omega_x, | |||
\left(\Delta X^2+\Delta Z^2\right)\omega_y,\left(\Delta X^2+\Delta Y^2\right)\omega_z\right] | |||
</math> | |||
where <math>\Delta X</math>, <math>\Delta Y</math>, and <math>\Delta Z</math> are the material point dimensions. |
Latest revision as of 17:11, 26 April 2024
When material points are created than can be assigned an initial velocity or an initial angular momentum using the commands described below.
Setting Initial Velocity
In scripted input files, the initial velocities are set using parameters to the Region command. The velocities apply to all particles in the region.
In XML input files, the velocity attributes on the <Body> command can only be constants and they set a constant velocity to all particles in the region. To set velocities with a user defined function, intersperse the following commands within the <Body> element:
<vel0X>(velx)</vel0X>, <vel0Y>(velz)</vel0Y>, <vel0Z>(velz)</vel0Z>
These commands set each component of initial velocity of the particles created in the current region after the command using the supplied user defined functions of particle position (x, y, and z). If used, they override the values used in vx, vy, and vz attributes of the <Body> command. The function value should be in velocity units. If multiple commands are used in a single region, the new function replaces the previous one for all subsequently created material points. A command with empty value reverts to zero initial velocity.
Note that XML input files, unlike scripted files, can apply different functions to different groups of particles within a single <Body> command. To do the same in scripted input files, simply create multiple Region command blocks.
Setting Initial Angular Velocity
In scripted input files, the AngularMom0 command sets the initial angular velocity for all particles in the current region (it is only available in OSParticulas). In 2D simulations, the command takes one argument:
AngularMom0 (Lp0z)
while for 3D simulations, it takes 3 arguments:
AngularMom0 (Lp0x),(Lp0y),(Lp0z)
where (Lp0x), (Lp0y), and (Lp0z) are numerical values or user-defined functions of particle position (x, y, and z) that give the initial angular velocity in per time units. The initial values apply to all particles in the current region, including particles created in shape commands before the AngularMom0 command.
In XML input files, the initial angular velocities are set by interspersing the following commands within the <Body> element:
<Lp0X>(Lp0x)</Lp0X> <Lp0Y>(Lp0y)</Lp0Y> <Lp0Z>(Lp0z)</Lp0ZZ>
These commands set initial angular velocity of the particles in the current region. The value is interpreted as a user-defined function of particle position (x, y, z) that evaluates to angular in radians per time units. If multiple commands are used in a single <Body> element, the new function replaces the previous one for all subsequently created material points. A command with empty value reverts to zero angular velocity. This initial setting only has an effect for simulations that track velocity gradient.
Note that XML input files, unlike scripted files, can apply different functions to different groups of particles within a single <Body> command. To do the same in scripted input files, simply create multiple Region command blocks.
Initial Velocity Gradient
Note that the above commands are setting angular velocity x, y, and z components that correspond to an antisymmetric velocity gradient. The initial velocity gradients in 2D and 3D become:
[math]\displaystyle{ \nabla\vec V_p = \left(\begin{array}{cc} 0 & -\omega_z \\ \omega_z & 0 \end{array}\right) \qquad {\rm and} \qquad \nabla\vec V_p = \left(\begin{array}{ccc} 0 & -\omega_z & \omega_y \\ \omega_z & 0 & -\omega_x \\ -\omega_y & \omega_x & 0 \end{array}\right) }[/math]
The initial particle angular momentum of a single particle due to initial angular velocities is:
[math]\displaystyle{ \left(L_{p,x},L_{p,y},L_{p,z}\right) = \frac{M_p}{12}\left[\left(\Delta Y^2+\Delta Z^2\right)\omega_x, \left(\Delta X^2+\Delta Z^2\right)\omega_y,\left(\Delta X^2+\Delta Y^2\right)\omega_z\right] }[/math]
where [math]\displaystyle{ \Delta X }[/math], [math]\displaystyle{ \Delta Y }[/math], and [math]\displaystyle{ \Delta Z }[/math] are the material point dimensions.