Difference between revisions of "Setting Velocity and Transport Values"

From OSUPDOCS
Jump to navigation Jump to search
 
(113 intermediate revisions by the same user not shown)
Line 1: Line 1:
These commands are used within [[Grid BC Shape Commands|shape commands]] for [[Grid-Based Boundary Conditions|grid-based boundary conditions]] to set velocity, temperature, and/or concentration boundary conditions.
These commands are used within [[Grid-Based Boundary Conditions|grid-based boundary conditions]] blocks to set velocity conditions and boundary conditions for any transport properties (such as temperature or concentration).


== Velocity Conditions ==
== Velocity Conditions ==


The scripted <tt>Velocity</tt> command sets velocity conditions to all nodes within the [[Grid BC Shape Commands|shape command]] that encloses it:
The scripted <tt>Velocity</tt> command sets velocity conditions to all nodes within the [[Grid-Based Boundary Conditions|parents's block shape]]:
  Velocity (dir),(style),<(value)>,<(time)>
  Velocity (dir),(style),<(value)>,<(time)>
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 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]]. The standard units are mm/s 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>(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 [[ConsistentUnits Command#Legacy and Consistent Units|alt time units]] 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 mm/s.
<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 and ID for the boundary condition. In scripted files, IDs are set using the 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]].


</ul>
</ul>


=== Boundary Condition Styles ===
== Moving Wall Velocity Conditions ==


The possible boundary condition styles are defined below. In scripted files, the style can be set by name or number; in <tt>XML</tt> files, the style must be set by number. Unless otherwise specified, the units for <tt>(value)</tt> 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 <tt>(time)</tt> are ms.
[[File:movingwall.png|350px|right]]
 
A moving wall boundary condition models a wall moving through the grid normal to the <tt>x</tt>, <tt>y</tt>, or <tt>z</tt> axis with any provided velocity. This condition sets velocity on the wall surface and will include as many nodes on either side of wall as needed for optimal results. This type of boundary condition is illustrated on the right and it shows a wall moving in the <tt>x</tt> direction that is to the right of all material points. The wall starts on nodes selected by this <tt>Velocity</tt> command, but can move by a provided displacement function of time. Based on the current wall position, this condition sets velocity on all active nodes outside the wall (notes to the right of the pictured wall) and on all active nodes inside the wall (left of the pictured wall) that are within a distance <tt>d</tt> (in units of grid cells) of the wall.
 
If desired, this condition can specify a velocity gradient to have the nodal conditions vary with position. For example, for a wall moving in the <tt>x</tt> direction, a provided velocity gradient sets <math>dv/dx</math> and the <tt>x</tt>-direction velocity boundary condition applied to nodes near the wall are:
 
&nbsp;&nbsp;&nbsp;&nbsp;<math>v_i = v_{wall} + {dv\over dx}\left(x_i-x_{wall}\right)</math>
 
where <math>v_{wall}</math> is the wall velocity specified by this boundary condition, <math>x_i</math> is position of node with a boundary condition, and <math>x_{wall}</math> is the current wall position.
 
In scripted files, moving wall velocity boundary conditions are created by [[#Velocity Conditions|<tt>Velocity</tt>]] commands that set the <tt>(style)</tt> to "gradient" and adds some new parameters:
Velocity (dir),"gradient",(velFxn),0,(depth),<(gradFxn)>,<(dispFxn)>
 
In <tt>XML</tt> files, the <tt>DisBC</tt> command adds some new attributes::
 
<DisBC dir='(dir)' style='6' function='(velFxn)' depth='(depth)'
                gradfxn='(gradFxn)' dispfxn='(dispFxn)' id='(id)'/>
 
where the presence of a <tt>(depth)</tt> attribute makes this command a moving wall boundary condition. In the above commands, the parameters are:


<ul>
<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>(dir)</tt> is <tt>1</tt>, <tt>2</tt>, or <tt>3</tt> to specify wall moving 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). Moving walls could potentially be oriented in any direction or even curved, but only straight walls normal to a grid axis are implemented now.</li>
 
<li><tt>(velFxn)</tt> is a [[User Defined Functions|user defined function]] of time (<code>t</code> in [[ConsistentUnits Command#Legacy and Consistent Units|alt time units]]) and initial nodal point position (in [[ConsistentUnits Command#Legacy and Consistent Units|length units]]). The function should evaluate to the wall velocity in [[ConsistentUnits Command#Legacy and Consistent Units|velocity units]].</li>


<li><tt>linear</tt> (or 2) - the applied boundary condition is<br>
<li>In scripted files, the fourth parameter must be "0". The value is ignored, but it is needed for parameter alignment.</li>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<math>BC = ({\rm value})*(t-({\rm time}))</math>
<br>where t is the current time (in ms). This condition is applied only for times after <tt>(time)</tt>. The units for <tt>(value)</tt> should change to the standard units for the boundary condition per ms.


<li><tt>sine</tt> (or 3) - the applied boundary condition is<br>
<li><tt>(depth)</tt> has two functions. The sign of <tt>(depth)</tt> determines if the wall is at minimum edge (if minus) or positive edge (if plus) of material points along the selected axis. Walls are expected to be outside all material points and this parameter determines where the wall is relative to all material points. The magnitude of <tt>(depth)</tt> determines how many nodes will get velocity boundary conditions (the value of <tt>d</tt> in the above pictured moving wall in units of grid cells). Experience suggests the <tt>(depth)</tt> should be at least 1 grid cell and maybe 1.5 grid cells when using [[MPM Methods and Simulation Timing|spline shape functions]]. It can be adjusted for optimal results.</li>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<math>BC = ({\rm value})\sin\bigl[({\rm time})*t\bigr]</math>
<br>This condition is applied for all times. The units for <tt>(time)</tt> should change to 1/ms.


<li><tt>cosine</tt> (or 4) - the applied boundary condition is<br>
<li><tt>(gradFxn)</tt> is a [[User Defined Functions|user defined function]] of time (<code>t</code> in [[ConsistentUnits Command#Legacy and Consistent Units|alt time units]]) and current wall position (in [[ConsistentUnits Command#Legacy and Consistent Units|length units]]). The function should evaluate to a velocity gradient in the wall-axis direction in [[ConsistentUnits Command#Legacy and Consistent Units|(velocity units)/(length units)]]. If this parameter is omitted, the velocity gradient is assumed to be zero (all nodes near the wall get the same velocity). If <tt>(gradFxn)="mirror"</tt>, the gradient will be calculated from velocities extrapolated to the grid by interpolating from two active nodes near <tt>(depth)</tt> grid cells from the wall to the current wall position and velocity (see nodes "1" and "2" in the above pictured moving wall). A "mirror" gradient can improve boundary conditions in problems where you do not know the velocity gradient, but you do know it should not be zero.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</li>
<math>BC = ({\rm value})\cos\bigl[({\rm time})*t\bigr]</math>
<br>This condition is applied for all times. The units for <tt>(time)</tt> should change to 1/ms.


<li><tt>function</tt> (or 6) - the applied boundary condition is determined by a [[User Defined Functions|user-defined function]] of time (<tt>t</tt> 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 <tt>(time)</tt> is supplied, the condition starts at time <tt>(time)</tt> (in ms) and the function is evaluated at <tt>[t-(time)]</tt> (instead of at <tt>t</tt>)
<li><tt>(dispFxn)</tt> is a [[User Defined Functions|user defined function]] of time (<code>t</code> in [[ConsistentUnits Command#Legacy and Consistent Units|alt time units]]) and initial nodal point position (in [[ConsistentUnits Command#Legacy and Consistent Units|length units]]). The function should evaluate to the current wall displacement from its initial position in [[ConsistentUnits Command#Legacy and Consistent Units|length units]]. Often this function is integral of <tt>(velFxn)</tt>, but may differ, such as to change initial position to be offset from the initial node. If omitted, the displacement is zero or the wall is fixed on the initial node.</li>
 
<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>


</ul>
</ul>
Line 55: Line 70:
== Skewed Velocity Conditions ==
== Skewed Velocity Conditions ==


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:
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 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)>
  Velocity (skewDir),(style),(value),(time),(angle1),<(angle2)>
Line 61: Line 76:
in <tt>XML</tt> files, the command is:
in <tt>XML</tt> files, the command is:


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


where
where


* <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.
* <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</tt>). 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.
 
* <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.
 
* <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.


* <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.
* <tt>(angle2)</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)).


* <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.
Because having non-orthogonal BCs on the same node would not work as currently implementated, it not allowed. Velocities in X, Y, and Z directions are always allowed (including multiple ones in the same direction), but skewed conditions are only allowed on a node if all other velocity BCs already on that node are orthogonal to the skew direction. For this check to always work, skewed velocity BCs should be created last (because X, Y, and Z direction BCs are currently not checked for orthogonality). Skewed conditions also should not be used near [[#Moving Wall Velocity Conditions|moving wall boundary conditions]].


* <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)).
Note that the <tt>contactetc.pdf</tt> technical note provides a method to set velocities in two non-orthogonal directions if ever needed. It involves finding two orthogonal directions and modifying the velocities applied in those new directions to achieve desired results.


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


== Concentration Conditions ==
When doing [[Thermal Calculations|conduction calculations]], you can set fixed temperatures on the grid. Temperature boundary conditions are ignored unless [[Thermal Calculations|conduction is activated]]. The scripted <tt> Temperature </tt> command sets emperature conditions to all nodes within the [[Grid-Based Boundary Conditions|parents's block shape]]:
Temperature (style),(value),<(time)>
 
In <tt>XML</tt> files, the command is:
 
<TempBC style='(style)' value='(value)' time='(time)' function='(function)' id='(ID)'/>
where
 
* <tt>(style)</tt> specifies the [[Boundary Condition Styles|style of the applied temperature]]. Each temperature 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 degrees K for <tt>(value)</tt> and [[ConsistentUnits Command#Legacy and Consistent Units|alt time units]] for <tt>(time)</tt> (but the units may change depending on the [[Boundary Condition Styles|<tt>(style)</tt> setting]]).
* <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 temperature in degrees K.
*<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]].
 
Thermal stresses are caused by temperature difference relative to the [[Thermal Calculations#Stress Free Temperature|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 or Poroelasticity Conditions ==
 
When doing [[Diffusion Calculations|diffusion calculations]], these conditions set fixed concentration on the grid, but when doing [[Poroelasticity Calculations|Poroelasticity calculations]], these same conditions set pore pressure on the grid. Only one of these options can be active in a single simulation. These boundary conditions are ignored if neither [[Diffusion Calculations|diffusion calculations]] nor [[Poroelasticity Calculations|poroelasticity calculations]] are activated.
 
When doing [[Diffusion Calculations|diffusion calculations]], the concentration is set as a [[Diffusion Calculations|concentration potential]]. The scripted <tt>Concentration</tt> command sets concentration conditions to all nodes within the [[Grid-Based Boundary Conditions|parents's block shape]]:
Concentration (style),(value),<(time)>
 
When doing [[Poroelasticity Calculations|poroelasticity calculations]], the condition sets pore pressure. The scripted <tt>PorePressure</tt> command sets pore pressure conditions to all nodes within the [[Grid-Based Boundary Conditions|parents's block shape]]:
PorePressure (style),(value),<(time)>
 
In <tt>XML</tt> files, the concentration and pore pressure commands are the same (the simulations determine which conditions are set):
 
<ConcBC style='(style)' value='(value)' time='(time)' function='(function)'/>
In the above commands:
 
* <tt>(style)</tt> specifies the [[Boundary Condition Styles|style]] of the applied concentration potential or pore pressure. Each option 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. For diffusion, the standard units are [[Diffusion Calculations#Diffusion Material Properties|dimensionless concentration potential]] for <tt>(value)</tt> and [[ConsistentUnits Command#Legacy and Consistent Units|alt time units]] for <tt>(time)</tt>. For poroelasticity, the standard units are [[ConsistentUnits Command#Legacy and Consistent Units|pressure units]] for <tt>(value)</tt> and [[ConsistentUnits Command#Legacy and Consistent Units|alt time units]] for <tt>(time)</tt> (but the units for each may change depending on the [[Boundary Condition Styles|<tt>(style)</tt> setting]]).
 
* <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. For diffusion, the function should evaluate to the desired [[Diffusion Calculations|concentration potential]]. For poroelasticity, the function should evaluate to the desired pressure in  [[ConsistentUnits Command#Legacy and Consistent Units|pressure units]].
 
== Other Transport Conditions ==
 
When doing [[Additional Transport Calculations|other transport calculations]], you can set fixed transport value on the grid. In scripted files, the values are set by adding a fourth parameter to <tt>Concentration</tt> command to set all nodes within the [[Grid-Based Boundary Conditions|parents's block shape]]:
 
Concentration (style),(value),(time),(phaseStyle)
 
In <tt>XML</tt> files, the <tt><ConcBC></tt> adds a <tt>phase</tt> attribute (which must be numeric):
 
<ConcBC style='(style)' value='(value)' time='(time)' function='(function)' phase='(phaseStyle)'/>
where <tt>(phaseStyle)</tt> can be the following options:
 
* <tt>fracture</tt> (or phaseStyle=3): set to dimensionless value 0 to 1
* <tt>battery</tt> (or phaseStyle=4): set to dimensionless value 0 to 1
* <tt>conduction</tt> (or phaseStyle=5): set to value in volts.
 
All other parameters are defined [[#Concentration or Poroelasticity Conditions|above]]. To specify <tt>(phaseStyle)</tt> in scripted files, the <tt>(time)</tt> parameters is required. It can be set to default zero if not needed.
 
Some of these options are available only in [[OSParticulas]] and only useful when using materials that support them.
 
== Boundary Condition ID ==
 
The <tt>BoundaryID</tt> command (in scripted files only) sets an ID to assign to subsequent boundary conditions (velocity and temperature conditions only). The main reason to assign IDs to boundary conditions is to control the calculation of [[MPM Global Archiving Options|reaction forces or heating power]]. The command is:
 
BoundaryID <(negnum)>
 
where <tt>(negnum)</tt> 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 <tt>BoundaryID</tt> command. If <tt>(negnum)</tt> is omitted the ID reverts to zero and boundary conditions will stop getting IDs. The number should be less than zero to avoid conflict with IDs for boundary conditions created by [[Rigid Material|rigid material particles]]. The only boundary conditions that currently make use of an ID are [[#Velocity Conditions|velocity boundary conditions]], [[#Moving Wall Velocity Conditions|wall velocity boundary conditions]] and [[#Temperature Conditions|temperature boundary conditions]]. In <tt>XML</tt> files, boundary condition IDs are set with an attribute on the appropriate boundary condition command.
 
Velocity boundary conditions created by [[MPM Grid Generation#Symmetry Planes|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. Note that [[#Temperature Conditions|temperature boundary conditions]] on symmetry plane will not get these boundary IDs; you have to assign them IDs using this command.
 
Velocity boundary conditions created when [[ExtrapolateRigid Command|extrapolating rigid material particles]] before setting the boundary conditions will all automatically have ID of -40. When using the [[ExtrapolateRigid Command|ExtrapolateRigid mode]], all boundary conditions created by [[Rigid Material|rigid materials]] will have the same -40 boundary ID and the [[MPM Global Archiving Options|archived reaction force]] will be the total force on all those particles. In this mode, it is not possible to archive reaction forces from individual [[Rigid Material|rigid material]] types.

Latest revision as of 16:46, 17 November 2023

These commands are used within grid-based boundary conditions blocks to set velocity conditions and boundary conditions for any transport properties (such as temperature or concentration).

Velocity Conditions

The scripted Velocity command sets velocity conditions to all nodes within the parents's block shape:

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 alt time units 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.

Moving Wall Velocity Conditions

Movingwall.png

A moving wall boundary condition models a wall moving through the grid normal to the x, y, or z axis with any provided velocity. This condition sets velocity on the wall surface and will include as many nodes on either side of wall as needed for optimal results. This type of boundary condition is illustrated on the right and it shows a wall moving in the x direction that is to the right of all material points. The wall starts on nodes selected by this Velocity command, but can move by a provided displacement function of time. Based on the current wall position, this condition sets velocity on all active nodes outside the wall (notes to the right of the pictured wall) and on all active nodes inside the wall (left of the pictured wall) that are within a distance d (in units of grid cells) of the wall.

If desired, this condition can specify a velocity gradient to have the nodal conditions vary with position. For example, for a wall moving in the x direction, a provided velocity gradient sets [math]\displaystyle{ dv/dx }[/math] and the x-direction velocity boundary condition applied to nodes near the wall are:

    [math]\displaystyle{ v_i = v_{wall} + {dv\over dx}\left(x_i-x_{wall}\right) }[/math]

where [math]\displaystyle{ v_{wall} }[/math] is the wall velocity specified by this boundary condition, [math]\displaystyle{ x_i }[/math] is position of node with a boundary condition, and [math]\displaystyle{ x_{wall} }[/math] is the current wall position.

In scripted files, moving wall velocity boundary conditions are created by Velocity commands that set the (style) to "gradient" and adds some new parameters:

Velocity (dir),"gradient",(velFxn),0,(depth),<(gradFxn)>,<(dispFxn)>

In XML files, the DisBC command adds some new attributes::

<DisBC dir='(dir)' style='6' function='(velFxn)' depth='(depth)'
                gradfxn='(gradFxn)' dispfxn='(dispFxn)' id='(id)'/>

where the presence of a (depth) attribute makes this command a moving wall boundary condition. In the above commands, the parameters are:

  • (dir) is 1, 2, or 3 to specify wall moving 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). Moving walls could potentially be oriented in any direction or even curved, but only straight walls normal to a grid axis are implemented now.
  • (velFxn) is a user defined function of time (t in alt time units) and initial nodal point position (in length units). The function should evaluate to the wall velocity in velocity units.
  • In scripted files, the fourth parameter must be "0". The value is ignored, but it is needed for parameter alignment.
  • (depth) has two functions. The sign of (depth) determines if the wall is at minimum edge (if minus) or positive edge (if plus) of material points along the selected axis. Walls are expected to be outside all material points and this parameter determines where the wall is relative to all material points. The magnitude of (depth) determines how many nodes will get velocity boundary conditions (the value of d in the above pictured moving wall in units of grid cells). Experience suggests the (depth) should be at least 1 grid cell and maybe 1.5 grid cells when using spline shape functions. It can be adjusted for optimal results.
  • (gradFxn) is a user defined function of time (t in alt time units) and current wall position (in length units). The function should evaluate to a velocity gradient in the wall-axis direction in (velocity units)/(length units). If this parameter is omitted, the velocity gradient is assumed to be zero (all nodes near the wall get the same velocity). If (gradFxn)="mirror", the gradient will be calculated from velocities extrapolated to the grid by interpolating from two active nodes near (depth) grid cells from the wall to the current wall position and velocity (see nodes "1" and "2" in the above pictured moving wall). A "mirror" gradient can improve boundary conditions in problems where you do not know the velocity gradient, but you do know it should not be zero.
  • (dispFxn) is a user defined function of time (t in alt time units) and initial nodal point position (in length units). The function should evaluate to the current wall displacement from its initial position in length units. Often this function is integral of (velFxn), but may differ, such as to change initial position to be offset from the initial node. If omitted, the displacement is zero or the wall is fixed on the initial node.
  • (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). 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)).

Because having non-orthogonal BCs on the same node would not work as currently implementated, it not allowed. Velocities in X, Y, and Z directions are always allowed (including multiple ones in the same direction), but skewed conditions are only allowed on a node if all other velocity BCs already on that node are orthogonal to the skew direction. For this check to always work, skewed velocity BCs should be created last (because X, Y, and Z direction BCs are currently not checked for orthogonality). Skewed conditions also should not be used near moving wall boundary conditions.

Note that the contactetc.pdf technical note provides a method to set velocities in two non-orthogonal directions if ever needed. It involves finding two orthogonal directions and modifying the velocities applied in those new directions to achieve desired results.

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 parents's block shape:

Temperature (style),(value),<(time)>

In XML files, the command is:

<TempBC style='(style)' value='(value)' time='(time)' function='(function)' id='(ID)'/>

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 alt time units 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.
  • (id) - this attribute in XML files specifies an ID for the boundary condition. In scripted files, IDs are set using the BoundaryID command.

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 or Poroelasticity Conditions

When doing diffusion calculations, these conditions set fixed concentration on the grid, but when doing Poroelasticity calculations, these same conditions set pore pressure on the grid. Only one of these options can be active in a single simulation. These boundary conditions are ignored if neither diffusion calculations nor poroelasticity calculations are activated.

When doing diffusion calculations, the concentration is set as a concentration potential. The scripted Concentration command sets concentration conditions to all nodes within the parents's block shape:

Concentration (style),(value),<(time)>

When doing poroelasticity calculations, the condition sets pore pressure. The scripted PorePressure command sets pore pressure conditions to all nodes within the parents's block shape:

PorePressure (style),(value),<(time)>

In XML files, the concentration and pore pressure commands are the same (the simulations determine which conditions are set):

<ConcBC style='(style)' value='(value)' time='(time)' function='(function)'/>

In the above commands:

  • (style) specifies the style of the applied concentration potential or pore pressure. Each option depends on two parameters specified by arguments (value) and (time). If either argument is not supplied, they are set to zero. For diffusion, the standard units are dimensionless concentration potential for (value) and alt time units for (time). For poroelasticity, the standard units are pressure units for (value) and alt time units for (time) (but the units for each 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. For diffusion, the function should evaluate to the desired concentration potential. For poroelasticity, the function should evaluate to the desired pressure in pressure units.

Other Transport Conditions

When doing other transport calculations, you can set fixed transport value on the grid. In scripted files, the values are set by adding a fourth parameter to Concentration command to set all nodes within the parents's block shape:

Concentration (style),(value),(time),(phaseStyle)

In XML files, the <ConcBC> adds a phase attribute (which must be numeric):

<ConcBC style='(style)' value='(value)' time='(time)' function='(function)' phase='(phaseStyle)'/>

where (phaseStyle) can be the following options:

  • fracture (or phaseStyle=3): set to dimensionless value 0 to 1
  • battery (or phaseStyle=4): set to dimensionless value 0 to 1
  • conduction (or phaseStyle=5): set to value in volts.

All other parameters are defined above. To specify (phaseStyle) in scripted files, the (time) parameters is required. It can be set to default zero if not needed.

Some of these options are available only in OSParticulas and only useful when using materials that support them.

Boundary Condition ID

The BoundaryID command (in scripted files only) sets an ID to assign to subsequent boundary conditions (velocity and temperature conditions only). The main reason to assign IDs to boundary conditions is to control the calculation of reaction forces or heating power. 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 and boundary conditions will stop getting IDs. 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, wall velocity boundary conditions and temperature boundary conditions. In XML files, boundary condition IDs are set with an attribute on the appropriate boundary condition command.

Velocity 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. Note that temperature boundary conditions on symmetry plane will not get these boundary IDs; you have to assign them IDs using this command.

Velocity boundary conditions created when extrapolating rigid material particles before setting the boundary conditions will all automatically have ID of -40. When using the ExtrapolateRigid mode, all boundary conditions created by rigid materials will have the same -40 boundary ID and the archived reaction force will be the total force on all those particles. In this mode, it is not possible to archive reaction forces from individual rigid material types.