OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
eosmain_mod Module Reference

Functions/Subroutines

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)

Function/Subroutine Documentation

◆ eosmain()

subroutine eosmain_mod::eosmain ( integer iflag,
integer nel,
integer eostyp,
pm,
off,
eint,
rho,
rho0,
mu,
mu2,
espe,
dvol,
df,
vnew,
integer, dimension(nel) mat,
psh,
pnew,
dpdm,
dpde,
theta,
bufmat,
sig,
mu_bak,
integer mlw,
integer, dimension(snpc), intent(in) npf,
dimension(stf), intent(in) tf,
vareos,
integer nvareos,
type(matparam_struct_), intent(in) mat_param,
dimension(nel), intent(inout) bfrac,
integer, intent(in) nvartmp,
integer, dimension(nel,nvartmp), intent(inout) vartmp )
Parameters
[in]mat_paramtemperature increment
[in]mat_paramspecific heat at constant volume
[in]mat_paramspecific heat at constant pressure
[in]mat_paramtemporary array,tabulated temperatures
[in]nvartmpnumber of temporary internal variables
[in,out]vartmptemporary internal variables

Definition at line 73 of file eosmain.F.

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
#define my_real
Definition cppsort.cpp:32
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 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