-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathupdate_constitutive.py
More file actions
39 lines (25 loc) · 939 Bytes
/
update_constitutive.py
File metadata and controls
39 lines (25 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Crystal Plasticity Code.
import math,sys
from FE_functions import res_shear_stess
from Mat_functions import deflate_matrix_3
from Mat_functions import deflate_matrix_2
from Mat_functions import inflate_vec
from Mat_functions import inflate_matrix_6
from Mat_functions import inverse6
from Mat_functions import matrix_mlutip
from Mat_functions import inverse3
from constitutive_model_PL import *
def update_constitutive(schmid,res,props,S_star):
n_slip = len(schmid)
tau_alpha = [0.0 for k in range(n_slip)]
tau_alpha = res_shear_stess.resolvedshear(n_slip,S_star,schmid)
res_ssd = res
dgam = [0.0 for k in range(n_slip)]
dgam_dta = [0.0 for k in range(n_slip)]
#---------------------- Update state variables ----------------
prop = props
s1 = update_statev(tau_alpha,res_ssd,dgam,dgam_dta,prop)
u1 = s1.RES()
dgam = u1[0]
dgam_dta = u1[1]
return res,dgam,dgam_dta