SolutionRasterizer

Process an XYZ file of atomic coordinates and filter atoms via threshold or map variable values.

Mesoscale microstructure simulations using the phase field method can be utilized to generate initial structures for large sacle molecular dynamics simulations. One application is the construction of nano-foam atomistic samples from simulations of spinodal decomposition.

Nano foam atomistic configuration generated using the SolutionRasterizer.

MOOSE provides a built in system to template an atomic coordinate file in the .xyz format from the simulation result in a given mesh file. The workflow is as follows

  1. Set up a phase field simulation and output a finite element mesh file

  2. Create a bulk .xyz input file with the desired underlying lattice and crystal structure

  3. Use the minimal input file shown below to load the mesh and .xyz input

MOOSE will load the .xyz input and finite element mesh superpose both and use thresholding to carve out _rejected_ atoms while retaining _accepted_ atoms. Finally a new .xyz output is written containing only the _accepted_ atoms, generating a porous microstructure.

The SolutionRasterizer user object is derived from the SolutionUserObject and inherits its input parameters. It takes the following additional input parameters:

Input ParameterDescription
xyz_inputAn .xyz file as an input file. This input file should contain an atomistic simulation cell completely filled with atoms of a chosen crystal structure (a polycrystalline sample can be supplied).
xyz_outputOutput file** containing the filtered (or mapped) atomic coordinate file.
raster_mode = FILTERIn FILTER mode the SolutionRasterizer uses thresholding on a specified non-linear variable to reject or accept atom from the input file to pass to the output .xyz file.
raster_mode = MAPIn MAP mode the SolutionRasterizer takes the atoms from the input file and add an additional column to the data set containing the value of a specified non-linear variable.
thresholdValue of the selected non-linear variable to use in FILTER mode used to _accept_ or _reject_ atoms from the xyz_input file.

Minimal working input file

The following input can be executed with the MOOSE Phase Field module executable and will

  • load the mesh file diffuse_out.e

  • load the atomic coordinate file in.xyz

  • accept all atoms at the coordinates where the value of the non-linear variable c is above a value of 0.5

  • write out the atomic coordinate file out.xyz

[Mesh]
  type = GeneratedMesh
  dim = 3
[]

[Problem]
  kernel_coverage_check = false
  solve = false
[]

[Executioner]
  type = Steady
[]

[UserObjects]
  [./soln]
    type = SolutionRasterizer
    system_variables = 'c'
    mesh = diffuse_out.e
    execute_on = timestep_begin

    variable = c
    xyz_input = in.xyz
    xyz_output = out.xyz

    # raster_mode = MAP
    raster_mode = FILTER
    threshold = 0.5
  [../]
[]
(modules/phase_field/test/tests/solution_rasterizer/raster.i)

Input Parameters

  • variableVariable from the mesh file to use for mapping to or filtering of the atoms.

    C++ Type:std::string

    Options:

    Description:Variable from the mesh file to use for mapping to or filtering of the atoms.

  • xyz_outputXYZ output file.

    C++ Type:FileName

    Options:

    Description:XYZ output file.

  • meshThe name of the mesh file (must be xda or exodusII file).

    C++ Type:MeshFileName

    Options:

    Description:The name of the mesh file (must be xda or exodusII file).

  • xyz_inputXYZ input file.

    C++ Type:FileName

    Options:

    Description:XYZ input file.

