Difference between revisions of "Setting Velocity and Transport Values"
Line 18: | Line 18: | ||
<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 scripted 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>(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 scripted 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 [[Boundary Condition Styles|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 standard units are | <li><tt>(style)</tt> specifies the [[Boundary Condition Styles|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 standard units are [[ConsistentUnits Command#Legacy and Consistent Units|velocity units]] for <tt>(value)</tt> and ms for <tt>(time)</tt> (but the units may change depending on the [[Boundary Condition Styles|<tt>(style)</tt> setting]]). | ||
<li><tt>(function)</tt> - if the <tt>(style)</tt> is <tt>function</tt> (or 6), this attribute in <tt>XML</tt> files specifies a [[User Defined Functions|user defined function]]. In scripted files, the [[User Defined Functions|user defined function]] should replace the <tt>(value)</tt> argument and must be entered as quoted text. The function should evaluate to the desired velocity in | <li><tt>(function)</tt> - if the <tt>(style)</tt> is <tt>function</tt> (or 6), this attribute in <tt>XML</tt> files specifies a [[User Defined Functions|user defined function]]. In scripted files, the [[User Defined Functions|user defined function]] should replace the <tt>(value)</tt> argument and must be entered as quoted text. The function should evaluate to the desired velocity in [[ConsistentUnits Command#Legacy and Consistent Units|velocity units]]. | ||
<li><tt>(id)</tt> - this attribute in <tt>XML</tt> files specifies an ID for the boundary condition. In scripted files, IDs are set using the [[#Boundary Condition ID|BoundaryID command]]. | <li><tt>(id)</tt> - this attribute in <tt>XML</tt> files specifies an ID for the boundary condition. In scripted files, IDs are set using the [[#Boundary Condition ID|BoundaryID command]]. |
Revision as of 13:39, 2 June 2015
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 standard units are velocity units 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 velocity units.
- (id) - this attribute in XML files specifies an ID for the boundary condition. In scripted files, IDs are set using the BoundaryID command.
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 single 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 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.
- (angle2) 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
When doing conduction calculations, you can set fixed temperatures on the grid. Temperature boundary conditions are ignored unless conduction is activated. The scripted Temperature command sets emperature conditions to all nodes within the shape command that encloses it:
Temperature (style),(value),<(time)>
In XML files, the command is:
<TempBC style='(style)' value='(value)' time='(time)' function='(function)'/>
where
- (style) specifies the style of the applied temperature. Each temperature depends on two parameters specified by arguments (value) and (time). If either argument is not supplied, they are set to zero. The standard units are degrees K 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 temperature in degrees K.
Thermal stresses are caused by temperature difference relative to the stress free temperature. If the stress free temperature has not been set, its default value is zero and thus temperature boundary conditions set the temperature difference. If the stress free temperature is set to a non-zero value, the temperature boundary conditions use the absolute temperature and the temperature difference is calculated by subtracting the stress free temperature.
Concentration Conditions
When doing diffusion calculations, you can set fixed concentrations on the grid (set as a potential from 0 to 1 where 1 is the saturation concentration of a material type). Concentration boundary conditions are ignored unless diffusion is activated. The scripted Concentration command sets concentration conditions to all nodes within the shape command that encloses it:
Concenration (style),(value),<(time)>
In XML files, the command is:
<ConcBC style='(style)' value='(value)' time='(time)' function='(function)'/>
where
- (style) specifies the style of the applied concentration potential. Each concentration depends on two parameters specified by arguments (value) and (time). If either argument is not supplied, they are set to zero. The standard units are dimensionless concentration potential 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 concentration potential (between 0 an 1).
Boundary Condition ID
The BoundaryID command (in scripted files only) sets an ID to assign to subsequent boundary conditions. The main reason to assign IDs to boundary conditions is to the control the calculation of reaction forces. The command is:
BoundaryID <(negnum)>
where (negnum) is an integer value (less than zero) for the boundary condition ID. All supported boundary conditions will use this ID until it is changed by another BoundaryID command. If (negnum) is omitted the ID reverts to zero. The number should be less than zero to avoid conflict with IDs for boundary conditions created by rigid material particles. The only boundary conditions that currently make use of an ID are velocity boundary conditions. In XML files, velocity boundary condition IDs are set with an attribute on the <DisBC> command.
Boundary conditions created by symmetry planes will automatically have IDs of -10, -11, -20, -21, -30, or -31, depending on the plane edge. Other boundary conditions should not use these IDs unless either there are no symmetry planes or you want the other boundary conditions lumped in with the symmetry plane boundary conditions.