Difference between revisions of "Setting Velocity and Transport Values"

From OSUPDOCS
Jump to navigation Jump to search
Line 55: Line 55:
== Skewed Velocity Conditions ==
== Skewed Velocity Conditions ==


Setting the velocity along two direction is not the same as setting the velocity in a direction of that resultant vector. To set a single velocity in a direction that is not along a cartesian axes, you can use:
Using two [[#Velocity Conditions|velocity conditions]] along two axes is not the same as setting a fixed velocity along the direction of the resultant velocity vector. To set velocity in a direction that is not along a cartesian axes, you have to use a skewed velocity condition. In script files, the command is:


<pre>Velocity #1,#2,#3,#4,#5,&lt;#6&gt;
Velocity (skewDir),(style),(value),(time),(angle1),<(angle2)>
</pre>


<p>where</p>
in <tt>XML</tt> files, the command is:


<ul>
<DisBC dir='(skewDir)' style='(style)' vel='(value)' time='(time)' angle-'(angle1)' angle2='(angle2)'/>


<li>#1 defines two or three axes. It can only be <code>skewxy</code> (or <code>12</code> or <code>skewrz</code>) in 2D or axisymmetric, but can be <code>skewxy</code>, <code>skewxz</code>, <code>skewyz</code>, or <code>skewxyz</code> (<code>12</code>, <code>13</code>, <code>23</code>, or <code>123</code>) in 3D. The two axes define the plane of the direction or the combination <code>skewxyz</code> means velocity in any arbitrary polar direction.</li>
where


<li>#2 through #4 are the same as above and all are needed for alignment to the angle arguments in #5 and #6</li>
* <tt>(skewDir)</tt> defines two or three axes. For 2D or axisymmetric analyses, it can only be <tt>skewxy</tt> (or <tt>12</tt> or <tt>skewrz</t>). For 3D anlyses, it can additionally be <tt>skewxy</tt>, <tt>skewxz</tt>, <tt>skewyz</tt>, or <tt>skewxyz</tt> (or <tt>12</tt>, <tt>13</tt>, <tt>23</tt>, or <tt>123</tt>). Note that <tt>XML</tt> files must use the numeric options and not any of the "skew" options. When using two axes, those axes define the plane of the skewed direction. The option <tt>skewxyz</tt> means velocity in any arbitrary polar direction.


<li>#5 defines the normal vector for the velocity which is rotated clockwise by <code>#5</code> degrees from the first axis in a skew pair. In other words, <code>skewxy</code> applies velocity in the direction (cos(#5), -sin(#5), 0), <code>skewxy</code> applies velocity in the direction (cos(#5), 0, -sin(#5)), and <code>skewyz</code> applies velocity in the direction (0, cos(#5), -sin(#5)). For <code>skewxyz</code>, <code>#5</code> is a polar angle as explained next.</LI>
* <tt>(style)</tt>, <tt>(value)</tt>, and <tt>(time)</tt> mean the same as for [[#Velocity Conditions}velocity conditions]] along an axis. In scripted files, all these parameters must be supplied to preserve alignment of parameters through to the <tt>(angle)</tt> parameters.


<li>#6 is only used for <code>skewxyz</code> and it is the azimuthal angle. The normal vector will be (cos(#6) sin(#5), sin(#6) sin(#5), cos(#5)).</dd>
* <tt>(angle1)</tt> defines the direction for the normal vector for the velocity as a clockwise rotation from the first axis in a skew pair. In other words, <tt>skewxy</tt> applies velocity in the direction (cos(angle1), -sin(angle1)), 0), <tt>skewxz</tt> applies velocity in the direction (cos(angle1), 0, -sin(angle1)), and <tt>skewyz</tt> applies velocity in the direction (0, cos(angle1), -sin(angle1)). For <tt>skewxyz</tt>, <tt>(angle1)</tt> is a polar angle as explained next.
</ul>
 
* <tt>(angle1)</tt> is only used for <tt>skewxyz</tt> and it is the azimuthal angle. The normal vector will be (cos(angle2) sin(angle1) sin(angle2) sin(angle1), cos(angle1)).


== Temperature Conditions ==
== Temperature Conditions ==


== Concentration Conditions ==
== Concentration Conditions ==

Revision as of 12:15, 24 December 2013

These commands are used within shape commands for grid-based boundary conditions to set velocity, temperature, and/or concentration boundary conditions.

Velocity Conditions

The scripted Velocity command sets velocity conditions to all nodes within the shape command that encloses it:

Velocity (dir),(style),<(value)>,<(time)>

In XML files, the command is:

<DisBC dir='(dir)' style='(style)' vel='(value)' time='(time)'
                function='(function)' id='(id)'/>

where

  • (dir) is 1, 2, or 3 to specify the velocity direction as in the x, y, or z direction (In scripted files, (dir) can be x, y, or z or can be R or Z if axisymmetric). You can also set velocity in a direction that is not along an axis. For details see help on skewed velocity conditions
  • (style) specifies the style of the applied velocity. Each velocity depends on two parameters specified by arguments (value) and (time). If either argument is not supplied, they are set to zero. The styles are described below. The standard units are mm/s for (value) and ms for (time) (but the units may change depending on the (style) setting).
  • (function) - if the (style) is function (or 6), this attribute in XML files specifies a user defined function. In scripted files, the user defined function should replace the (value) argument and must be entered as quoted text. The function should evaluate to the desired velocity in mm/s.
  • (id) - this attribute in XML files specifies and ID for the boundary condition. In scripted files, IDs are set using the BoundaryID command.

Boundary Condition Styles

The possible boundary condition styles are defined below. In scripted files, the style can be set by name or number; in XML files, the style must be set by number. Unless otherwise specified, the units for (value) are the standard units for the type of boundary condition (i.e., mm/s for velocity, degrees K for temperature, and concentration potential for concentration) and the units for (time) are ms.

  • constant (or 1) - the applied boundary conditions is set to the constant (value) and it is applied for times after (time).
  • linear (or 2) - the applied boundary condition is
                         [math]\displaystyle{ BC = ({\rm value})*(t-({\rm time})) }[/math]
    where t is the current time (in ms). This condition is applied only for times after (time). The units for (value) should change to the standard units for the boundary condition per ms.
  • sine (or 3) - the applied boundary condition is
                         [math]\displaystyle{ BC = ({\rm value})\sin\bigl[({\rm time})*t\bigr] }[/math]
    This condition is applied for all times. The units for (time) should change to 1/ms.
  • cosine (or 4) - the applied boundary condition is
                         [math]\displaystyle{ BC = ({\rm value})\cos\bigl[({\rm time})*t\bigr] }[/math]
    This condition is applied for all times. The units for (time) should change to 1/ms.
  • function (or 6) - the applied boundary condition is determined by a user-defined function of time (t in ms), nodal point position , and/or of current clockwise particle rotation angle (2D only). The function should evaluate to the desired value in the standard units for the type of boundary condition. If (time) is supplied, the condition starts at time (time) (in ms) and the function is evaluated at [t-(time)] (instead of at t)

Skewed Velocity Conditions

Using two velocity conditions along two axes is not the same as setting a fixed velocity along the direction of the resultant velocity vector. To set velocity in a direction that is not along a cartesian axes, you have to use a skewed velocity condition. In script files, the command is:

Velocity (skewDir),(style),(value),(time),(angle1),<(angle2)>

in XML files, the command is:

<DisBC dir='(skewDir)' style='(style)' vel='(value)' time='(time)' angle-'(angle1)' angle2='(angle2)'/>

where

  • (skewDir) defines two or three axes. For 2D or axisymmetric analyses, it can only be skewxy (or 12 or skewrz</t>). For 3D anlyses, it can additionally be skewxy, skewxz, skewyz, or skewxyz (or 12, 13, 23, or 123). Note that XML files must use the numeric options and not any of the "skew" options. When using two axes, those axes define the plane of the skewed direction. The option skewxyz means velocity in any arbitrary polar direction.
  • (style), (value), and (time) mean the same as for [[#Velocity Conditions}velocity conditions]] along an axis. In scripted files, all these parameters must be supplied to preserve alignment of parameters through to the (angle) parameters.
* (angle1) defines the direction for the normal vector for the velocity as a clockwise rotation from the first axis in a skew pair. In other words, skewxy applies velocity in the direction (cos(angle1), -sin(angle1)), 0), skewxz applies velocity in the direction (cos(angle1), 0, -sin(angle1)), and skewyz applies velocity in the direction (0, cos(angle1), -sin(angle1)). For skewxyz, (angle1) is a polar angle as explained next.
* (angle1) is only used for skewxyz and it is the azimuthal angle. The normal vector will be (cos(angle2) sin(angle1) sin(angle2) sin(angle1), cos(angle1)).

Temperature Conditions

Concentration Conditions