OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_eos_murnaghan.F File Reference
#include "implicit_f.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine hm_read_eos_murnaghan (npropm, iout, pm, unitab, iunit, lsubmodel, imideos, mat_param)

Function/Subroutine Documentation

◆ hm_read_eos_murnaghan()

subroutine hm_read_eos_murnaghan ( integer npropm,
integer iout,
pm,
type (unit_type_), intent(in) unitab,
integer iunit,
type(submodel_data), dimension(nsubmod), intent(in) lsubmodel,
integer, intent(in) imideos,
type(matparam_struct_), intent(inout) mat_param )

Definition at line 35 of file hm_read_eos_murnaghan.F.

36C-----------------------------------------------
37C M o d u l e s
38C-----------------------------------------------
39 USE unitab_mod
40 USE submodel_mod
41 USE message_mod
42 USE matparam_def_mod, ONLY : matparam_struct_
43C-----------------------------------------------
44C D e s c r i p t i o n
45C-----------------------------------------------
46C reading parameters for
47C MURNAGHAN EQUATION OF STATE
48C-----------------------------------------------
49C C o m m e n t s
50C-----------------------------------------------
51C RHOI = PM(89) -> provided by /MAT
52C RHOR = PM(01) -> provided by /MAT (can be erased by EOS if present : obsolete)
53C => MU0 = RHO/RHOR-1.
54C PM(31) = P(MU0,E0) -> will be used to initialize diagonal of stress tensor SIG(1:3,*)
55C-----------------------------------------------
56C I m p l i c i t T y p e s
57C-----------------------------------------------
58#include "implicit_f.inc"
59C-----------------------------------------------
60C D u m m y A r g u m e n t s
61C-----------------------------------------------
62 TYPE (UNIT_TYPE_),INTENT(IN) ::UNITAB
63 INTEGER IOUT, IUNIT, NPROPM
64 my_real pm(npropm)
65 TYPE(SUBMODEL_DATA), DIMENSION(NSUBMOD), INTENT(IN) :: LSUBMODEL
66 TYPE(MATPARAM_STRUCT_),INTENT(INOUT) :: MAT_PARAM
67 INTEGER,INTENT(IN) :: IMIDEOS
68C-----------------------------------------------
69C L o c a l V a r i a b l e s
70C-----------------------------------------------
71 my_real p0, e0, psh, rho0, k0, k1, rhoi, rhor, mu0, df, ssp0, g0, dpdmu
72 LOGICAL :: IS_ENCRYPTED, IS_AVAILABLE, IS_AVAILABLE_RHO0
73C-----------------------------------------------
74C S o u r c e L i n e s
75C-----------------------------------------------
76 is_encrypted = .false.
77 is_available = .false.
78 is_available_rho0 = .false.
79
80 CALL hm_option_is_encrypted(is_encrypted)
81
82 CALL hm_get_floatv('EOS_K0', k0, is_available,lsubmodel,unitab)
83 CALL hm_get_floatv('K1', k1, is_available,lsubmodel,unitab)
84 CALL hm_get_floatv('LAW5_P0', p0, is_available,lsubmodel,unitab)
85 CALL hm_get_floatv('LAW5_PSH', psh, is_available,lsubmodel,unitab)
86 CALL hm_get_floatv('Refer_Rho', rho0, is_available_rho0,lsubmodel,unitab)
87
88 rhor = pm(1)
89 rhoi = pm(89)
90
91 IF(rho0 > zero) THEN
92 rhor = rho0
93 pm(1)= rho0
94 mat_param%RHO = rho0
95 ELSE
96 rho0=rhor
97 ENDIF
98
99 e0=zero
100
101 IF(k0 <= zero)THEN
102 CALL ancmsg(msgid=67,msgtype=msgerror,anmode=aninfo,i1=imideos, c1='/EOS/MURNAGHAN', c2='K0 MUST BE POSITIVE')
103 ENDIF
104
105 pm(32)=k0 !BULK = (1+ยต)*dP/dmu (partial derivative at constant E)
106 pm(88)=psh
107 pm(23)=e0
108
109 mat_param%EOS%NUPARAM = 3
110 mat_param%EOS%NIPARAM = 0
111 mat_param%EOS%NFUNC = 0
112 mat_param%EOS%NTABLE = 0
113 CALL mat_param%EOS%CONSTRUCT() !allocations
114
115 mat_param%EOS%UPARAM(1) = k0
116 mat_param%EOS%UPARAM(2) = p0
117 mat_param%EOS%UPARAM(3) = k1
118 mat_param%EOS%PSH = psh
119 mat_param%EOS%E0 = e0
120 IF (mat_param%THERM%TINI == zero) THEN
121 mat_param%THERM%TINI =three100
122 pm(79) = three100
123 END IF
124
125 IF(rhoi == zero)THEN
126 mu0 = zero ! error 683 already displayed
127 ELSE
128 IF(rhor /= zero)THEN
129 mu0 = rhoi/rhor-one
130 ELSE
131 mu0 = zero ! error 683 already displayed
132 ENDIF
133 ENDIF
134
135 IF(rhoi /= zero)THEN
136 df = rhor/rhoi
137 ELSE
138 df = zero
139 ENDIF
140
141 !P0
142 pm(31) = k0/k1 * (exp(k1*log(1+mu0)) - one ) + p0 - psh
143 pm(104)= k0/k1 * (exp(k1*log(1+mu0)) - one ) + p0 - psh
144
145 !SSP0
146 ssp0 = zero
147 g0 = pm(22)
148 rhoi = pm(89)
149 dpdmu = k0*exp( k1*log(1+mu0) )/(one+mu0)
150 dpdmu = max(zero,dpdmu)
151 IF(rhor > zero) ssp0 = sqrt((dpdmu + two_third*g0)/rhor)
152 pm(27)=ssp0
153 WRITE(iout,1000)
154
155 IF(is_encrypted)THEN
156 WRITE(iout,'(5X,A,//)')'confidential data'
157 ELSE
158 WRITE(IOUT,1500)K0,K1,P0,PM(31),PSH
159 IF(IS_AVAILABLE_RHO0)WRITE(IOUT,1501)PM(1)
160 ENDIF
161
162 RETURN
163 1000 FORMAT(
164 & 5X,' murnaghan eos ',/,
165 & 5X,' ------------- ',/)
166 1500 FORMAT(
167 & 5X,'k0. . . . . . . . . . . . . . . . . . . .=',1PG20.13/,
168 & 5X,'k1. . . . . . . . . . . . . . . . . . . .=',1PG20.13/,
169 & 5X,'p0. . . . . . . . . . . . . . . . . . . .=',1PG20.13/,
170 & 5X,'initial pressure. . . . . . . . . . . . .=',1PG20.13/,
171 & 5X,'psh . . . . . . . . . . . . . . . . . . .=',1PG20.13)
172 1501 FORMAT(
173 & 5X,'eos reference density . . . . . . . . . .=',1PG20.13)
174
175
176 RETURN
177
178
#define my_real
Definition cppsort.cpp:32
subroutine hm_get_floatv(name, rval, is_available, lsubmodel, unitab)
subroutine hm_option_is_encrypted(is_encrypted)
#define max(a, b)
Definition macros.h:21
subroutine ancmsg(msgid, msgtype, anmode, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, r1, r2, r3, r4, r5, r6, r7, r8, r9, c1, c2, c3, c4, c5, c6, c7, c8, c9, prmode)
Definition message.F:895