OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_eos_tillotson.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_tillotson (iout, pm, unitab, iunit, lsubmodel, imideos, eos_tag, ieos, mat_param)

Function/Subroutine Documentation

◆ hm_read_eos_tillotson()

subroutine hm_read_eos_tillotson ( integer iout,
pm,
type (unit_type_), intent(in) unitab,
integer iunit,
type(submodel_data), dimension(nsubmod), intent(in) lsubmodel,
integer, intent(in) imideos,
type(eos_tag_), dimension(0:maxeos), intent(inout) eos_tag,
integer, intent(in) ieos,
type(matparam_struct_), intent(inout) mat_param )

Definition at line 35 of file hm_read_eos_tillotson.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 elbuftag_mod
43 USE matparam_def_mod, ONLY : matparam_struct_
44C-----------------------------------------------
45C D e s c r i p t i o n
46C-----------------------------------------------
47C reading parameters for
48C TILLOTSON EQUATION OF STATE
49C-----------------------------------------------
50C C o m m e n t s
51C-----------------------------------------------
52C RHOI = PM(89) -> provided by /MAT
53C RHOR = PM(01) -> provided by /MAT (can be erased by EOS if present : obsolete)
54C => MU0 = RHO/RHOR-1.
55C PM(31) = P(MU0,E0) -> will be used to initialize diagonal of stress tensor SIG(1:3,*)
56C-----------------------------------------------
57C I m p l i c i t T y p e s
58C-----------------------------------------------
59#include "implicit_f.inc"
60C-----------------------------------------------
61C D u m m y A r g u m e n t s
62C-----------------------------------------------
63 TYPE (UNIT_TYPE_),INTENT(IN) ::UNITAB
64 INTEGER IOUT,IUNIT
65 INTEGER,INTENT(IN) :: IEOS
66 my_real pm(npropm)
67 TYPE(SUBMODEL_DATA), DIMENSION(NSUBMOD), INTENT(IN) :: LSUBMODEL
68 INTEGER,INTENT(IN) :: IMIDEOS
69 TYPE(EOS_TAG_),DIMENSION(0:MAXEOS) ,INTENT(INOUT) :: EOS_TAG
70 TYPE(MATPARAM_STRUCT_),INTENT(INOUT) :: MAT_PARAM
71C-----------------------------------------------
72C C o m m o n B l o c k s
73C-----------------------------------------------
74#include "param_c.inc"
75C-----------------------------------------------
76C L o c a l V a r i a b l e s
77C-----------------------------------------------
78 my_real :: c1, c2, a, b, er, es, vs, e0, rho0,rhoi,rhor, alpha, beta,
79 . facc1,facc2,facpb,mu0,mu2,df,eta,
80 . omega,aa,bb,pp,xx,expa,expb,dpdmu, ssp0, g0, psh
81 LOGICAL :: IS_ENCRYPTED,IS_AVAILABLE,IS_AVAILABLE_RHO0
82C-----------------------------------------------
83C S o u r c e L i n e s
84C-----------------------------------------------
85 is_encrypted = .false.
86 is_available = .false.
87 is_available_rho0 = .false.
88 psh = zero
89
90 eos_tag(ieos)%NVAR = 1 !saving Region id for H2D and ANIM output
91
92 CALL hm_option_is_encrypted(is_encrypted)
93
94 CALL hm_get_floatv('EOS_C1', c1, is_available,lsubmodel,unitab)
95 CALL hm_get_floatv('EOS_C2', c2, is_available,lsubmodel,unitab)
96 CALL hm_get_floatv('MAT_A', a, is_available,lsubmodel,unitab)
97 CALL hm_get_floatv('MAT_B', b, is_available,lsubmodel,unitab)
98
99 CALL hm_get_floatv('E_R',er, is_available,lsubmodel,unitab)
100 CALL hm_get_floatv('E_S', es, is_available,lsubmodel,unitab)
101 CALL hm_get_floatv('Vs', vs, is_available,lsubmodel,unitab)
102 CALL hm_get_floatv('MAT_EA', e0 ,is_available,lsubmodel,unitab)
103 CALL hm_get_floatv('Refer_Rho', rho0 ,is_available_rho0,lsubmodel,unitab)
104
105 CALL hm_get_floatv('Alpha', alpha ,is_available,lsubmodel,unitab)
106 CALL hm_get_floatv('Beta', beta ,is_available,lsubmodel,unitab)
107
108 rhor = mat_param%RHO
109 rhoi = mat_param%RHO0
110 IF (rho0 > zero) THEN
111 rhor = rho0
112 mat_param%RHO = rho0
113 pm(1)= rho0
114 ELSE
115 rho0=rhor
116 ENDIF
117
118 pm(23) = e0
119 pm(32) = c1+b*e0 !BULK = (1+ยต)*dP/dmu (partial derivative at constant E)
120 pm(88) = psh
121
122 mat_param%EOS%NUPARAM = 9
123 mat_param%EOS%NIPARAM = 0
124 mat_param%EOS%NFUNC = 0
125 mat_param%EOS%NTABLE = 0
126 CALL mat_param%EOS%CONSTRUCT() !allocations
127
128 mat_param%EOS%UPARAM(1) = c1
129 mat_param%EOS%UPARAM(2) = c2
130 mat_param%EOS%UPARAM(3) = a
131 mat_param%EOS%UPARAM(4) = b
132 mat_param%EOS%UPARAM(5) = er
133 mat_param%EOS%UPARAM(6) = es
134 mat_param%EOS%UPARAM(7) = vs
135 mat_param%EOS%UPARAM(8) = alpha
136 mat_param%EOS%UPARAM(9) = beta
137 mat_param%EOS%PSH = psh
138 mat_param%EOS%E0 = e0
139!
140 IF (mat_param%THERM%TINI == zero) THEN
141 mat_param%THERM%TINI =three100
142 pm(79) = three100
143 END IF
144
145 !COMPUTING INITIAL PRESSURE FOR PM(31) -> SIG(1:3,*)
146
147 IF(rhoi == zero)THEN
148 mu0 = zero ! error 683 already displayed
149 ELSE
150 IF(rhor /= zero)THEN
151 mu0 = rhoi/rhor-one
152 ELSE
153 mu0 = zero ! error 683 already displayed
154 ENDIF
155 ENDIF
156
157 IF(rhoi /= zero)THEN
158 df = rhor/rhoi
159 ELSE
160 df = zero
161 ENDIF
162
163 mu2 = mu0*mu0
164 facc1 = one
165 facc2 = one
166 facpb = one
167 IF(mu0<zero) THEN
168 facc2=zero
169 IF(df>vs .OR. (df<=vs .AND. e0>=es) ) THEN
170 xx = mu0/(one+mu0)
171 expa = exp(-alpha*xx*xx)
172 expb = exp(beta*xx)
173 facc1 = expa*expb
174 facpb = expa
175 ENDIF
176 ENDIF
177 eta = one+mu0
178 omega = one+e0/(er*eta**2)
179 aa = facc1*c1*mu0+facc2*c2*mu2
180 bb = a+facpb*b/omega
181 pp = max(aa+bb*eta*e0,pm(37))
182 pm(31)= pp
183
184 !SSP0
185 ssp0 = zero
186 g0 = pm(22)
187 rhoi = pm(89)
188
189 dpdmu=facc1*c1+two*facc2*c2*mu0+bb*eta*pp*df*df + e0*( bb+(two*e0/eta-pp*df*df)*b*facpb/(er*eta*omega**2) )
190 dpdmu=max(zero,dpdmu)
191 IF(rhor > zero) ssp0 = sqrt((dpdmu + two_third*g0)/rhor)
192 pm(27)=ssp0
193
194 WRITE(iout,1000)
195 IF(is_encrypted)THEN
196 WRITE(iout,'(5X,A,//)')'CONFIDENTIAL DATA'
197 ELSE
198 WRITE(iout,1500)c1,c2,a,b,er,es,vs,e0,pm(31),alpha,beta
199 IF(is_available_rho0)WRITE(iout,1501)pm(1)
200 ENDIF
201
202 RETURN
203
204 1000 FORMAT(
205 & 5x,' tillotson eos ',/,
206 & 5X,' -------------- ',/)
207 1500 FORMAT(
208 & 5X,'c1. . . . . . . . . . . . . . . . . . . .=',1PG20.13/,
209 & 5X,'c2. . . . . . . . . . . . . . . . . . . .=',1PG20.13/,
210 & 5X,'a . . . . . . . . . . . . . . . . . . . .=',1PG20.13/,
211 & 5X,'b . . . . . . . . . . . . . . . . . . . .=',1PG20.13/,
212 & 5X,'ref internal energy(per unit volume) . .=',1PG20.13/,
213 & 5X,'sublimation energy(per unit volume) . .=',1PG20.13/,
214 & 5X,'sublimation relative volume . . . . . . .=',1PG20.13/,
215 & 5X,'initial internal energy(per unit volume).=',1PG20.13/,
216 & 5X,'initial pressure. . . . . . . . . . . . .=',1PG20.13/,
217 & 5X,'alpha . . . . . . . . . . . . . . . . . .=',1PG20.13/,
218 & 5X,'beta. . . . . . . . . . . . . . . . . . .=',1PG20.13)
219 1501 FORMAT(
220 & 5X,'eos reference density . . . . . . . . . .=',1PG20.13)
221
222 RETURN
#define my_real
Definition cppsort.cpp:32
#define alpha
Definition eval.h:35
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