OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
eosmain.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!|| eosmain_mod ../common_source/eos/eosmain.F
25!||--- called by ------------------------------------------------------
26!|| inigrav_eos ../starter/source/initial_conditions/inigrav/inigrav_eos.F
27!|| m12law ../engine/source/materials/mat/mat012/m12law.F
28!|| mmain ../engine/source/materials/mat_share/mmain.F90
29!|| multi_solve_eint ../engine/source/multifluid/multi_solve_eint.F90
30!|| multi_submatlaw ../engine/source/multifluid/multi_submatlaw.F
31!|| sigeps75 ../engine/source/materials/mat/mat075/sigeps75.F
32!||====================================================================
34 contains
35!||====================================================================
36!|| eosmain ../common_source/eos/eosmain.F
37!||--- called by ------------------------------------------------------
38!|| inigrav_eos ../starter/source/initial_conditions/inigrav/inigrav_eos.F
39!|| m12law ../engine/source/materials/mat/mat012/m12law.F
40!|| mmain ../engine/source/materials/mat_share/mmain.F90
41!|| multi_solve_eint ../engine/source/multifluid/multi_solve_eint.F90
42!|| multi_submatlaw ../engine/source/multifluid/multi_submatlaw.F
43!|| sigeps75 ../engine/source/materials/mat/mat075/sigeps75.F
44!||--- calls -----------------------------------------------------
45!|| compaction ../common_source/eos/compaction.F90
46!|| compaction2 ../common_source/eos/compaction2.F90
47!|| compaction_tab ../common_source/eos/compaction_tab.F90
48!|| eosexponential ../common_source/eos/eosexponential.F90
49!|| eoslinear ../common_source/eos/eoslinear.F
50!|| eospolyno ../common_source/eos/eospolyno.F
51!|| gruneisen ../common_source/eos/gruneisen.f
52!|| idealgas ../common_source/eos/idealgas.F
53!|| idealgas_vt ../common_source/eos/idealgas_vt.F
54!|| jwl ../common_source/eos/jwl.F
55!|| lszk ../common_source/eos/lszk.F
56!|| murnaghan ../common_source/eos/murnaghan.F
57!|| nasg ../common_source/eos/nasg.F
58!|| noble_abel ../common_source/eos/noble_abel.F
59!|| osborne ../common_source/eos/osborne.F
60!|| powder_burn ../common_source/eos/powder_burn.F
61!|| puff ../common_source/eos/puff.F
62!|| sesame ../common_source/eos/sesame.F
63!|| stiffgas ../common_source/eos/stiffgas.F
64!|| tabulated ../common_source/eos/tabulated.F
65!|| tillotson ../common_source/eos/tillotson.F
66!||--- uses -----------------------------------------------------
67!|| compaction2_mod ../common_source/eos/compaction2.F90
68!|| compaction_mod ../common_source/eos/compaction.F90
69!|| compaction_tab_mod ../common_source/eos/compaction_tab.F90
70!|| eosexponential_mod ../common_source/eos/eosexponential.F90
71!|| matparam_def_mod ../common_source/modules/mat_elem/matparam_def_mod.F90
72!||====================================================================
73 SUBROUTINE eosmain(IFLAG ,NEL ,EOSTYP ,PM ,OFF ,EINT ,
74 2 RHO ,RHO0 ,MU ,MU2 ,ESPE ,
75 3 DVOL ,DF ,VNEW ,MAT ,PSH ,
76 4 PNEW ,DPDM ,DPDE ,THETA ,
77 5 BUFMAT,SIG ,MU_BAK ,MLW ,
78 6 NPF ,TF ,VAREOS ,NVAREOS ,MAT_PARAM,
79 7 BFRAC ,NVARTMP,VARTMP)
80C-----------------------------------------------
81 use eosexponential_mod
82C-----------------------------------------------
83C D e s c r i p t i o n
84C-----------------------------------------------
85C This subroutines call the expected EOS solver
86C depending on EOSTYP(INTEGER) value.
87 !------------------------------------!
88 ! IEOS ! EOS !
89 !-----------!------------------------!
90 ! 1 ! POLYNOMIAL !
91 ! 2 ! GRUNEISEN !
92 ! 3 ! TILLOTSON !
93 ! 4 ! PUFF !
94 ! 5 ! SESAME !
95 ! 6 ! NOBLE-ABEL ! 2017.0
96 ! 7 ! IDEAL GAS ! 2018.0
97 ! 8 ! MUNAGHAN ! 2018.0
98 ! 9 ! OSBORNE ! 2018.0
99 ! 10 ! STIFFENED GAS ! 2018.0
100 ! 11 ! LSZK ! 2018.0
101 ! 12 ! POWDER-BURN ! 2019.1
102 ! 13 ! COMPACTION ! 2019.1
103 ! 14 ! NASG ! 2020.0
104 ! 15 ! JWL ! internal use : INIMAP
105 ! 16 ! IDEALGAS_VT ! 2022.0
106 ! 17 ! TABULATED ! 2022.2
107 ! 18 ! LINEAR ! 2019.0
108 ! 19 ! EXPONENTIAL ! 2024.1
109 !------------------------------------!
110!
111! input EINT(:) : rho.e (law151 , unit J/m**3)
112! rho.e.V (other laws, unit J)
113!
114! output EPSE(:) : rho0.e (=E) (all laws, used such as P_eos:=P(mu,E) )
115!
116C-----------------------------------------------
117C M o d u l e s
118C-----------------------------------------------
119 USE matparam_def_mod , ONLY : matparam_struct_
120 USE compaction_mod , ONLY : compaction
121 USE compaction2_mod , ONLY : compaction2
122 USE compaction_tab_mod , ONLY : compaction_tab
123C-----------------------------------------------
124C I m p l i c i t T y p e s
125C-----------------------------------------------
126#include "implicit_f.inc"
127C-----------------------------------------------
128C G l o b a l P a r a m e t e r s
129C-----------------------------------------------
130#include "param_c.inc"
131C-----------------------------------------------
132C C o m m o n B l o c k s
133C-----------------------------------------------
134#include "com04_c.inc"
135#include "com08_c.inc"
136#include "tabsiz_c.inc"
137C-----------------------------------------------
138C D u m m y A r g u m e n t s
139C-----------------------------------------------
140 INTEGER MAT(NEL),IFLAG, EOSTYP, NEL, MLW, NVAREOS
141 my_real PM(NPROPM,NUMMAT),BUFMAT(SBUFMAT),OFF(NEL),EINT(NEL),RHO(NEL),RHO0(NEL),MU(NEL),MU2(NEL),ESPE(NEL),DVOL(NEL),
142 . DF(NEL),VNEW(NEL),PSH(NEL),PNEW(NEL),DPDM(NEL),DPDE(NEL),THETA(NEL),MU_BAK(NEL),
143 . SIG(NEL,6),VAREOS(NVAREOS*NEL)
144 my_real,INTENT(INOUT) :: BFRAC(NEL)
145 INTEGER,INTENT(IN)::NPF(SNPC)
146 my_real,INTENT(IN)::tf(stf)
147 TYPE(matparam_struct_), INTENT(IN) :: MAT_PARAM !material data structure
148 my_real :: DTEMP(NEL) !< temperature increment
149 my_real :: CV !< specific heat at constant volume
150 my_real :: cp !< specific heat at constant pressure
151 my_real :: tab_temp(nel) !< temporary array,tabulated temperatures
152 integer ,intent(in) :: nvartmp !< number of temporary internal variables
153 integer ,dimension(nel,nvartmp) ,intent(inout) :: vartmp !< temporary internal variables
154C-----------------------------------------------
155C L o c a l V a r i a b l e s
156C-----------------------------------------------
157 INTEGER I, ISFLUID
158C-----------------------------------------------
159C S o u r c e L i n e s
160C-----------------------------------------------
161 IF(iflag == 0) THEN
162 DO i=1,nel
163 mu2(i)=max(zero,mu(i))**2
164 espe(i)=df(i)*eint(i)/ max(em15,vnew(i)) !ESPE=rho0.e since EINT=rho.e.V and DF=rho0/rho => DF*EINT/V = E
165 ENDDO
166
167 ELSEIF (iflag == 2) THEN
168 !COLLOCATED SCHEME (LAW151 ONLY)
169 DO i = 1, nel
170 IF (vnew(i) > zero) THEN
171 mu2(i)=max(zero,mu(i))**2
172 ENDIF
173 espe(i) = df(i) * eint(i) !law151 : EINT=rho.e
174 ENDDO
175
176 ENDIF
177
178 SELECT CASE (eostyp)
179
180 CASE (1)
181 !--------------------------------------------------!
182 ! POLYNOMIAL EOS !
183 !--------------------------------------------------!
184 CALL eospolyno(
185 1 iflag ,nel ,pm ,off ,eint ,mu ,mu2,
186 2 espe ,dvol ,df ,vnew ,mat ,psh ,
187 3 pnew ,dpdm ,dpde )
188
189 CASE (2)
190 !--------------------------------------------------!
191 ! GRUNEISEN EOS !
192 !--------------------------------------------------!
193 CALL gruneisen(
194 1 iflag ,nel ,pm ,off ,eint ,mu ,mu2,
195 2 espe ,dvol ,df ,vnew ,mat ,rho0,
196 3 pnew ,dpdm ,dpde ,psh ,
197 4 nummat ,npropm)
198
199 CASE (3)
200 !--------------------------------------------------!
201 ! TILLOTSON EOS !
202 !--------------------------------------------------!
203 CALL tillotson(
204 1 iflag ,nel ,pm ,off ,eint ,mu ,mu2,
205 2 espe ,dvol ,df ,vnew ,mat ,psh ,
206 3 pnew ,dpdm ,dpde ,vareos ,nvareos)
207
208 CASE (4)
209 !--------------------------------------------------!
210 ! PUFF EOS !
211 !--------------------------------------------------!
212 CALL puff(
213 1 iflag ,nel ,pm ,off ,eint ,mu ,mu2,
214 2 espe ,dvol ,df ,vnew ,mat ,
215 3 pnew ,dpdm ,dpde )
216
217 CASE (5)
218 !--------------------------------------------------!
219 ! SESAME EOS !
220 !--------------------------------------------------!
221 tab_temp(1:nel) = theta(1:nel)
222 CALL sesame(
223 1 iflag ,nel ,pm ,off ,eint ,rho ,rho0 ,
224 2 espe ,dvol ,mat ,pnew ,dpdm ,dpde,
225 3 tab_temp ,bufmat )
226
227 CASE(6)
228 !--------------------------------------------------!
229 ! NOBLE-ABEL EOS (COVOLUME EOS) !
230 !--------------------------------------------------!
231 CALL noble_abel(
232 1 iflag ,nel ,pm ,off ,eint ,mu ,
233 2 espe ,dvol ,df ,vnew ,mat ,psh ,
234 3 pnew ,dpdm ,dpde )
235
236 CASE(7)
237 !--------------------------------------------------!
238 ! IDEAL GAS EOS !
239 !--------------------------------------------------!
240 CALL idealgas(
241 1 iflag ,nel ,pm ,off ,eint ,mu ,
242 2 espe ,dvol ,df ,vnew ,mat ,psh ,
243 3 pnew ,dpdm ,dpde )
244
245 CASE(8)
246 !--------------------------------------------------!
247 ! OSBORNE EOS !
248 !--------------------------------------------------!
249 CALL murnaghan(
250 1 iflag ,nel ,pm ,off ,eint ,mu ,
251 2 dvol ,vnew ,mat ,psh ,
252 3 pnew ,dpdm ,dpde )
253
254 CASE(9)
255 !--------------------------------------------------!
256 ! OSBORNE EOS !
257 !--------------------------------------------------!
258 CALL osborne(
259 1 iflag ,nel ,pm ,off ,eint ,mu ,
260 2 espe ,dvol ,df ,vnew ,mat ,psh ,
261 3 pnew ,dpdm ,dpde )
262
263 CASE(10)
264 !--------------------------------------------------!
265 ! STIFFENED GAS EOS !
266 !--------------------------------------------------!
267 CALL stiffgas(
268 1 iflag ,nel ,pm ,off ,eint ,mu ,mu2,
269 2 espe ,dvol ,df ,vnew ,mat ,psh ,
270 3 pnew ,dpdm ,dpde )
271
272 CASE(11)
273 !--------------------------------------------------!
274 ! STIFFENED GAS EOS !
275 !--------------------------------------------------!
276 CALL lszk(
277 1 iflag ,nel ,pm ,off ,eint ,mu ,
278 2 espe ,dvol ,df ,vnew ,mat ,psh ,
279 3 pnew ,dpdm ,dpde )
280
281 CASE(12)
282 !--------------------------------------------------!
283 ! POWDER BURN EOS !
284 !--------------------------------------------------!
285 CALL powder_burn(
286 1 iflag ,nel ,pm ,off ,eint ,mu ,mu2,
287 2 espe ,dvol ,df ,vnew ,mat ,psh ,
288 3 pnew ,dpdm ,dpde ,mat_param,
289 4 vareos ,nvareos ,nummat,npropm ,dt1 ,rho0 ,bfrac)
290
291 CASE(13)
292 !--------------------------------------------------!
293 ! COMPACTION EOS !
294 !--------------------------------------------------!
295 CALL compaction(
296 1 iflag ,nel ,pm ,off ,eint ,mu ,mu2,
297 2 dvol ,mat ,psh ,
298 3 pnew ,dpdm ,dpde ,mu_bak,
299 4 npropm,nummat,mat_param%EOS)
300
301 CASE(14)
302 !--------------------------------------------------!
303 ! NASG EOS !
304 !--------------------------------------------------!
305 CALL nasg(
306 1 iflag ,nel ,pm ,off ,eint ,mu ,
307 2 espe ,dvol ,vnew ,mat ,psh ,
308 3 pnew ,dpdm ,dpde )
309 CASE(15)
310 !--------------------------------------------------!
311 ! JWL EOS (internal use, no /EOS/JWL so far)!
312 !--------------------------------------------------!
313 CALL jwl(
314 1 iflag ,nel ,pm ,off , eint ,mu ,mu2,
315 2 espe ,dvol ,df ,vnew , mat ,psh ,
316 3 pnew ,dpdm ,dpde )
317
318 CASE(16)
319 !--------------------------------------------------!
320 ! IDEAL GAS EOS !
321 !--------------------------------------------------!
322 CALL idealgas_vt(
323 1 iflag ,nel ,pm ,off ,eint ,mu ,mu2,
324 2 espe ,dvol ,df ,vnew ,mat ,psh ,
325 3 pnew ,dpdm ,dpde ,tab_temp,sig)
326
327 CASE(17)
328 !--------------------------------------------------!
329 ! TABULATED EOS !
330 !--------------------------------------------------!
331 CALL tabulated(
332 1 iflag ,nel ,pm ,off ,eint ,mu ,
333 2 espe ,dvol ,df ,vnew ,mat ,psh ,
334 3 pnew ,dpdm ,dpde ,
335 4 npf ,tf)
336
337 CASE (18)
338 !--------------------------------------------------!
339 ! LINEAR EOS !
340 !--------------------------------------------------!
341 CALL eoslinear(
342 1 iflag ,nel ,pm ,off ,eint ,mu ,
343 2 dvol ,vnew ,mat ,psh ,pnew ,dpdm,
344 3 dpde )
345
346 CASE (19)
347 !--------------------------------------------------!
348 ! EXPONENTIAL EOS !
349 !--------------------------------------------------!
350 CALL eosexponential(
351 1 iflag ,nel ,pm ,off ,eint ,
352 2 dvol ,vnew ,mat ,psh ,
353 3 pnew ,dpdm ,dpde ,tt ,
354 4 npropm ,nummat )
355
356 CASE(20)
357 !--------------------------------------------------!
358 ! COMPACTION EOS !
359 !--------------------------------------------------!
360 CALL compaction2(
361 1 iflag ,nel ,pm ,off ,eint ,mu ,
362 2 dvol ,mat ,psh ,
363 3 pnew ,dpdm ,dpde ,mu_bak,
364 4 npf ,tf ,snpc ,stf ,npropm,nummat,
365 5 mat_param%EOS)
366
367 CASE(21)
368 !--------------------------------------------------!
369 ! COMPACTIONTAB EOS !
370 !--------------------------------------------------!
371 CALL compaction_tab(
372 1 iflag ,nel ,pm ,off ,eint ,
373 2 dvol ,mat ,psh ,dt1 ,rho ,rho0 ,
374 3 pnew ,dpdm ,dpde ,mu_bak,
375 4 npropm,nummat,nvareos,vareos,nvartmp,vartmp,
376 5 mat_param%EOS)
377
378 END SELECT
379
380 !--------------------------------------------------!
381 ! TEMPERATURE FROM EOS !
382 !--------------------------------------------------!
383 IF(iflag == 0) RETURN
384
385 dtemp(1:nel) = zero
386
387 SELECT CASE (eostyp)
388
389 CASE (5,16)
390 !tabulated EoS or formal expression
391 !SESAME(5), IDEAL-GAS-VT(16)
392 DO i=1,nel
393 IF(off(i) == one .AND. vnew(i) > zero) THEN
394 theta(i) = tab_temp(i)
395 dtemp(i) = zero
396 ENDIF
397 ENDDO
398
399 CASE(8,13,18,20)
400 !no depedency on internal energy (we may deduce the EoS from strain tensor if Hooke's law is used)
401 cp = pm(69,mat(1)) / rho0(1)
402 cv = cp !suitable approximation since these EoS are modeling solids
403 IF(cv > zero)THEN
404 DO i=1,nel
405 IF(off(i) == one .AND. vnew(i) > zero) THEN
406 dtemp(i) = (pnew(i)+psh(i))*dvol(i)/cv
407 ENDIF
408 ENDDO
409 ENDIF
410
411 CASE DEFAULT
412 !gruneisen parameter is strictly positive (most of EoS)
413 DO i=1,nel
414 IF(off(i) == one .AND. vnew(i) > zero) THEN
415 dtemp(i) = -(theta(i)*dpde(i)*df(i))*dvol(i)/vnew(i) ! no conduction => Cv does not play any role
416 ENDIF
417 ENDDO
418
419 END SELECT
420
421
422 isfluid = mat_param%eos%isfluid
423 if(isfluid == 0)then
424 !solid material modeling
425 do i=1,nel
426 IF(dtemp(i) > zero)THEN
427 theta(i) = theta(i) + dtemp(i)
428 endif
429 theta(i) = max(zero,theta(i))
430 end do
431 else
432 !fluid material modeling
433 do i=1,nel
434 theta(i) = theta(i) + dtemp(i)
435 theta(i) = max(zero,theta(i))
436 end do
437 end if
438
439
440 RETURN
441 END SUBROUTINE eosmain
442 END MODULE eosmain_mod
subroutine eoslinear(iflag, nel, pm, off, eint, mu, dvol, vnew, mat, psh, pnew, dpdm, dpde)
Definition eoslinear.F:31
subroutine eospolyno(iflag, nel, pm, off, eint, mu, mu2, espe, dvol, df, vnew, mat, psh, pnew, dpdm, dpde)
Definition eospolyno.F:33
subroutine gruneisen(iflag, nel, pm, off, eint, mu, mu2, espe, dvol, df, vnew, mat, rho0, pnew, dpdm, dpde, psh, nummat, npropm)
Definition gruneisen.F:32
subroutine idealgas(iflag, nel, pm, off, eint, mu, espe, dvol, df, vnew, mat, psh, pnew, dpdm, dpde)
Definition idealgas.F:31
subroutine idealgas_vt(iflag, nel, pm, off, eint, mu, mu2, espe, dvol, df, vnew, mat, psh, pnew, dpdm, dpde, theta, sig)
Definition idealgas_vt.F:31
subroutine jwl(iflag, nel, pm, off, eint, mu, mu2, espe, dvol, df, vnew, mat, psh, pnew, dpdm, dpde)
Definition jwl.F:32
subroutine lszk(iflag, nel, pm, off, eint, mu, espe, dvol, df, vnew, mat, psh, pnew, dpdm, dpde)
Definition lszk.F:31
#define max(a, b)
Definition macros.h:21
subroutine murnaghan(iflag, nel, pm, off, eint, mu, dvol, vnew, mat, psh, pnew, dpdm, dpde)
Definition murnaghan.F:31
subroutine eosmain(iflag, nel, eostyp, pm, off, eint, rho, rho0, mu, mu2, espe, dvol, df, vnew, mat, psh, pnew, dpdm, dpde, theta, bufmat, sig, mu_bak, mlw, npf, tf, vareos, nvareos, mat_param, bfrac, nvartmp, vartmp)
Definition eosmain.F:80
subroutine nasg(iflag, nel, pm, off, eint, mu, espe, dvol, vnew, mat, psh, pnew, dpdm, dpde)
Definition nasg.F:32
subroutine noble_abel(iflag, nel, pm, off, eint, mu, espe, dvol, df, vnew, mat, psh, pnew, dpdm, dpde)
Definition noble_abel.F:31
subroutine osborne(iflag, nel, pm, off, eint, mu, espe, dvol, df, vnew, mat, psh, pnew, dpdm, dpde)
Definition osborne.F:31
subroutine powder_burn(iflag, nel, pm, off, eint, mu, mu2, espe, dvol, df, vnew, mat, psh, pnew, dpdm, dpde, mat_param, vareos, nvareos, npropm, nummat, dt1, rho0, bfrac)
Definition powder_burn.F:36
subroutine puff(iflag, nel, pm, off, eint, mu, mu2, espe, dvol, df, vnew, mat, pnew, dpdm, dpde)
Definition puff.F:33
subroutine sesame(iflag, nel, pm, off, eint, rho, rho0, espe, dvol, mat, pnew, dpdm, dpde, theta, bufmat)
Definition sesame.F:35
subroutine stiffgas(iflag, nel, pm, off, eint, mu, mu2, espe, dvol, df, vnew, mat, psh, pnew, dpdm, dpde)
Definition stiffgas.F:32
subroutine tabulated(iflag, nel, pm, off, eint, mu, espe, dvol, df, vnew, mat, psh, pnew, dpdm, dpde, npf, tf)
Definition tabulated.F:32
subroutine tillotson(iflag, nel, pm, off, eint, mu, mu2, espe, dvol, df, vnew, mat, psh, pnew, dpdm, dpde, vareos, nvareos)
Definition tillotson.F:32