Unresolved Issues While Exporting DAMASK Multi-Phase Simulation Results to VTK #83
Replies: 2 comments 5 replies
-
|
When you say "2-phase simulation", are you referring to a grid that has a single component at each grid point that is either iron or titanium, or are you simulating a situation where each grid point contains both phases (in certain proportion)? |
Beta Was this translation helpful? Give feedback.
-
|
It’s the first case. I’m using fullfield with N_constituents: 1, so each grid cell contains a single phase only. The microstructure is biphasic at the cell level: a cell is either Iron or Ti, not a mixture. Concretely: my .vti has a cell-data array named material with values 0/1; these map to two entries in material: in the YAML: material[0] → Iron (v: 1.0) material[1] → Ti (v: 1.0) There are no multi-constituent cells (no local volume fractions other than 1.0). Also, my material.yaml file looks like this:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I’m performing a 2-phase DAMASK simulation (Iron and Ti) on a 3D-RVE using DAMASK_grid v3.0.1 and encountered multiple export-related issues during post-processing with the python-damask API.
Outputs like sigma, F, P, epsilon_U^0.0(F), epsilon_V^0.0(F) were correctly computed using:
r.add_strain(F='F', t='U', m=0.0)
r.add_strain(F='F', t='V', m=0.0)
r.add_stress_Cauchy()
r.export_VTK(output='*', mode='cell', target_dir='output_vtk')
ERROR: ValueError: shape mismatch: value array of shape (202612,3) could not be broadcast to indexing result of shape (202612,1)
Difficulty in Adding Phase-Specific Fields Manually
Attempted to export custom fields like:
But: r.phase['Iron']['mechanical']['O_q0'] = r.phase['Iron']['mechanical']['O'][:, 0].reshape(-1, 1) and other variants (r.result[...], r.data[...], r['...']), all resulted in:
Even dir(r) doesn’t show any direct method to assign new fields into the internal structure in a safe/documented way.
How to add orientations, gamma_sl, xi_sl correctly to export_VTK(...)?
Beta Was this translation helpful? Give feedback.
All reactions