Difference between revisions of "Setting Velocity and Transport Values"
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
== Velocity Conditions == | == Velocity Conditions == | ||
=== Boundary Condition Styles == | The scripte <tt>Velocity</tt> command sets velocity conditions to all nodes with the [[Grid BC Shape Commands|shape command]] that encloses it:</p> | ||
Velocity (dir),(style),<(value)>,<(time)> | |||
In <tt>XML</tt> files, the command is: | |||
<DisBC dir='(dir)' style='(style)' vel='(value)' time='(time)' function='(function)' id='(id)'/> | |||
where | |||
<ul> | |||
<li><tt>(dir)</tt> is <tt>1</tt>, <tt>2</tt>, or <tt>3</tt> to specify the velocity direction as in the <tt>x</tt>, <tt>y</tt>, or <tt>z</tt> direction (In script files, <tt>(dir)</tt> can be <tt>x</tt>, <tt>y</tt>, or <tt>z</tt> or can be <tt>R</tt> or <tt>Z</tt> if axisymmetric). You can also set velocity in a direction that is not along an axis. For details see help on [[Skewed Velocity Conditions|skewed velocity conditions]] | |||
<li><tt>(style)</tt> specifies the style of the applied velocity. Each velocity depends on two parameters specified by arguments <tt>(value)</tt> and <tt>(time)</tt>. If either argument is not supplied, they are set to zero. The styles are described [[Boundary Condition Styles|below]]. | |||
<li><tt>(function)</tt> | |||
<li><tt>(id)</tt> | |||
</ul> | |||
=== Boundary Condition Styles === | |||
The possible boundary condition styles are defined below. In script files, the style can be set by name or number; in <tt>XML</tt> files, the style must be set by number: | |||
<ul> | |||
<li><tt>constant</tt> (or 1) - the applied boundary conditions is set to the constant <tt>(value)</tt> and it is applied for times after <tt>(time)</tt>. | |||
<li><tt>linear</tt> - the applied boundary condition is | |||
| |||
<math>BC = (value)(t-(time))</math> | |||
is <code>arg1 * (time-arg2)</code> where <code>time</code> is the current time; the velocity is applied for times after <code>arg2</code>. (<code>arg1</code> is in mm/sec/ms and <code>arg2</code> is in ms).</li> | |||
<li><code>"sine"</code> - the applied velocity is <code>arg1 * sin(arg2*time)</code> where <code>time</code> is the current time; the velocity is applied for all times. (<code>arg1</code> is in mm/sec and <code>arg2</code> is in 1/ms).</li> | |||
<li><code>"cosine"</code> - the applied velocity is <code>arg1 * cos(arg2*time)</code> where <code>time</code> is the current time; the velocity is applied for all times. (<code>arg1</code> is in mm/sec and <code>arg2</code> is in 1/ms).</li> | |||
<li><code>"function"</code> - the applied velocity is determined by a <a href="function.html">user-defined function</a> of time (<code>t</code> in ms), nodal point position (<code>x</code>, <code>y</code>, and <code>z</code> in mm), and/or of current clockwise particle rotation angle (<code>q</code> in radians, 2D only), entered as quoted text in #3 (<code>arg1</code>). The function should evaluate to the desired velocity in mm/s. If <code>arg2</code> is supplied, the velocity starts at time <code>arg2</code> (in ms) and the function is evaluated at <code>[t-arg2]</code> (in ms). | |||
</li> | |||
== Skewed Velocity Conditions == | == Skewed Velocity Conditions == |
Revision as of 12:38, 20 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 scripte Velocity command sets velocity conditions to all nodes with 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 script 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.
- (function)
- (id)
Boundary Condition Styles
The possible boundary condition styles are defined below. In script files, the style can be set by name or number; in XML files, the style must be set by number:
- constant (or 1) - the applied boundary conditions is set to the constant (value) and it is applied for times after (time).
- linear - the applied boundary condition is
[math]\displaystyle{ BC = (value)(t-(time)) }[/math]
is
arg1 * (time-arg2)
wheretime
is the current time; the velocity is applied for times afterarg2
. (arg1
is in mm/sec/ms andarg2
is in ms). "sine"
- the applied velocity isarg1 * sin(arg2*time)
wheretime
is the current time; the velocity is applied for all times. (arg1
is in mm/sec andarg2
is in 1/ms)."cosine"
- the applied velocity isarg1 * cos(arg2*time)
wheretime
is the current time; the velocity is applied for all times. (arg1
is in mm/sec andarg2
is in 1/ms)."function"
- the applied velocity is determined by a <a href="function.html">user-defined function</a> of time (t
in ms), nodal point position (x
,y
, andz
in mm), and/or of current clockwise particle rotation angle (q
in radians, 2D only), entered as quoted text in #3 (arg1
). The function should evaluate to the desired velocity in mm/s. Ifarg2
is supplied, the velocity starts at timearg2
(in ms) and the function is evaluated at[t-arg2]
(in ms).