allow selection of modulus

This commit is contained in:
Sharan Roongta 2022-11-11 19:36:55 +01:00
parent c8e5e9e34a
commit 1264d8dfc1
2 changed files with 12 additions and 3 deletions

View File

@ -9,7 +9,7 @@ phase:
lattice: cF
mechanical:
output: [F, P, F_e, F_p, L_p, O]
elastic: {type: Hooke, C_11: 106.75e+9, C_12: 60.41e+9, C_44: 28.34e+9}
elastic: {type: Hooke, C_11: 106.75e+9, C_12: 60.41e+9, C_44: 28.34e+9, modulus_type: 'Voigt'}
plastic:
type: phenopowerlaw
N_sl: [12]

View File

@ -8,6 +8,7 @@ submodule(phase:mechanical) elastic
C_33, &
C_44, &
C_66
character(len=pStringLen) :: modulus_type
end type tParameters
type(tParameters), allocatable, dimension(:) :: param
@ -57,6 +58,8 @@ module subroutine elastic_init(phases)
if (phase_lattice(ph) == 'tI') &
prm%C_66 = polynomial(elastic%asDict(),'C_66','T')
prm%modulus_type=elastic%get_asString('modulus_type',defaultVal='Voigt')
end associate
end do
@ -110,8 +113,11 @@ pure module function elastic_mu(ph,en) result(mu)
real(pReal) :: &
mu
associate(prm => param(ph))
mu = lattice_equivalent_mu(elastic_C66(ph,en),'voigt')
mu = lattice_equivalent_mu(elastic_C66(ph,en),prm%modulus_type)
end associate
end function elastic_mu
@ -127,8 +133,11 @@ pure module function elastic_nu(ph,en) result(nu)
real(pReal) :: &
nu
associate(prm => param(ph))
nu = lattice_equivalent_nu(elastic_C66(ph,en),'voigt')
nu = lattice_equivalent_nu(elastic_C66(ph,en),prm%modulus_type)
end associate
end function elastic_nu