MOOSE Newsletter (July 2022)
MOOSE Improvements
Coordinate transformation system
Different applications may use different setups. For example a neutronics simulation may be performed in Cartesian 3D space whereas a fuel performance calculation may be performed using a 2D axisymmetric coordinate system. Communicating information between these different configurations can be difficult. One mechanism MOOSE provides for making this communication simpler is the MooseAppCoordTransform
class. Each MooseApp
instance holds a coordinate transformation object in its MooseMesh
object. Users may specify transformation information about their simulation setup on a per-application basis in the input file Mesh
block.
Let's consider an example. The below listing shows coordinate transformation given in the Mesh
block of a sub-application:
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -5
xmax = 0
ymin = 0
ymax = 10
nx = 10
ny = 20
alpha_rotation = -90
length_unit = '20*cm'
[]
(test/tests/transfers/coord_transform/sub-app.i)Here, the user is stating that a -90 degree alpha rotation (e.g. a point on the y-axis becomes a point on the x-axis) should be applied to the sub-application's domain in order to map to the reference domain (which the user has chosen to correspond to the main application domain). Additionally, the user wishes for the coordinate transformation object to know that one unit of mesh length corresponds to 20 centimeters. This information from the sub-application's Mesh
block combined with the translation vector described by the positions
parameter in the main application MultiApp
block
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '1 0 0'
input_files = 'sub-app.i'
execute_on = 'timestep_begin'
[]
[]
(test/tests/transfers/coord_transform/main-app.i)allows MOOSE to directly map information between the disparate application domains. The figure below shows the variable field v
, which is a nonlinear variable in the sub-application and an auxiliary source variable in the main application, in both domains, indicating a successful transfer of data after applying the transformation order outlined above (rotation, scale, translation).

Figure 1: Example of rotation, scaling, and translation transformations between multiapps
Further documentation about the coordinate transformation system may be found at Coordinate transformations.