hpcflow / matflow-new

Mozilla Public License 2.0
3 stars 2 forks source link

Unknown problem with `fit_single_crystal_parameters` workflow #205

Open aplowman opened 9 months ago

aplowman commented 9 months ago

Substitution of

single_crystal_parameters: KEY

is not performed.

doc:
  - >
    Fit single crystal parameters using an experimental uniaxial tension stress-strain
    curve and an iterative Levenberg-Marquardt fitting process.

loops:
  - num_iterations: 5
    tasks: [5, 6]

resources: # resources for all task unless specified
  any: # resource scope e.g. -any (default) -main 
    scheduler_args:
      options: ["-l short"] 

tasks:
  - schema: generate_microstructure_seeds_from_random
    inputs:
      VE_size: [1, 1, 1]
      num_grains: 1024
      phase_label: Al

  - schema: sample_texture_from_CTF_file_mtex
    inputs:
      CTF_file_path: /path/to/AA6016_RD_TD.ctf
      EBSD_reference_frame_transformation: convertEuler2SpatialReferenceFrame
      specimen_symmetry: orthorhombic
      EBSD_phase: Al
      EBSD_rotation:
      num_orientations: 1024
      compile: true

  - schema: visualise_orientations_pole_figure_mtex
    inputs:
      crystal_symmetry: cubic
      pole_figure_directions:
        - [0, 0, 1]
        - [0, 1, 1]
        - [1, 1, 1]
      use_contours: false
      compile: true 

  - schema: generate_volume_element_from_voronoi
    inputs:
      homog_label: SX
      VE_grid_size: [64, 64, 64]

  - schema: read_tensile_test_from_CSV
    inputs:
      CSV_file_path: /path/to/Stress_strain_RD.csv
      CSV_arguments:
        delimiter: ","
        skip_rows: 2
        header_row: 0
      eng_strain_col_index: 2 # 6014, 6016, 5182 -> 0, 2, 4 
      eng_stress_col_index: 3 # 6014, 6016, 5182 -> 1, 3, 5 
      stress_units: MPa
      plastic_range: [0.01,0.2]

  - schema: simulate_VE_loading_damask
    resources:
      main:
        num_cores: 4
      output_file_parser:
        num_cores: 4
    inputs:
      load_case::uniaxial:
        total_time: 3500
        num_increments: 170
        direction: x
        target_def_grad_rate: 1.0e-4
        dump_frequency: 1
      homogenization:
        SX:
          mechanical: { type: "pass" }
          N_constituents: 1
      single_crystal_parameters:
        phases:
          Al:
            h_0_sl-sl: 400e6
            xi_0_sl: [30e6]
            xi_inf_sl: [95e6]
      damask_phases:
        Al:
          lattice: cF
          mechanical:
            output: [F, P, F_p]
            elastic:
              type: Hooke
              C_11: 106750000000
              C_12: 60410000000
              C_44: 28340000000
            plastic:
              type: phenopowerlaw
              single_crystal_parameters: Al
              N_sl: [12]
              a_sl: 2.25
              atol_xi: 1
              dot_gamma_0_sl: 0.001
              h_sl-sl: [1, 1, 1.4, 1.4, 1.4, 1.4, 1.4]
              n_sl: 20
              output: [xi_sl]
      damask_post_processing:
        - name: add_stress_Cauchy
          args: { P: P, F: F }
          opts: { add_Mises: true }
        - name: add_strain
          args: { F: F, t: U, m: 0 }
          opts: { add_Mises: true }
      VE_response_data:
        volume_data:
          - out_name: vol_avg_stress
            field_name: sigma
            transforms: [{ mean_along_axes: 1 }]
          - out_name: vol_avg_strain
            field_name: epsilon_U^0(F)
            transforms: [{ mean_along_axes: 1 }]
      damask_viz: null
    sequences:
      - path: inputs.single_crystal_parameters.perturbations
        values:
          - null
          - multiplicative: 1.05
            path: [Al, h_0_sl-sl]
          - multiplicative: 1.05
            path: [Al, xi_0_sl, 0]
          - multiplicative: 1.05
            path: [Al, xi_inf_sl, 0]
    groups:
      - name: fit_single_crystal_parameters

  - schema: fit_single_crystal_parameters
    inputs:
      initial_damping: [2.0, 1.0, 0.5]