Difference between revisions of "Grid-Based Boundary Conditions"

From OSUPDOCS
Jump to navigation Jump to search
Line 4: Line 4:
Grid-based boundary conditions are used to create fixed edges, to create moving edges that displace the object, and for setting boundary temperature or concentration. Fixed edges are created be setting velocity to zero. If the edge is a symmetry plane in the object, however, it is better to create the [[MPM Grid Generation#Symmetry Planes|symmetry plane boundary conditions automatically]] rather then to set them manually with boundary condition commands. The use of a moving edge to apply displacements is limited to small displacements because in large-displacement problems, the particles may move away from the boundary conditions and the conditions will no longer have the correct influence. The alternative method for creating a moving edge is to use [[Rigid Material|rigid material]] particles set to use the [[Rigid Material#Moving Boundary Condition|moving boundary condition mode]]. These particles create grid-based boundary conditions that move with the particle position. They can set velocity or moving temperature and concentration values. Besides grid-based conditions, simulations can set [[Particle-Based Boundary Conditions]].
Grid-based boundary conditions are used to create fixed edges, to create moving edges that displace the object, and for setting boundary temperature or concentration. Fixed edges are created be setting velocity to zero. If the edge is a symmetry plane in the object, however, it is better to create the [[MPM Grid Generation#Symmetry Planes|symmetry plane boundary conditions automatically]] rather then to set them manually with boundary condition commands. The use of a moving edge to apply displacements is limited to small displacements because in large-displacement problems, the particles may move away from the boundary conditions and the conditions will no longer have the correct influence. The alternative method for creating a moving edge is to use [[Rigid Material|rigid material]] particles set to use the [[Rigid Material#Moving Boundary Condition|moving boundary condition mode]]. These particles create grid-based boundary conditions that move with the particle position. They can set velocity or moving temperature and concentration values. Besides grid-based conditions, simulations can set [[Particle-Based Boundary Conditions]].


== Grid-Based Boundary Condition in Scripted Files ==
== Grid-Based Boundary Condition Commands ==


All grid-based boundary conditions are created by a series of [[Grid BC Shape Commands|shape commands]] that select nodes on the grids. The [[Grid BC Shape Commands|shape commands]] define shapes (lines or arcs) and all nodes near those shapes are selected.. In scripted 2D simulations, the commands are
In scripted files, all grid-based boundary conditions are created by a series of <tt>GridBC</tt>command blocks that select nodes on the grids:


* [[Grid BC Shape Commands#Line (2D or Axisymmetric)|MoveLine]] - select nodes along a line
GridBC
* [[Grid BC Shape Commands#Arc (2D or Axisymmetric)|MoveArc]] - select nodes along an arc
  (one 2D or 3D shape command, which can be nested)
  (one or more velocity, temperature, or concentration condition)
    ...
EndGridBC


In scripted 3D simulations, the command is:
In <tt>XML</tt> files, grid-based boundary conditions are created with a <tt>&lt;BCShape&gt;</tt> block
 
<BCLShape>
  (one 2D or 3D shape command, which can be nested)
  (one or more velocity, temperature, or concentration condition)
    ...
</BCLine>
 
which must be within the main <tt>&lt;GridBC&gt;</tt> block.
 
The nodes that will get boundary conditions are selected by defining one [[2D Shapes||2D shape]] (for 2D simulations) or one [[3D Shapes||3D shape]] (for 3D simulations). The shape be a [[Nested Shapes}nested shape]].


* [[Grid BC Shape Commands#Box or Cylinder (3D)|MoveBox]] - select nodes within a box or a cylinder


The commands within these [[Grid BC Shape Commands|shape commands]] are used to set [[Setting Velocity, Temperature, and Concentration|velocity, temperature and/or concentration conditions]].
The commands within these [[Grid BC Shape Commands|shape commands]] are used to set [[Setting Velocity, Temperature, and Concentration|velocity, temperature and/or concentration conditions]].
The command to select a line through a 2D mesh in scripted files is:
MoveLine (x1),(y1),(x2),(y2),<(tolerance)>
  (one or more velocity, temperature, or concentration condition)
    ...
EndMoveLine
In <tt>XML</tt> files, a line is selected with:
<BCLine units='(units)' x1='(x1)' y1='(y1)' x2='(x2)' y2='(y2)' tolerance='(tolerance)'>
  (one or more velocity, temperature, or concentration condition)
    ...
</BCLine>
where
* <tt>(x1, y1)</tt> to <tt>(x2, y2)</tt> define <tt>(x, y)</tt> coordinates for the points at the beginning and end of the line (or <tt>(R, Z)</tt> coordinates if axisymmetric). The units are [[ConsistentUnits Command#Legacy and Consistent Units|length units]] (or determined by a [[Units Attribute|units attribute]] in <tt>XML</tt> files). In <tt>XML</tt> files, the coordinates can alternatively be specified [[2D MPM Shape Commands#Relative Grid Locations|relative to the mesh edges]].
* <tt>(tolerance)</tt> is an optional tolerance. The units are [[ConsistentUnits Command#Legacy and Consistent Units|length units]] (or determined by a [[Units Attribute|units attribute]] in <tt>XML</tt> files). In <tt>XML</tt> files, you can optionally use the format <tt>'*0.5'</tt> to set the tolerance to any factor times the minimum cell dimension in the current mesh.  If it is omitted, the tolerance will be set to a small number appropriate for the current background grid cell dimensions.
This command will apply [[Setting Velocity, Temperature, and Concentration|velocity, temperature, and/or concentration boundary conditions]] to all nodes within <tt>(tolerance)</tt> of the line from <tt>(x1, y1)</tt> to <tt>(x2, y2)</tt>.


== Grid-Based Boundary Condition in XML Files ==
== Grid-Based Boundary Condition in XML Files ==

Revision as of 10:06, 8 April 2017

Introduction

Grid-based boundary conditions are used to create fixed edges, to create moving edges that displace the object, and for setting boundary temperature or concentration. Fixed edges are created be setting velocity to zero. If the edge is a symmetry plane in the object, however, it is better to create the symmetry plane boundary conditions automatically rather then to set them manually with boundary condition commands. The use of a moving edge to apply displacements is limited to small displacements because in large-displacement problems, the particles may move away from the boundary conditions and the conditions will no longer have the correct influence. The alternative method for creating a moving edge is to use rigid material particles set to use the moving boundary condition mode. These particles create grid-based boundary conditions that move with the particle position. They can set velocity or moving temperature and concentration values. Besides grid-based conditions, simulations can set Particle-Based Boundary Conditions.

Grid-Based Boundary Condition Commands

In scripted files, all grid-based boundary conditions are created by a series of GridBCcommand blocks that select nodes on the grids:

GridBC
  (one 2D or 3D shape command, which can be nested)
  (one or more velocity, temperature, or concentration condition)
    ...
EndGridBC

In XML files, grid-based boundary conditions are created with a <BCShape> block

<BCLShape>
  (one 2D or 3D shape command, which can be nested)
  (one or more velocity, temperature, or concentration condition)
    ...
</BCLine>

which must be within the main <GridBC> block.

The nodes that will get boundary conditions are selected by defining one |2D shape (for 2D simulations) or one |3D shape (for 3D simulations). The shape be a [[Nested Shapes}nested shape]].


The commands within these shape commands are used to set velocity, temperature and/or concentration conditions.

The command to select a line through a 2D mesh in scripted files is:

MoveLine (x1),(y1),(x2),(y2),<(tolerance)>
  (one or more velocity, temperature, or concentration condition)
    ...
EndMoveLine

In XML files, a line is selected with:

<BCLine units='(units)' x1='(x1)' y1='(y1)' x2='(x2)' y2='(y2)' tolerance='(tolerance)'>
  (one or more velocity, temperature, or concentration condition)
    ...
</BCLine>

where

  • (x1, y1) to (x2, y2) define (x, y) coordinates for the points at the beginning and end of the line (or (R, Z) coordinates if axisymmetric). The units are length units (or determined by a units attribute in XML files). In XML files, the coordinates can alternatively be specified relative to the mesh edges.
  • (tolerance) is an optional tolerance. The units are length units (or determined by a units attribute in XML files). In XML files, you can optionally use the format '*0.5' to set the tolerance to any factor times the minimum cell dimension in the current mesh. If it is omitted, the tolerance will be set to a small number appropriate for the current background grid cell dimensions.

This command will apply velocity, temperature, and/or concentration boundary conditions to all nodes within (tolerance) of the line from (x1, y1) to (x2, y2).

Grid-Based Boundary Condition in XML Files

All grid-based boundary conditions must be set up within a single <GridBCs> element. The format is

<GridBCs>
   (one or more grid BC shape commands)
     ...
   <DisplacementBCs>
      (one or more explicit boundary conditions)
   </DisplacementBCs>
</GridBCs>

There are two ways to specify grid boundary conditions. The most common approach is to generate boundary conditions using one or more shape commands to select nodes and assign specified velocity, temperature, and/or concentration conditions to those nodes. The other way is to explicitly list each grid point. The explicit method is shown in the <DisplacementBCs> section above; it is limited to velocity conditions, and is usually generated with other software. You can use both shape commands and a <DisplacementBCs> section in the same input file.