Skip to content

Commit bd03e42

Browse files
committed
feat: add task to generate VE from PyAPD
1 parent 2a57cf1 commit bd03e42

3 files changed

Lines changed: 116 additions & 0 deletions

File tree

matflow/data/template_components/task_schemas.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,6 +1422,29 @@
14221422
script_data_out: direct
14231423
script_exe: python_script
14241424

1425+
- objective: generate_volume_element
1426+
method: APD
1427+
inputs:
1428+
- parameter: num_grains
1429+
- parameter: VE_grid_size
1430+
- parameter: VE_size
1431+
- parameter: phase_label
1432+
- parameter: homog_label
1433+
default_value: SX
1434+
- parameter: orientations
1435+
default_value: null
1436+
outputs:
1437+
- parameter: volume_element
1438+
actions:
1439+
- script: <<script:pyapd/generate_VE_PyAPD.py>>
1440+
script_data_in: direct
1441+
script_data_out: direct
1442+
script_exe: python_script
1443+
environments:
1444+
- scope:
1445+
type: any
1446+
environment: damask_parse_env
1447+
14251448
- objective: load_microstructure
14261449
doc: Get a 2D microstructure model from a differential interference contrast microscopy image.
14271450
method: EBSD_DIC
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
2+
tasks:
3+
- schema: generate_volume_element_APD
4+
inputs:
5+
VE_grid_size: [8, 8, 8]
6+
VE_size: [1, 1, 1]
7+
num_grains: 4
8+
phase_label: Al
9+
10+
- schema: visualise_VE_VTK
11+
12+
- schema: simulate_VE_loading_damask
13+
inputs:
14+
load_case::uniaxial:
15+
total_time: 100
16+
num_increments: 200
17+
direction: x
18+
target_def_grad_rate: 1.0e-3
19+
dump_frequency: 1
20+
homogenization:
21+
SX:
22+
mechanical: { type: "pass" }
23+
N_constituents: 1
24+
damask_phases:
25+
Al:
26+
lattice: cF
27+
mechanical:
28+
output: [F, P, F_e, F_p, L_p, O]
29+
elastic:
30+
type: Hooke
31+
C_11: 106750000000
32+
C_12: 60410000000
33+
C_44: 28340000000
34+
plastic:
35+
type: phenopowerlaw
36+
N_sl: [12]
37+
a_sl: 2.25
38+
atol_xi: 1
39+
dot_gamma_0_sl: 0.001
40+
h_0_sl-sl: 75.0e+6
41+
h_sl-sl: [1, 1, 1.4, 1.4, 1.4, 1.4, 1.4]
42+
n_sl: 20
43+
output: [xi_sl]
44+
xi_0_sl: [31.0e+6]
45+
xi_inf_sl: [63.0e+6]
46+
damask_post_processing:
47+
- name: add_stress_Cauchy
48+
args: { P: P, F: F }
49+
opts: { add_Mises: true }
50+
- name: add_strain
51+
args: { F: F, t: V, m: 0 }
52+
opts: { add_Mises: true }
53+
- name: add_strain
54+
args: { F: F_p, t: V, m: 0 }
55+
opts: { add_Mises: true }
56+
- name: add_IPF_color
57+
args: { l: [0, 0, 1] }
58+
VE_response_data:
59+
phase_data:
60+
- field_name: sigma_vM
61+
phase_name: Al
62+
out_name: vol_avg_equivalent_stress
63+
transforms: [{ mean_along_axes: 1 }]
64+
- field_name: epsilon_V^0(F)_vM
65+
phase_name: Al
66+
out_name: vol_avg_equivalent_strain
67+
transforms: [{ mean_along_axes: 1 }]
68+
- field_name: epsilon_V^0(F_p)_vM
69+
phase_name: Al
70+
out_name: vol_avg_equivalent_plastic_strain
71+
transforms: [{ mean_along_axes: 1 }]
72+
field_data:
73+
- field_name: phase
74+
- field_name: O
75+
grain_data:
76+
- field_name: O
77+
increments: [{ values: [0, -1] }]
78+
damask_viz:
79+
fields:
80+
[F, F_p, P, sigma_vM, epsilon_V^0(F_p)_vM, IPFcolor_(0 0 1), phase]
81+
increments:
82+
- step: 20
83+
calculate_yield_stress:
84+
yield_point: 0.002
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
tasks:
2+
- schema: generate_volume_element_APD
3+
inputs:
4+
VE_grid_size: [16, 16, 16]
5+
VE_size: [1, 1, 1]
6+
num_grains: 10
7+
phase_label: Al
8+
9+
- schema: visualise_VE_VTK

0 commit comments

Comments
 (0)