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

Go to the source code of this file.

Functions/Subroutines

subroutine hm_read_eos_lszk (iout, pm, unitab, iunit, lsubmodel, imideos, mat_param)

Function/Subroutine Documentation

◆ hm_read_eos_lszk()

subroutine hm_read_eos_lszk ( 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_lszk.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
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 C o m m o n B l o c k s
70C-----------------------------------------------
71#include "param_c.inc"
72C-----------------------------------------------
73C L o c a l V a r i a b l e s
74C-----------------------------------------------
75 my_real gamma, p0, e0, psh, rho0, a, b, rhoi, rhor, mu0, df, ssp0, g0, dpdmu, pp
76 LOGICAL :: IS_ENCRYPTED, IS_AVAILABLE, IS_AVAILABLE_RHO0
77C-----------------------------------------------
78C S o u r c e L i n e s
79C-----------------------------------------------
80 is_encrypted = .false.
81 is_available = .false.
82 is_available_rho0 = .false.
83
84 CALL hm_option_is_encrypted(is_encrypted)
85
86 CALL hm_get_floatv('Gamma', gamma, is_available,lsubmodel,unitab)
87 CALL hm_get_floatv('LAW5_P0', p0, is_available,lsubmodel,unitab)
88 CALL hm_get_floatv('LAW5_PSH', psh, is_available,lsubmodel,unitab)
89 CALL hm_get_floatv('a', a, is_available,lsubmodel,unitab)
90 CALL hm_get_floatv('b', b, is_available,lsubmodel,unitab)
91
92 CALL hm_get_floatv('Refer_Rho', rho0, is_available_rho0,lsubmodel,unitab)
93
94 rhor = pm(1)
95 rhoi = pm(89)
96
97 IF(rho0 > zero) THEN
98 rhor = rho0
99 pm(1)= rho0
100 mat_param%RHO = rho0
101 ELSE
102 rho0=rhor
103 ENDIF
104
105 !ERREURS :
106 ! GAMMA <=0
107
108 IF(gamma <= zero)THEN
109 CALL ancmsg(msgid=67,
110 . msgtype=msgerror,
111 . anmode=aninfo,
112 . i1=imideos,
113 . c1='/EOS/LSZK',
114 . c2='GAMMA MUST BE GREATER THAN 1.0')
115 ENDIF
116
117 pm(34) = gamma
118 pm(88) = psh
119
120 mat_param%EOS%NUPARAM = 4
121 mat_param%EOS%NIPARAM = 0
122 mat_param%EOS%NFUNC = 0
123 mat_param%EOS%NTABLE = 0
124 CALL mat_param%EOS%CONSTRUCT() !allocations
125
126 IF(rhoi == zero)THEN
127 mu0 = zero ! error 683 already displayed
128 ELSE
129 IF(rhor /= zero)THEN
130 mu0 = rhoi/rhor-one
131 ELSE
132 mu0 = zero ! error 683 already displayed
133 ENDIF
134 ENDIF
135
136 IF(rhoi /= zero)THEN
137 df = rhor/rhoi
138 ELSE
139 df = zero
140 ENDIF
141
142 IF(mu0 <= -one)mu0=-one+ep12
143
144 IF(gamma > one)THEN
145 e0 = (p0-a*exp(b*log(one+mu0)))/(gamma-one)/(one+mu0)
146 ELSE
147 e0 = zero ! this error is managed above
148 ENDIF
149
150 pm(32) = (gamma-one)*abs(e0) + a*b !bulk modulus
151
152 IF(e0 < zero)THEN
153 CALL ancmsg(msgid=67,msgtype=msgerror,anmode=aninfo,
154 . i1=imideos,
155 . c1='/EOS/LSZK',
156 . c2='PARAMETERS RESULTS INTO A NEGATIVE INITIAL ENERGY')
157 ENDIF
158
159 pm(23) = e0
160 pm(31) = p0-psh
161 pm(104)= p0-psh
162
163 mat_param%EOS%UPARAM(1) = gamma
164 mat_param%EOS%UPARAM(2) = p0
165 mat_param%EOS%UPARAM(3) = a
166 mat_param%EOS%UPARAM(4) = b
167 mat_param%EOS%PSH = psh
168 mat_param%EOS%E0 = e0
169 IF (mat_param%THERM%TINI == zero) THEN
170 mat_param%THERM%TINI =three100
171 pm(79) = three100
172 END IF
173
174 !SSP0
175 ssp0 = zero
176 g0 = pm(22)
177 pp = (gamma-one)*(one+mu0)*e0 + a*exp(b*log(one+mu0))
178 rhoi = pm(89)
179 dpdmu = (gamma-one)*e0+a*b/(one+mu0)*exp((b-one)*log(one+mu0))+(gamma-one)*df*pp !total derivative
180 dpdmu = max(zero,dpdmu)
181 IF(rhor > zero) ssp0 = sqrt((dpdmu + two_third*g0)/rhor)
182 pm(27)=ssp0
183
184 WRITE(iout,1000)
185
186 IF(is_encrypted)THEN
187 WRITE(iout,'(5X,A,//)')'CONFIDENTIAL DATA'
188 ELSE
189 WRITE(iout,1500)gamma,p0,psh,a,b
190 IF(is_available_rho0)WRITE(iout,1501)pm(1)
191 ENDIF
192
193 RETURN
194 1000 FORMAT(
195 & 5x,' LANDAU-STANYUKOVICH-ZELDOVICH-KOMPANEETS EOS (LSZK) ',/,
196 & 5x,' --------------------------------------------------- ',/)
197 1500 FORMAT(
198 & 5x,'GAMMA . . . . . . . . . . . . . . . . . .=',1pg20.13/,
199 & 5x,'P0. . . . . . . . . . . . . . . . . . . .=',1pg20.13/,
200 & 5x,'PSH . . . . . . . . . . . . . . . . . . .=',1pg20.13/,
201 & 5x,'A . . . . . . . . . . . . . . . . . . . .=',1pg20.13/,
202 & 5x,'b . . . . . . . . . . . . . . . . . . . .=',1pg20.13)
203 1501 FORMAT(
204 & 5x,'EOS REFERENCE DENSITY . . . . . . . . . .=',1pg20.13)
205
206 RETURN
#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