Skip to content

Implement Aiden's single phase microstructure workflow #444

@gcapes

Description

@gcapes

I met with Aiden yesterday and discussed recent changes to his workflow.
The dual phase microstructure is no longer needed, so he can probably use the task generate_volume_element_from_statistics, which also uses Dream3d.

@aidenmha has sent me his current, simpler workflow (below) and I'll try to implement that.
There are actually two workflows because there is a manual editing step of the HDF5 volume element file (from dream3D) to cluster orientations. This clustering is done in a jupyter notebook. The HDF5 file is then read in, in the second workflow.

I'm not sure how to do that - perhaps with the (unused?) script https://github.com/hpcflow/matflow-new/blob/develop/matflow/data/scripts/import_VE.py?

It seems that it should be possible to implement the code from the jupyter notebook as a MatFlow task schema and have this as a single, longer workflow, but in the shorter term, implementing this as-is would be the starting point.

The workflow files:

name: grain_growth_from_VE_dream3D_nucleus_with_MTEX_texture_binned
run_options:
  l: short
  
#archive: dropbox

tasks:

    # rotated cube texture for the sub-grain matrix:
  - name: sample_texture
    method: from_model_ODF
    software: mtex
#    context: phase_1
    base:
      num_orientations: 2300
      crystal_symmetry: cubic
      specimen_symmetry: orthorhombic
      ODF_components:
        - type: unimodal
          component_fraction: 1.0 
          modal_orientation_HKL: [0, 0, 1]
          modal_orientation_UVW: [1, 1, 0]
          halfwidth: 5


  - name: visualise_orientations
    method: pole_figure
    software: mtex
#    context: phase_1
    base:
      crystal_symmetry: cubic
      pole_figure_directions:
        - [0, 0, 1]
        - [1, 0, 1]
        - [1, 1, 1]
      use_contours: false


  - name: generate_volume_element
    method: from_statistics
    software: Dream3D
    base:
      grid_size: [512, 512, 1]
      resolution: [1, 1, 1] # side length is 512
      periodic: false
      phase_statistics:
        - type: primary
          name: sub-grain-matrix
          crystal_structure: cubic
          volume_fraction: 1.0
          size_distribution:
            ESD_mean: 7.03431
            ESD_log_stddev: 0.04
            num_bins: 15
#        - type: precipitate #81-101
#          name: nuclei
#          crystal_structure: cubic
#          volume_fraction: 0.0
#          size_distribution:
#            ESD_mean: 2
#            ESD_log_stddev: 0.1
#            num_bins: 15
#          number_fraction_on_boundary: 1
#          radial_distribution_function:
#            min_distance: 10
#            max_distance: 80
#            num_bins: 50
#            box_size: [100, 100, 100]
#      precipitates:
#        - phase_number: 2
#          position: [256, 256, 0.5]
#          major_semi_axis_length: 45
#          mid_semi_axis_length: 45
#          minor_semi_axis_length: 45
#          euler_angle: [0, 0, 0]

  - name: visualise_volume_element
    method: VTK
    software: damask
name: grain_growth_from_VE_dream3D_nucleus_with_MTEX_texture_binned
run_options:
  l: 
import:
 - parameter: volume_element
   from: 
     workflow: "/scratch/j36293ah/nonuc/hw_7_with_seeds/runs_final/setup/2pcf/10000/workflow.hdf5" 
#archive: dropbox

tasks:

    # rotated cube texture for the sub-grain matrix:
#  - name: sample_texture
#    method: from_model_ODF
#    software: mtex
 #   context: phase
#    base:
#      num_orientations: 1000
#      crystal_symmetry: cubic
#      specimen_symmetry: orthorhombic
#      ODF_components:
#        - type: unimodal
#          component_fraction: 1.0 
#          modal_orientation_HKL: [0, 0, 1]
#          modal_orientation_UVW: [1, 1, 0]
#          halfwidth: 7


#  - name: visualise_orientations
#    method: pole_figure
#    software: mtex
#    context: phase_1
#    base:
#      crystal_symmetry: cubic
#      pole_figure_directions:
#        - [0, 0, 1]
#        - [1, 0, 1]
#        - [1, 1, 1]
#      use_contours: false


#  - name: generate_volume_element
#    method: from_statistics
#    software: Dream3D
#    base:
#      grid_size: [512, 512, 1]
#      resolution: [1, 1, 1] # side length is 512
#      periodic: false
#      phase_statistics:
#        - type: primary
 #         name: sub-grain-matrix
 #         crystal_structure: cubic
#          volume_fraction: 1.0
#          size_distribution:
#            ESD_mean: 10
#            ESD_log_stddev: 0.03
#            num_bins: 15

#  - name: visualise_volume_element
#    method: VTK
#    software: damask

  - name: generate_phase_field_input
    method: from_volume_element
    software: cipher
    run_options:
      l: short
      num_cores: 2
    base:
      materials:
        - name: sub-grain-matrix
          properties:
            chemicalenergy: none
            molarvolume: 1e-5
            temperature0: 500.0

      interfaces:
        - materials: [sub-grain-matrix, sub-grain-matrix] 
          properties:
            width: 6.0
            energy:
              e0: 1.0e+8
            mobility:
              m0: 3.333e-11

      components: [ti]
      outputs: [phaseid, matid, interfaceid, 0_phi]
      solution_parameters:
        abstol: 0.0001
        amrinterval: 25
        initblocksize: [1, 1]
        initcoarsen: 9
        initrefine: 9
        interpolation: cubic
        maxnrefine: 9
        minnrefine: 0
        outfile: out
        outputfreq: 100
        petscoptions: -ts_adapt_monitor -ts_rk_type 2a
        random_seed: 1579993586
        reltol: 0.0001
        time: 1000_000
      interface_binning: # specify one or both of energy_range/mobility_range:
        base_interface_name: sub-grain-matrix-sub-grain-matrix
        theta_max: 50
        bin_width: 1
        energy_range: [0.1e+8, 0.555e+8]
        mobility_range: [2.105e-11, 10.0e-11]
        n: 7 # mobility parameter
        B: 625 # mobility parameter

  - name: simulate_grain_growth
    method: phase_field
    software: cipher
    base:
      num_VTU_files: 22
      derive_outputs:
        - name: num_voxels_per_phase 
      save_outputs:
        - name: phaseid 
          time_interval: 5_000
        - name: matid
          number: 4
        - name: interfaceid
          number: 4
        - name: 0_phi
          number: 4
        - name: num_voxels_per_phase
          time_interval: 5_000
      delete_VTUs: true
    run_options:
      num_cores: 8

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions