OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_eos_puff.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23!||====================================================================
24!|| hm_read_eos_puff ../starter/source/materials/eos/hm_read_eos_puff.F
25!||--- called by ------------------------------------------------------
26!|| hm_read_eos ../starter/source/materials/eos/hm_read_eos.F
27!||--- calls -----------------------------------------------------
28!|| hm_get_floatv ../starter/source/devtools/hm_reader/hm_get_floatv.F
29!|| hm_option_is_encrypted ../starter/source/devtools/hm_reader/hm_option_is_encrypted.F
30!||--- uses -----------------------------------------------------
31!|| message_mod ../starter/share/message_module/message_mod.F
32!|| submodel_mod ../starter/share/modules1/submodel_mod.F
33!||====================================================================
34 SUBROUTINE hm_read_eos_puff(IOUT,PM,UNITAB,IUNIT,LSUBMODEL,IMIDEOS,MAT_PARAM)
35C-----------------------------------------------
36C M o d u l e s
37C-----------------------------------------------
38 USE unitab_mod
39 USE submodel_mod
40 USE message_mod
41 USE matparam_def_mod
42C-----------------------------------------------
43C D e s c r i p t i o n
44C-----------------------------------------------
45C reading parameters for
46C PUFF EQUATION OF STATE
47C-----------------------------------------------
48C C o m m e n t s
49C-----------------------------------------------
50C RHOI = PM(89) -> provided by /MAT
51C RHOR = PM(01) -> provided by /MAT (can be erased by EOS if present : obsolete)
52C => MU0 = RHO/RHOR-1.
53C PM(31) = P(MU0,E0) -> will be used to initialize diagonal of stress tensor SIG(1:3,*)
54C-----------------------------------------------
55C I m p l i c i t T y p e s
56C-----------------------------------------------
57#include "implicit_f.inc"
58C-----------------------------------------------
59C D u m m y A r g u m e n t s
60C-----------------------------------------------
61 TYPE (UNIT_TYPE_),INTENT(IN) ::UNITAB
62 INTEGER IOUT, IUNIT
63 my_real pm(npropm)
64 TYPE(submodel_data), DIMENSION(NSUBMOD), INTENT(IN) :: LSUBMODEL
65 INTEGER,INTENT(IN) :: IMIDEOS
66 TYPE(matparam_struct_) ,INTENT(INOUT) :: MAT_PARAM
67C-----------------------------------------------
68C C o m m o n B l o c k s
69C-----------------------------------------------
70#include "param_c.inc"
71C-----------------------------------------------
72C L o c a l V a r i a b l e s
73C-----------------------------------------------
75 . c1, c2, c3, g0, t1, t2, es, hh, e0, rho0,
76 . rhor,rhoi,mu2,
77 . xx,aa,bb,gx,pres,expa,eta,ee,cc, mu0, df, pp ,ssp0, dpdmu, pc, psh
78 LOGICAL :: IS_ENCRYPTED, IS_AVAILABLE, IS_AVAILABLE_RHO0
79C-----------------------------------------------
80C S o u r c e L i n e s
81C-----------------------------------------------
82 is_encrypted = .false.
83 is_available = .false.
84 is_available_rho0 = .false.
85
86 CALL hm_option_is_encrypted(is_encrypted)
87
88 CALL hm_get_floatv('EOS_C1', c1, is_available,lsubmodel,unitab)
89 CALL hm_get_floatv('EOS_C2', c2, is_available,lsubmodel,unitab)
90 CALL hm_get_floatv('EOS_C3', c3, is_available,lsubmodel,unitab)
91 CALL hm_get_floatv('MAT_GAMA0', g0, is_available,lsubmodel,unitab)
92
93 CALL hm_get_floatv('MAT_SIGT1',t1, is_available,lsubmodel,unitab)
94 CALL hm_get_floatv('MAT_SIGT2', t2, is_available,lsubmodel,unitab)
95 CALL hm_get_floatv('E_S', es, is_available,lsubmodel,unitab)
96
97 CALL hm_get_floatv('MAT_EOH',hh, is_available,lsubmodel,unitab)
98 CALL hm_get_floatv('MAT_EA', e0, is_available,lsubmodel,unitab)
99 CALL hm_get_floatv('Refer_Rho', rho0, is_available_rho0,lsubmodel,unitab)
100
101 IF(t1 == zero) t1=c1
102
103 rhor = pm(1)
104 rhoi = pm(89)
105
106 IF(rho0 > zero) THEN
107 rhor = rho0
108 pm(1)= rho0
109 mat_param%RHO = rho0
110 ELSE
111 rho0=rhor
112 ENDIF
113
114 psh = zero
115
116 pm(23) = e0
117 pm(32) = c1 + g0*e0 !BULK = (1+ยต)*dP/dmu (partial derivative at constant E)
118 pm(88) = psh
119!-------------------------------------
120 mat_param%EOS%NUPARAM = 8
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 mat_param%EOS%UPARAM(1) = c1
127 mat_param%EOS%UPARAM(2) = c2
128 mat_param%EOS%UPARAM(3) = c3
129 mat_param%EOS%UPARAM(4) = t1
130 mat_param%EOS%UPARAM(5) = t2
131 mat_param%EOS%UPARAM(6) = es
132 mat_param%EOS%UPARAM(7) = g0
133 mat_param%EOS%UPARAM(8) = hh
134 mat_param%EOS%PSH = psh
135 mat_param%EOS%E0 = e0
136 IF (mat_param%THERM%TINI == zero) THEN
137 mat_param%THERM%TINI =three100
138 pm(79) = three100
139 END IF
140
141
142 !COMPUTING INITIAL PRESSURE
143 IF(rhoi == zero)THEN
144 mu0 = zero ! error 683 already displayed
145 ELSE
146 IF(rhor /= zero)THEN
147 mu0 = rhoi/rhor-one
148 ELSE
149 mu0 = zero ! error 683 already displayed
150 ENDIF
151 ENDIF
152
153 IF(rhoi /= zero)THEN
154 df = rhor/rhoi
155 ELSE
156 df = zero
157 ENDIF
158
159 mu2 = mu0*mu0
160
161 xx =mu0/(one+mu0)
162 IF(mu0 >= zero) THEN
163 aa=(c1+c3*mu2)*mu0+c2*mu2
164 gx=one-g0*half*xx
165 bb=g0
166 pres=max(aa*gx+bb*e0,pm(37))
167 ELSEIF(e0<es)THEN
168 aa=(t1+t2*mu0)*mu0
169 gx=one-g0*half*xx
170 bb=g0
171 pres=max(aa*gx+bb*e0,pm(37))
172 ELSE
173 eta=one+mu0
174 ee=sqrt(eta)
175 bb=(hh+(g0-hh)*ee)*eta
176 cc= c1/(g0*es)
177 expa=exp(cc*xx)
178 aa= bb*es*(expa-one)
179 pres=max(aa+bb*e0,pm(37))
180 ENDIF
181 pm(31) = pres
182 pc = pm(37)
183
184 !SSP0
185 pp = pm(31)
186 ssp0 = zero
187 g0 = pm(22)
188 rhoi = pm(89)
189
190 xx =mu0/(one+mu0)
191 IF(mu0>=zero) THEN
192 dpdmu=(c1+two*c2*mu0+three*c3*mu2)*gx + g0*df*df*(pres-half*aa)
193 ELSEIF(e0<es)THEN
194 dpdmu=(t1+two*t2*mu0)*gx + g0*df*df*(pres-half*aa)
195 ELSE
196 dpdmu=bb*df*df*(pres+es*expa*cc) + (e0+es*(expa-one))*(hh+three_half*ee*(g0-hh))
197 ENDIF
198
199 dpdmu=max(zero,dpdmu)
200 IF(rhor > zero) ssp0 = sqrt((dpdmu + two_third*g0)/rhor)
201 pm(27)=ssp0
202
203
204 WRITE(iout,1000)
205 IF(is_encrypted)THEN
206 WRITE(iout,'(5X,A,//)')'CONFIDENTIAL DATA'
207 ELSE
208 WRITE(iout,1500)c1,c2,c3,g0,t1,t2,es,hh,e0,pm(31)
209 IF(is_available_rho0)WRITE(iout,1501)pm(1)
210 ENDIF
211
212 RETURN
213
214 1000 FORMAT(
215 & 5x,' PUFF EOS ',/,
216 & 5x,' -------- ',/)
217 1500 FORMAT(
218 & 5x,'C1. . . . . . . . . . . . . . . . . . . . .=',1pg20.13/,
219 & 5x,'C2. . . . . . . . . . . . . . . . . . . . .=',1pg20.13/,
220 & 5x,'C3. . . . . . . . . . . . . . . . . . . . .=',1pg20.13/,
221 & 5x,'GRUNEISEN GAMMA . . . . . . . . . . . . . .=',1pg20.13/,
222 & 5x,'T1. . . . . . . . . . . . . . . . . . . . .=',1pg20.13/,
223 & 5x,'T2. . . . . . . . . . . . . . . . . . . . .=',1pg20.13/,
224 & 5x,'SUBLIMATION ENERGY (PER UNIT VOLUME). . . .=',1pg20.13/,
225 & 5x,'H . . . . . . . . . . . . . . . . . . . . .=',1pg20.13/,
226 & 5x,'INITIAL INTERNAL ENERGY (PER UNIT VOLUME) .=',1pg20.13/,
227 & 5x,'INITIAL PRESSURE. . . . . . . . . . . . . .=',1pg20.13)
228 1501 FORMAT(
229 & 5x,'EOS REFERENCE DENSITY . . . . . . . . . .=',1pg20.13)
230
231 RETURN
232 END
#define my_real
Definition cppsort.cpp:32
subroutine hm_get_floatv(name, rval, is_available, lsubmodel, unitab)
subroutine hm_option_is_encrypted(is_encrypted)
subroutine hm_read_eos_puff(iout, pm, unitab, iunit, lsubmodel, imideos, mat_param)
#define max(a, b)
Definition macros.h:21