Grid Macro

This macro file can be imported to an input file with $ import grid.mac.

This collection of macros can be used to add different types of grids to the input file.

addGrid Macro

addGrid (lowerBounds, upperBounds, numCells, periodicDirections):
Add a structured Cartesian grid

addGrid Macro Parameters

lowerBounds:
Vector of coordinates for lower edge of grid, lowerBounds = [ XMIN YMIN ZMIN ]
upperBounds:
Vector of coordinates for upper edge of grid, upperBounds = [ XMAX YMAX ZMAX ]
numCells:
Vector of number of cells in grid, numCells = [ NX NY NZ ]
periodicDirections:

List of directions that are periodic

periodicDirections = [ 0 ] (x-direction periodic)
periodicDirections = [ 0 1 ] (x,y-directions periodic)
periodicDirections = [ 0 1 2 ] (x,y,z-directions periodic)

addCylindricalGrid Macro

addCylindricalGrid (lowerBounds, upperBounds, numCells, periodicDirections):
Add a structured cylindrical grid

addCylindricalGrid Macro Parameters

lowerBounds:
Vector of coordinates for lower edge of grid, lowerBounds = [ XMIN YMIN ZMIN ]
upperBounds:
Vector of coordinates for upper edge of grid, upperBounds = [ XMAX YMAX ZMAX ]
numCells:
Vector of number of cells in grid, numCells = [ NX NY NZ ]
periodicDirections:

List of directions that are periodic

periodicDirections = [ 0 ] (x-direction periodic)
periodicDirections = [ 0 1 ] (x,y-directions periodic)
periodicDirections = [ 0 1 2 ] (x,y,z-directions periodic)

addBodyFittedGrid Macro

addBodyFittedGrid (lowerBounds, upperBounds, numCells, periodicDirections):
Add a body-fitted cartesian grid

addBodyFittedGrid Macro Parameters

lowerBounds:
Vector of coordinates for lower edge of grid, lowerBounds = [ XMIN YMIN ZMIN ]
upperBounds:
Vector of coordinates for upper edge of grid, upperBounds = [ XMAX YMAX ZMAX ]
numCells:
Vector of number of cells in grid, numCells = [ NX NY NZ ]
periodicDirections:

List of directions that are periodic

periodicDirections = [ 0 ] (x-direction periodic)
periodicDirections = [ 0 1 ] (x,y-directions periodic)
periodicDirections = [ 0 1 2 ] (x,y,z-directions periodic)

addCylindricalBodyFittedGrid Macro

addCylindricalBodyFittedGrid (lowerBounds, upperBounds, numCells, periodicDirections):
Add a body-fitted cylindrical grid

addCylindricalBodyFittedGrid Macro Parameters

lowerBounds:
Vector of coordinates for lower edge of grid, lowerBounds = [ XMIN YMIN ZMIN ]
upperBounds:
Vector of coordinates for upper edge of grid, upperBounds = [ XMAX YMAX ZMAX ]
numCells:
Vector of number of cells in grid, numCells = [ NX NY NZ ]
periodicDirections:

List of directions that are periodic

periodicDirections = [ 0 ] (x-direction periodic)
periodicDirections = [ 0 1 ] (x,y-directions periodic)
periodicDirections = [ 0 1 2 ] (x,y,z-directions periodic)

addExodusGrid Macro

addExodusGrid (name):
Add a unstructured grid in ExodusII format

addExodusGrid Macro Parameters

name:
Name of grid WITHOUT extension

addExodusTetrahedralGrid Macro

addExodusTetrahedralGrid (name):
Add a unstructured grid composed of tetrahedra in ExodusII format

addExodusTetrahedralGrid Macro Parameters

name:
Name of grid WITHOUT extension

addCylindricalExodusTetrahedralGrid Macro

addCylindricalExodusTetrahedralGrid (name):
Add a unstructured cylindrical grid composed of tetrahedra in ExodusII format

addCylindricalExodusTetrahedralGrid Macro Parameters

name:
Name of grid WITHOUT extension

addCylindricalExodusGrid Macro

addCylindricalExodusGrid (name):
Add a unstructured cylindrical grid in ExodusII format

addCylindricalExodusGrid Macro Parameters

name:
Name of grid WITHOUT extension

addGmshGrid Macro

addGmshGrid (name):
Add a unstructured grid in Gmsh format

addGmshGrid Macro Parameters

name:
Name of grid WITHOUT extension

addGmshTetrahedralGrid Macro

addGmshTetrahedralGrid (name):
Add a unstructured grid composed of tetrahedra in Gmsh format

addGmshTetrahedralGrid Macro Parameters

name:
Name of grid WITHOUT extension

addCylindricalGmshGrid Macro

addCylindricalGmshGrid (name):
Add a unstructured cylindrical grid in Gmsh format

addCylindricalGmshGrid Macro Parameters

name:
Name of grid WITHOUT extension

addCylindricalGmshTetrahedralGrid Macro

addCylindricalGmshTetrahedralGrid (name):
Add a unstructured cylindrical grid composed of tetrahedra in Gmsh format

addCylindricalGmshTetrahedralGrid Macro Parameters

name:
Name of grid WITHOUT extension

addGridVariable Macro

addGridVariable (varName, varValue):
Specify a variable for defining a body-fitted grid

addGridVariable Macro Parameters

varName:
Name to assign quantity that is independent of grid position
varValue:
Value to assign quantity that is independent of grid position

addGridPreExpression Macro

addGridPreExpression (expression):
Specify a preExpression for defining a body-fitted grid

addGridPreExpression Macro Parameters

expression:
A mathematical expression to evaluate. f=f(preExpression,variable,t,x,y,z)

addGridExpression Macro

addGridExpression (expression):
Specify an Expression for defining a body-fitted grid

addGridExpression Macro Parameters

expression:
A mathematical expression to evaluate. f=f(preExpression,variable,t,x,y,z)

addEntityMaskVariable Macro

addEntityMaskVariable (newEntityNameVar, varName, varValue):
Specify a variable for defining a mask on the grid

addEntityMaskVariable Macro Parameters

newEntityNameVar:
Name of the new entity
varName:
Name to assign quantity that is independent of grid position
varValue:
Value to assign quantity that is independent of grid position

addEntityMaskPreExpression Macro

addEntityMaskPreExpression (newEntityNameVar, expression):
Specify a preExpression for defining a mask on the grid

addEntityMaskPreExpression Macro Parameters

expression:
A mathematical expression to evaluate. f=f(preExpression,variable,t,x,y,z)

addEntityMaskExpression Macro

addEntityMaskExpression (newEntityNameVar, expression):
Specify an Expression for defining a mask on the grid

addEntityMaskExpression Macro Parameters

expression:
A mathematical expression to evaluate. f=f(preExpression,variable,t,x,y,z)

createNewEntityFromMask (newEntityNameVar) Macro

createNewEntityFromMask (newEntityNameVar):
Create a new entity within the grid based on mask function

createNewEntityFromMask Macro Parameters

newEntityNameVar:
Name of the new entity

createNewEntityFromMask (newEntityNameVar, entityToCreateFromVar) Macro

createNewEntityFromMask (newEntityNameVar, entityToCreateFromVar):
Create a new entity within the grid based on mask function

createNewEntityFromMask Macro Parameters

newEntityNameVar:
Name of the new entity
entityToCreateFromVar:
Name of the entity to create the new entity from