Difference between revisions of "Setting Material Point Initial Velocity"

From OSUPDOCS
Jump to navigation Jump to search
Line 4: Line 4:
== Setting Initial Velocity ==
== Setting Initial Velocity ==


In scripted input files, the initial velocities or set using parameters to the [[MPM Region and Hole Commands|#Region|Region command]]. The velocities apply to all particles in the region.
In scripted input files, the initial velocities or set using parameters to the [[MPM Region and Hole Commands#Region Command|Region command]]. The velocities apply to all particles in the region.


In <tt>XML</tt> input files, the velocity attributes on the [[MPM Region and Hole Commands|#Region|<Body> command]] can only be constants and they set a constant velocity to all particles in the region. To set different velocity or to use a
In <tt>XML</tt> input files, the velocity attributes on the [[MPM Region and Hole Commands#Region Command|<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>20*x</vel0X>,
<vel0Y>50-2*y</vel0Y>,
<vel0Z>34</vel0Z>
 
These commands set initial velocity of the particles in the current region. If used, they override the values used in vx, vy, and vz attributes of the <Body> command. The value is interpreted as a user-defined function of particle position that evaluates to velocity 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.


== Setting Initial Angular Momentum ==
== Setting Initial Angular Momentum ==

Revision as of 16:47, 23 July 2016

When material points are created than can be assigned and initial velocity or an initial angular momentum use the commands described below.

Setting Initial Velocity

In scripted input files, the initial velocities or 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>20*x</vel0X>,
<vel0Y>50-2*y</vel0Y>,
<vel0Z>34</vel0Z>

These commands set initial velocity of the particles in the current region. If used, they override the values used in vx, vy, and vz attributes of the <Body> command. The value is interpreted as a user-defined function of particle position that evaluates to velocity 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.

Setting Initial Angular Momentum