Required Parameters

  • scale1 1 1 Scale factor for points in the simulation

    Default:1 1 1

    C++ Type:std::vector

    Options:

    Description:Scale factor for points in the simulation

  • scale_multiplier1 1 1 Scale multiplying factor for points in the simulation

    Default:1 1 1

    C++ Type:std::vector

    Options:

    Description:Scale multiplying factor for points in the simulation

  • rotation1_vector0 0 1Vector about which to rotate points of the simulation.

    Default:0 0 1

    C++ Type:libMesh::VectorValue

    Options:

    Description:Vector about which to rotate points of the simulation.

  • rotation1_angle0Anticlockwise rotation angle (in degrees) to use for rotation about rotation1_vector.

    Default:0

    C++ Type:double

    Options:

    Description:Anticlockwise rotation angle (in degrees) to use for rotation about rotation1_vector.

  • timestepIndex of the single timestep used or "LATEST" for the last timestep (exodusII only). If not supplied, time interpolation will occur.

    C++ Type:std::string

    Options:

    Description:Index of the single timestep used or "LATEST" for the last timestep (exodusII only). If not supplied, time interpolation will occur.

  • transformation_ordertranslation scaleThe order to perform the operations in. Define R0 to be the rotation matrix encoded by rotation0_vector and rotation0_angle. Similarly for R1. Denote the scale by s, the scale_multiplier by m, and the translation by t. Then, given a point x in the simulation, if transformation_order = 'rotation0 scale_multiplier translation scale rotation1' then form p = R1*(R0*x*m - t)/s. Then the values provided by the SolutionUserObject at point x in the simulation are the variable values at point p in the mesh.

    Default:translation scale

    C++ Type:MultiMooseEnum

    Options:rotation0 translation scale rotation1 scale_multiplier

    Description:The order to perform the operations in. Define R0 to be the rotation matrix encoded by rotation0_vector and rotation0_angle. Similarly for R1. Denote the scale by s, the scale_multiplier by m, and the translation by t. Then, given a point x in the simulation, if transformation_order = 'rotation0 scale_multiplier translation scale rotation1' then form p = R1*(R0*x*m - t)/s. Then the values provided by the SolutionUserObject at point x in the simulation are the variable values at point p in the mesh.

  • system_variablesThe name of the nodal and elemental variables from the file you want to use for values

    C++ Type:std::vector

    Options:

    Description:The name of the nodal and elemental variables from the file you want to use for values

  • raster_modeMAPRasterization mode (MAP|FILTER).

    Default:MAP

    C++ Type:MooseEnum

    Options:MAP FILTER

    Description:Rasterization mode (MAP|FILTER).

  • systemnl0The name of the system to pull values out of (xda only).

    Default:nl0

    C++ Type:std::string

    Options:

    Description:The name of the system to pull values out of (xda only).

  • rotation0_angle0Anticlockwise rotation angle (in degrees) to use for rotation about rotation0_vector.

    Default:0

    C++ Type:double

    Options:

    Description:Anticlockwise rotation angle (in degrees) to use for rotation about rotation0_vector.

  • thresholdAccept atoms with a variable value above this threshold in FILTER mode.

    C++ Type:double

    Options:

    Description:Accept atoms with a variable value above this threshold in FILTER mode.

  • execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM.

    Default:TIMESTEP_END

    C++ Type:ExecFlagEnum

    Options:NONE INITIAL LINEAR NONLINEAR TIMESTEP_END TIMESTEP_BEGIN FINAL CUSTOM

    Description:The list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM.

  • translation0 0 0 Translation factors for x,y,z coordinates of the simulation

    Default:0 0 0

    C++ Type:std::vector

    Options:

    Description:Translation factors for x,y,z coordinates of the simulation

  • rotation0_vector0 0 1Vector about which to rotate points of the simulation.

    Default:0 0 1

    C++ Type:libMesh::VectorValue

    Options:

    Description:Vector about which to rotate points of the simulation.

  • esThe name of the file holding the equation system info in xda format (xda only).

    Default:

    C++ Type:FileName

    Options:

    Description:The name of the file holding the equation system info in xda format (xda only).

Optional Parameters

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector

    Options:

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Options:

    Description:Set the enabled status of the MooseObject.

  • allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

    Default:False

    C++ Type:bool

    Options:

    Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

  • force_preauxFalseForces the GeneralUserObject to be executed in PREAUX

    Default:False

    C++ Type:bool

    Options:

    Description:Forces the GeneralUserObject to be executed in PREAUX

  • use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

    Default:False

    C++ Type:bool

    Options:

    Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

Advanced Parameters

Input Files