You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I wanted to do simulation for two phases material, I created material.yaml, geom.vti and load.yaml files based on DAMASK3, therefore I run the DAMASK simulation and I got hdf5.file.
For post processing, I extracted date that included stress_Cauchy, strain, strain('F_p'), equivalent_Mises('sigma'), equivalent_Mises('epsilon_V^0.0(F)'), and I got VTK file.
Now I want to make a plot for three graphs (one graph for sigma_ferrite- epsilon_ferrite, one for sigma_pearlite- epsilon_pearlite, and one total sigma-epsilon), I used the codes (in the attachment), but all the graphs overlap.
My main problem is that all the graphs are the same and show the same stress and strain (in the attachment), while they are different phases and they have different parameters and must be different graphs.
I want to know what the problem is and how to solve it? plaese help me.
I am using DAMASK v3.0.
import damask
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import glob
files = glob.glob("*.hdf5")
for file in files:
res = damask.Result(file)
res.view(phases= 'ferrite').get()
sigma_ferrite = [np.average(s) for s in res.place('sigma_vM', 'ferrite').values()]
epsilon_ferrite = [np.average(e) for e in res.place('epsilon_V^0.0(F)_vM', 'ferrite').values()]
plt.plot(epsilon_ferrite, np.array(sigma_ferrite)/1e6, 'b-', linewidth=2, label='Ferrite')
res.view(phases= 'pearlite').get()
sigma_pearlite = [np.average(s) for s in res.place('sigma_vM', 'pearlite').values()]
epsilon_pearlite = [np.average(e) for e in res.place('epsilon_V^0.0(F)_vM', 'pearlite').values()]
plt.plot(epsilon_pearlite, np.array(sigma_pearlite)/1e6, 'r--', linewidth=2, label='Pearlite')
sigma = [np.average(s) for s in res.place('sigma_vM').values()]
epsilon = [np.average(e) for e in res.place('epsilon_V^0.0(F)_vM').values()]
plt.plot(epsilon,sigma)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,




I wanted to do simulation for two phases material, I created material.yaml, geom.vti and load.yaml files based on DAMASK3, therefore I run the DAMASK simulation and I got hdf5.file.
For post processing, I extracted date that included stress_Cauchy, strain, strain('F_p'), equivalent_Mises('sigma'), equivalent_Mises('epsilon_V^0.0(F)'), and I got VTK file.
Now I want to make a plot for three graphs (one graph for sigma_ferrite- epsilon_ferrite, one for sigma_pearlite- epsilon_pearlite, and one total sigma-epsilon), I used the codes (in the attachment), but all the graphs overlap.
My main problem is that all the graphs are the same and show the same stress and strain (in the attachment), while they are different phases and they have different parameters and must be different graphs.
I want to know what the problem is and how to solve it? plaese help me.
I am using DAMASK v3.0.
material file>>
homogenization:
direct:
N_constituents: 1
mechanical: {type: pass}
phase:
ferrite:
lattice: cI
mechanical:
output: [F, P, F_e, F_p, L_p, O]
elastic: {type: Hooke, C_11: 232.2e+9, C_12: 136.4e+9, C_44: 117.0e+9}
plastic:
type: phenopowerlaw
N_sl: [12, 12]
dot_gamma_0_sl: [0.001, 0.001]
n_sl: [20, 20]
a_sl: [2.25, 2.25]
xi_0_sl: [95000000.0, 96000000.0]
xi_inf_sl: [222000000.0, 412000000.0]
h_0_sl-sl: [1000000000.0, 1000000000.0]
h_sl-sl: [1, 1.4, 1, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4]
pearlite:
lattice: cI
mechanical:
output: [F, P, F_e, F_p, L_p, O]
elastic: {type: Hooke, C_11: 232.2e+9, C_12: 136.4e+9, C_44: 117.0e+9}
plastic:
type: phenopowerlaw
N_sl: [12, 12]
dot_gamma_0_sl: [0.001, 0.001]
n_sl: [20, 20]
a_sl: [2, 2]
xi_0_sl: [405000000.0, 456000000.0]
xi_inf_sl: [872000000.0, 971000000.0]
h_0_sl-sl: [5630000000.0, 5630000000.0]
h_sl-sl: [1, 1.4, 1, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4]
material:
load file>>
solver:
mechanical: spectral_basic
loadstep:
mechanical:
dot_F: [[1.0e-3, 0, 0],
[0, x, 0],
[0, 0, x]]
P: [[x, x, x],
[x, 0, x],
[x, x, 0]]
discretization:
t: 20
N: 20
f_out: 2
mechanical:
dot_F: [[1.0e-3, 0, 0],
[0, x, 0],
[0, 0, x]]
P: [[x, x, x],
[x, 0, x],
[x, x, 0]]
discretization:
t: 100
N: 100
f_out: 5
mechanical:
dot_F: [[1.0e-3, 0, 0],
[0, x, 0],
[0, 0, x]]
P: [[x, x, x],
[x, 0, x],
[x, x, 0]]
discretization:
t: 200
N: 200
f_out: 10
mechanical:
dot_F: [[1.0e-3, 0, 0],
[0, x, 0],
[0, 0, x]]
P: [[x, x, x],
[x, 0, x],
[x, x, 0]]
discretization:
t: 300
N: 300
f_out: 20
codes>>
import damask
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import glob
files = glob.glob("*.hdf5")
for file in files:
res = damask.Result(file)
res.view(phases= 'ferrite').get()
sigma_ferrite = [np.average(s) for s in res.place('sigma_vM', 'ferrite').values()]
epsilon_ferrite = [np.average(e) for e in res.place('epsilon_V^0.0(F)_vM', 'ferrite').values()]
plt.plot(epsilon_ferrite, np.array(sigma_ferrite)/1e6, 'b-', linewidth=2, label='Ferrite')
res.view(phases= 'pearlite').get()
sigma_pearlite = [np.average(s) for s in res.place('sigma_vM', 'pearlite').values()]
epsilon_pearlite = [np.average(e) for e in res.place('epsilon_V^0.0(F)_vM', 'pearlite').values()]
plt.plot(epsilon_pearlite, np.array(sigma_pearlite)/1e6, 'r--', linewidth=2, label='Pearlite')
sigma = [np.average(s) for s in res.place('sigma_vM').values()]
epsilon = [np.average(e) for e in res.place('epsilon_V^0.0(F)_vM').values()]
plt.plot(epsilon,sigma)
Beta Was this translation helpful? Give feedback.
All reactions