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)
35C-----------------------------------------------
36C M o d u l e s
37C-----------------------------------------------
38 USE unitab_mod
39 USE submodel_mod
40 USE message_mod
41C-----------------------------------------------
42C D e s c r i p t i o n
43C-----------------------------------------------
44C reading parameters for
45C PUFF EQUATION OF STATE
46C-----------------------------------------------
47C C o m m e n t s
48C-----------------------------------------------
49C RHOI = PM(89) -> provided by /MAT
50C RHOR = PM(01) -> provided by /MAT (can be erased by EOS if present : obsolete)
51C => MU0 = RHO/RHOR-1.
52C PM(31) = P(MU0,E0) -> will be used to initialize diagonal of stress tensor SIG(1:3,*)
53C-----------------------------------------------
54C I m p l i c i t T y p e s
55C-----------------------------------------------
56#include "implicit_f.inc"
57C-----------------------------------------------
58C D u m m y A r g u m e n t s
59C-----------------------------------------------
60 TYPE (UNIT_TYPE_),INTENT(IN) ::UNITAB
61 INTEGER IIN,IOUT,IUNIT
62 my_real pm(npropm)
63 TYPE(SUBMODEL_DATA), DIMENSION(NSUBMOD), INTENT(IN) :: LSUBMODEL
64 INTEGER,INTENT(IN) :: IMIDEOS
65C-----------------------------------------------
66C C o m m o n B l o c k s
67C-----------------------------------------------
68#include "param_c.inc"
69C-----------------------------------------------
70C L o c a l V a r i a b l e s
71C-----------------------------------------------
73 . c1, c2, c3, g0, t1, t2, es, hh, e0, rho0,
74 . fac_l,fac_t,fac_m,fac_c,rhor,rhoi,mu2,
75 . xx,aa,bb,gx,pres,expa,eta,ee,cc, mu0, df, pp ,ssp0, dpdmu, pc
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('EOS_C1', c1, is_available,lsubmodel,unitab)
87 CALL hm_get_floatv('EOS_C2', c2, is_available,lsubmodel,unitab)
88 CALL hm_get_floatv('EOS_C3', c3, is_available,lsubmodel,unitab)
89 CALL hm_get_floatv('MAT_GAMA0', g0, is_available,lsubmodel,unitab)
90
91 CALL hm_get_floatv('MAT_SIGT1',t1, is_available,lsubmodel,unitab)
92 CALL hm_get_floatv('MAT_SIGT2', t2, is_available,lsubmodel,unitab)
93 CALL hm_get_floatv('E_S', es, is_available,lsubmodel,unitab)
94
95 CALL hm_get_floatv('MAT_EOH',hh, is_available,lsubmodel,unitab)
96 CALL hm_get_floatv('MAT_EA', e0, is_available,lsubmodel,unitab)
97 CALL hm_get_floatv('Refer_Rho', rho0, is_available_rho0,lsubmodel,unitab)
98
99 IF(t1 == zero) t1=c1
100
101 rhor = pm(1)
102 rhoi = pm(89)
103
104 IF(rho0 > zero) THEN
105 rhor = rho0
106 pm(1)= rho0
107 ELSE
108 rho0=rhor
109 ENDIF
110
111 pm( 23) = e0
112 pm( 32) = c1
113 pm( 33) = c2
114 pm( 34) = c3
115 pm( 35) = t1
116 pm( 36) = t2
117 pm(160) = es
118 pm(161) = g0
119 pm(162) = hh
120 IF(pm(79)==zero)pm(79)=three100
121
122 !COMPUTING INITIAL PRESSURE
123 IF(rhoi == zero)THEN
124 mu0 = zero ! error 683 already displayed
125 ELSE
126 IF(rhor /= zero)THEN
127 mu0 = rhoi/rhor-one
128 ELSE
129 mu0 = zero ! error 683 already displayed
130 ENDIF
131 ENDIF
132
133 IF(rhoi /= zero)THEN
134 df = rhor/rhoi
135 ELSE
136 df = zero
137 ENDIF
138
139 mu2 = mu0*mu0
140
141 xx =mu0/(one+mu0)
142 IF(mu0 >= zero) THEN
143 aa=(c1+c3*mu2)*mu0+c2*mu2
144 gx=one-g0*half*xx
145 bb=g0
146 pres=max(aa*gx+bb*e0,pm(37))
147 ELSEIF(e0<es)THEN
148 aa=(t1+t2*mu0)*mu0
149 gx=one-g0*half*xx
150 bb=g0
151 pres=max(aa*gx+bb*e0,pm(37))
152 ELSE
153 eta=one+mu0
154 ee=sqrt(eta)
155 bb=(hh+(g0-hh)*ee)*eta
156 cc= c1/(g0*es)
157 expa=exp(cc*xx)
158 aa= bb*es*(expa-one)
159 pres=max(aa+bb*e0,pm(37))
160 ENDIF
161 pm(31) = pres
162 pc = pm(37)
163
164 !SSP0
165 pp = pm(31)
166 ssp0 = zero
167 g0 = pm(22)
168 rhoi = pm(89)
169
170 xx =mu0/(one+mu0)
171 IF(mu0>=zero) THEN
172 dpdmu=(c1+two*c2*mu0+three*c3*mu2)*gx + g0*df*df*(pres-half*aa)
173 ELSEIF(e0<es)THEN
174 dpdmu=(t1+two*t2*mu0)*gx + g0*df*df*(pres-half*aa)
175 ELSE
176 dpdmu=bb*df*df*(pres+es*expa*cc) + (e0+es*(expa-one))*(hh+three_half*ee*(g0-hh))
177 ENDIF
178
179 dpdmu=max(zero,dpdmu)
180 IF(rhor > zero) ssp0 = sqrt((dpdmu + two_third*g0)/rhor)
181 pm(27)=ssp0
182
183
184 WRITE(iout,1000)
185 IF(is_encrypted)THEN
186 WRITE(iout,'(5X,A,//)')'CONFIDENTIAL DATA'
187 ELSE
188 WRITE(iout,1500)c1,c2,c3,g0,t1,t2,es,hh,e0,pm(31)
189 IF(is_available_rho0)WRITE(iout,1501)pm(1)
190 ENDIF
191
192 RETURN
193
194 1000 FORMAT(
195 & 5x,' PUFF EOS ',/,
196 & 5x,' -------- ',/)
197 1500 FORMAT(
198 & 5x,'C1. . . . . . . . . . . . . . . . . . . . .=',1pg20.13/,
199 & 5x,'C2. . . . . . . . . . . . . . . . . . . . .=',1pg20.13/,
200 & 5x,'C3. . . . . . . . . . . . . . . . . . . . .=',1pg20.13/,
201 & 5x,'GRUNEISEN GAMMA . . . . . . . . . . . . . .=',1pg20.13/,
202 & 5x,'T1. . . . . . . . . . . . . . . . . . . . .=',1pg20.13/,
203 & 5x,'T2. . . . . . . . . . . . . . . . . . . . .=',1pg20.13/,
204 & 5x,'SUBLIMATION ENERGY (PER UNIT VOLUME). . . .=',1pg20.13/,
205 & 5x,'H . . . . . . . . . . . . . . . . . . . . .=',1pg20.13/,
206 & 5x,'INITIAL INTERNAL ENERGY (PER UNIT VOLUME) .=',1pg20.13/,
207 & 5x,'INITIAL PRESSURE. . . . . . . . . . . . . .=',1pg20.13)
208 1501 FORMAT(
209 & 5x,'EOS REFERENCE DENSITY . . . . . . . . . .=',1pg20.13)
210
211 RETURN
212 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)
#define max(a, b)
Definition macros.h:21
program starter
Definition starter.F:39