Difference between revisions of "Grid BC Shape Commands"
Line 19: | Line 19: | ||
where | 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 mm (or determined by a [[Units Attribute|units attribute]] in <tt>XML</tt> files). | * <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 mm (or determined by a [[Units Attribute|units attribute]] in <tt>XML</tt> files). In <tt>XML</tt> files, the coordinates can alternatively be specified [[#Relative Grid Locations|relative to the mesh edges]]. | ||
* <tt>(tolerance)</tt> is an optional tolerance. If it is omitted, the tolerance will be set to a small | * <tt>(tolerance)</tt> is an optional tolerance. The units are mm (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 velocity, temperature, and/or concentration boundary conditions to all nodes with <tt>(tolerance)</tt> of the line from <tt>(x1, y1)</tt> to <tt>(x2, y2)</tt>. | This command will apply velocity, temperature, and/or concentration boundary conditions to all nodes with <tt>(tolerance)</tt> of the line from <tt>(x1, y1)</tt> to <tt>(x2, y2)</tt>. | ||
Line 43: | Line 43: | ||
where | where | ||
* <tt>(x1, y1)</tt> to <tt>(x2, y2)</tt> define <tt>(x, y)</tt> coordinates for the corners of a rectangular area enclosing the arc (or <tt>(R, Z)</tt> coordinates if axisymmetric). The units are mm (or determined by a [[Units Attribute|units attribute]] in <tt>XML</tt> files). | * <tt>(x1, y1)</tt> to <tt>(x2, y2)</tt> define <tt>(x, y)</tt> coordinates for the corners of a rectangular area enclosing the arc (or <tt>(R, Z)</tt> coordinates if axisymmetric). The units are mm (or determined by a [[Units Attribute|units attribute]] in <tt>XML</tt> files). In <tt>XML</tt> files, the coordinates can alternatively be specified [[#Relative Grid Locations|relative to the mesh edges]] | ||
* <tt>(startAng)</tt> and <tt>(endAng)</tt> give the start and end angle (in degrees) to specify the arc. | * <tt>(startAng)</tt> and <tt>(endAng)</tt> give the start and end angle (in degrees) to specify the arc. | ||
* <tt>(tolerance)</tt> is an optional tolerance. If it is omitted, the tolerance will be set to a small | * <tt>(tolerance)</tt> is an optional tolerance. The units are mm (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 velocity, temperature, and/or concentration boundary conditions to all nodes within <tt>(tolerance)</tt> the arc. The arc is traced in a counter-clockwise direction from <tt>(startAng)</tt> to <tt>(endAng)</tt> with angle = 0 corresponding to the position along the positive x axis. | This command will apply velocity, temperature, and/or concentration boundary conditions to all nodes within <tt>(tolerance)</tt> the arc. The arc is traced in a counter-clockwise direction from <tt>(startAng)</tt> to <tt>(endAng)</tt> with angle = 0 corresponding to the position along the positive x axis. | ||
== Rectangle == | == Rectangle (2D or Axisymmetric) == | ||
== Box (3D) == | == Box (3D) == | ||
== Relative Grid Locations == | |||
Rather than hard code positions for boundary conditions or shapes that define material points, any coordinate specified in <tt>XML</tt> files (''e.g''., an entry for <tt>(x1)</tt>, <tt>(x2)</tt>, <tt>(xmin)</tt>, <tt>(xmax)</tt>, ''etc.'') can be the text <tt>'min'</tt>, <tt>'max'</tt>, <tt>'min-3'</tt>, <tt>'min+1.2'</tt>, <tt>'max-3.8'</tt>, <tt>'max+2'</tt>, ''etc.'', meaning the minimum, the maximum, or a specified number of cells relative to the minimum or maximum of the current mesh. For GIMP calculations <tt>'min'</tt> and <tt>'max'</tt> will be limits of useable mesh while <tt>'min-1'</tt> and <tt>'max+1'</tt> will be limits to the total mesh. For backward compatibility, <tt>min+</tt>, <tt>min-</tt>, <tt>max+</tt>, and <tt>max-</tt> refer to plus or minus one cell from the minimum or maximum of the current mesh. |
Revision as of 11:45, 20 December 2013
These commands define shapes. All nodes contained with in the shape will be assigned boundary conditions specified within the shape command.
Line (2D and Axisymmetric)
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 mm (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 mm (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 with (tolerance) of the line from (x1, y1) to (x2, y2).
Arc (2D or Axisymmetric)
The command to select an arc through a 2D mesh in scripted files is:
MoveArc (x1),(y1),(x2),(y2),(startAng),(endAng),<(tolerance)> (one or more velocity, temperature, or concentration condition) ... EndMoveLine
In XML files, a line is selected with:
<BCArc units='(units)' x1='(x1)' y1='(y1)' x2='(x2)' y2='(y2)' start='(startAng)' end='(endAng)' tolerance='(tolerance)'> (one or more velocity, temperature, or concentration condition) ... </BCLine>
where
- (x1, y1) to (x2, y2) define (x, y) coordinates for the corners of a rectangular area enclosing the arc (or (R, Z) coordinates if axisymmetric). The units are mm (or determined by a units attribute in XML files). In XML files, the coordinates can alternatively be specified relative to the mesh edges
- (startAng) and (endAng) give the start and end angle (in degrees) to specify the arc.
- (tolerance) is an optional tolerance. The units are mm (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) the arc. The arc is traced in a counter-clockwise direction from (startAng) to (endAng) with angle = 0 corresponding to the position along the positive x axis.
Rectangle (2D or Axisymmetric)
Box (3D)
Relative Grid Locations
Rather than hard code positions for boundary conditions or shapes that define material points, any coordinate specified in XML files (e.g., an entry for (x1), (x2), (xmin), (xmax), etc.) can be the text 'min', 'max', 'min-3', 'min+1.2', 'max-3.8', 'max+2', etc., meaning the minimum, the maximum, or a specified number of cells relative to the minimum or maximum of the current mesh. For GIMP calculations 'min' and 'max' will be limits of useable mesh while 'min-1' and 'max+1' will be limits to the total mesh. For backward compatibility, min+, min-, max+, and max- refer to plus or minus one cell from the minimum or maximum of the current mesh.