OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_eos.F File Reference
#include "implicit_f.inc"
#include "units_c.inc"
#include "param_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine hm_read_eos (mat_param, ipm, pm, bufmat, nummat, nfunct, buflen, iadbuf, eos_tag, unitab, lsubmodel, mlaw_tag, npc, tf, snpc, npts, sbufmat, ntable, table)

Function/Subroutine Documentation

◆ hm_read_eos()

subroutine hm_read_eos ( type(matparam_struct_), dimension(nummat), intent(inout), target mat_param,
integer, dimension(npropmi,nummat), intent(inout) ipm,
intent(inout) pm,
intent(inout) bufmat,
integer, intent(in) nummat,
integer, intent(in) nfunct,
integer buflen,
integer iadbuf,
type(eos_tag_), dimension(0:maxeos), intent(inout) eos_tag,
type (unit_type_), intent(in) unitab,
type(submodel_data), dimension(nsubmod), intent(in) lsubmodel,
type(mlaw_tag_), dimension(nummat), intent(inout) mlaw_tag,
integer, dimension(snpc), intent(in) npc,
dimension(npts), intent(in) tf,
integer, intent(in) snpc,
integer, intent(in) npts,
integer, intent(in) sbufmat,
integer, intent(in) ntable,
type(ttable), dimension(ntable), intent(in) table )

Definition at line 64 of file hm_read_eos.F.

69C-----------------------------------------------
70C A n a l y s e M o d u l e
71C-----------------------------------------------
72 USE matparam_def_mod
73 USE unitab_mod
74 USE message_mod
75 USE elbuftag_mod
79 USE hm_read_eos_exponential_mod , ONLY : hm_read_eos_exponential
80 USE hm_read_eos_compaction_mod , ONLY : hm_read_eos_compaction
81 USE hm_read_eos_compaction2_mod , ONLY : hm_read_eos_compaction2
82 USE hm_read_eos_compaction_tab_mod , ONLY : hm_read_eos_compaction_tab
83 USE table_mod , ONLY : ttable
84 !USE EOS_PARAM_MOD , ONLY : EOS_PARAM_
85C-----------------------------------------------
86C I m p l i c i t T y p e s
87C-----------------------------------------------
88#include "implicit_f.inc"
89C-----------------------------------------------
90C C o m m o n B l o c k s
91C-----------------------------------------------
92#include "units_c.inc"
93#include "param_c.inc"
94C-----------------------------------------------
95C D u m m y A r g u m e n t s
96C-----------------------------------------------
97 INTEGER,INTENT(IN) :: NUMMAT, NTABLE, NFUNCT
98 TYPE(MLAW_TAG_) , DIMENSION(NUMMAT),INTENT(INOUT) :: MLAW_TAG
99 TYPE (UNIT_TYPE_),INTENT(IN) ::UNITAB
100 INTEGER :: BUFLEN,IADBUF
101 INTEGER,INTENT(IN) :: SBUFMAT
102 INTEGER ,DIMENSION(NPROPMI,NUMMAT) ,INTENT(INOUT) :: IPM
103 INTEGER,INTENT(IN) :: SNPC, NPTS
104 INTEGER,INTENT(IN) :: NPC(SNPC)
105 my_real,INTENT(IN) :: tf(npts)
106 my_real ,DIMENSION(NPROPM ,NUMMAT) ,INTENT(INOUT) :: pm
107 my_real ,DIMENSION(SBUFMAT),INTENT(INOUT) :: bufmat
108 TYPE(MATPARAM_STRUCT_) ,DIMENSION(NUMMAT) ,TARGET, INTENT(INOUT) :: MAT_PARAM
109 TYPE(EOS_TAG_),DIMENSION(0:MAXEOS) ,INTENT(INOUT) :: EOS_TAG
110 TYPE(SUBMODEL_DATA) ,DIMENSION(NSUBMOD) ,INTENT(IN) :: LSUBMODEL
111 TYPE(TTABLE) ,DIMENSION(NTABLE) ,INTENT(IN) :: TABLE
112C-----------------------------------------------
113C L o c a l V a r i a b l e s
114C-----------------------------------------------
115 INTEGER :: I,IMAT,IEOS,HM_NEOS,IUNIT,FLAGUNIT,FLAGMAT,IMID,EOS_uid,MTN,UNIT_ID
116 CHARACTER(LEN=NCHARTITLE) :: TITR
117 CHARACTER KEY2*32, EOS_key*32
118 LOGICAL IS_AVAILABLE
119 INTEGER ISFLUID
120 TYPE(EOS_PARAM_),POINTER :: EOS_STRUCT
121c--------------------------------------------------
122c Routine reading EOS models :
123 !------------------------------------!
124 ! IEOS ! EOS !
125 !-----------!------------------------!
126 ! 0 => 18 (LINEAR) !
127 ! 1 ! POLYNOMIAL !
128 ! 2 ! GRUNEISEN !
129 ! 3 ! TILLOTSON !
130 ! 4 ! PUFF !
131 ! 5 ! SESAME !
132 ! 6 ! NOBLE-ABEL ! 2017.0
133 ! 7 ! IDEAL GAS ! 2018.0
134 ! 8 ! MUNAGHAN ! 2018.0
135 ! 9 ! OSBORNE ! 2018.0
136 ! 10 ! STIFFENED GAS ! 2018.0
137 ! 11 ! LSZK ! 2018.0
138 ! 12 ! POWDER-BURN ! 2019.1
139 ! 13 ! COMPACTION ! 2019.1
140 ! 14 ! NASG ! 2020.0
141 ! 15 ! JWL ! internal use : /INIMAP
142 ! 16 ! IDEALGAS_VT ! 2022.0
143 ! 17 ! TABULATED ! 2022.2
144 ! 18 ! LINEAR ! 2019.0
145 ! 19 ! EXPONENTIAL ! 2024.1
146 ! 20 ! COMPACTION2 ! 2025.1
147 ! 21 ! COMPACTION_TAB ! 2026.0
148 !------------------------------------!
149c======================================================================-
150c COUNT EOS MODELS USING CFG FILES
151c--------------------------------------------------
152c
153 CALL hm_option_count('/EOS',hm_neos)
154c
155c--------------------------------------------------
156c START BROWSING EOS MODELS
157c--------------------------------------------------
158c
159 CALL hm_option_start('/EOS')
160c--------------------------------------------------
161c
162 DO i = 1,hm_neos
163 CALL hm_option_read_key(lsubmodel, option_id=eos_uid, option_titr=titr, unit_id=unit_id)
164 CALL hm_get_string('EOS_Keyword',key2, 32,is_available)
165 eos_key = key2(1:len_trim(key2))
166 ! Check MAT_Id
167 flagmat = 0
168 DO imat=1,nummat-1
169 imid = ipm(1,imat)
170 IF (imid == eos_uid) THEN
171 flagmat = 1
172 EXIT
173 ENDIF
174 ENDDO
175 IF (eos_uid > 0 .AND. flagmat == 0) THEN
176 CALL ancmsg(msgid=1663, anmode=aninfo, msgtype=msgerror, i1=eos_uid, c1='EOS', c2=eos_key, c3=titr)
177 ENDIF
178
179 ! Check Unit_ID
180 flagunit = 0
181 DO iunit=1,unitab%NUNITS
182 IF (unitab%UNIT_ID(iunit) == unit_id) THEN
183 flagunit = 1
184 EXIT
185 ENDIF
186 ENDDO
187 IF (unit_id > 0 .AND. flagunit == 0) THEN
188 CALL ancmsg(msgid=659,anmode=aninfo,msgtype=msgerror,i1=eos_uid,i2=unit_id,c1='MATERIAL',c2='EOS MODEL',c3=titr)
189 ENDIF
190
191 !initialize %EOS member for current material
192 mat_param(imat)%EOS%TITLE = ''
193 mat_param(imat)%EOS%TITLE(1:len_trim(titr)) = titr(1:len_trim(titr))
194 mat_param(imat)%EOS%NUPARAM = 0
195 mat_param(imat)%EOS%NIPARAM = 0
196 mat_param(imat)%EOS%NFUNC = 0
197 mat_param(imat)%EOS%NTABLE = 0
198 mat_param(imat)%EOS%ISFLUID = 0
199 eos_struct => mat_param(imat)%EOS
200 isfluid = 0
201
202 WRITE(iout,1000) trim(titr),eos_uid
203 eos_struct%TITLE = eos_key
204 ! READ EOS
205 SELECT CASE (eos_key)
206c---
207 CASE ('POLYNOMIAL')
208 ieos = 1
209 CALL hm_read_eos_polynomial(iout,pm(1,imat),unitab,iunit,lsubmodel,eos_uid,isfluid,mat_param(imat))
210c---
211 CASE ('GRUNEISEN')
212 ieos = 2
213 CALL hm_read_eos_gruneisen(iout,pm(1,imat),unitab,iunit,lsubmodel,eos_uid,mat_param(imat))
214c---
215 CASE ('TILLOTSON')
216 ieos = 3
217 CALL hm_read_eos_tillotson(iout,pm(1,imat),unitab,iunit,lsubmodel,eos_uid,eos_tag,ieos,mat_param(imat))
218c---
219 CASE ('PUFF')
220 ieos = 4
221 CALL hm_read_eos_puff(iout,pm(1,imat),unitab,iunit,lsubmodel,eos_uid,mat_param(imat))
222c---
223 CASE ('SESAME')
224 ieos = 5
225 CALL hm_read_eos_sesame(iout,pm(1,imat),unitab,iunit,lsubmodel,eos_uid,imid,titr,bufmat,buflen,iadbuf,mat_param(imat))
226c---
227 CASE ('NOBLE-ABEL','NA')
228 ieos = 6
229 CALL hm_read_eos_noble_abel(iout,pm(1,imat),unitab,iunit,lsubmodel,eos_uid,mat_param(imat))
230 isfluid = 1
231c---
232 CASE ('IDEAL-GAS','IDEAL-GAS-VE')
233 ieos = 7
234 CALL hm_read_eos_ideal_gas(iout,pm(1,imat),unitab,iunit,lsubmodel,eos_uid, mat_param(imat))
235 isfluid = 1
236c---
237 CASE ('MURNAGHAN')
238 ieos = 8
239 CALL hm_read_eos_murnaghan(npropm, iout,pm(1,imat),unitab,iunit,lsubmodel,eos_uid, mat_param(imat))
240c---
241 CASE ('OSBORNE')
242 ieos = 9
243 CALL hm_read_eos_osborne(iout,pm(1,imat),unitab,iunit,lsubmodel,eos_uid,mat_param(imat))
244c---
245 CASE ('STIFF-GAS','SG')
246 ieos = 10
247 CALL hm_read_eos_stiffened_gas(iout,pm(1,imat),unitab,iunit,lsubmodel,eos_uid,mat_param(imat))
248 isfluid = 1
249c---
250 CASE ('LSZK')
251 ieos = 11
252 CALL hm_read_eos_lszk(iout,pm(1,imat),unitab,iunit,lsubmodel,eos_uid,mat_param(imat))
253 isfluid = 1
254c---
255 CASE ('POWDER-BURN')
256 ieos = 12
257 CALL hm_read_eos_powderburn(iout,pm(1,imat),ipm(1,imat),unitab,lsubmodel,eos_uid, mat_param(imat)%EOS,
258 . npropm, npropmi, mlaw_tag(imat), eos_tag, ieos )
259c---
260 CASE ('COMPACTION')
261 ieos = 13
262 CALL hm_read_eos_compaction(iout,pm(1,imat),unitab,lsubmodel,eos_uid,eos_tag,ieos,npropm,maxeos,eos_struct)
263c---
264 CASE ('NASG')
265 ieos = 14
266 CALL hm_read_eos_nasg(iout,pm(1,imat),unitab,iunit,lsubmodel,eos_uid,mat_param(imat))
267 isfluid = 1
268c---
269 CASE ('IDEAL-GAS-VT')
270 ieos = 16
271 CALL hm_read_eos_ideal_gas_vt(iout,pm(1,imat),unitab,iunit,lsubmodel,eos_uid,mat_param(imat))
272 isfluid = 1
273c---
274 CASE ('TABULATED')
275 ieos = 17
276 CALL hm_read_eos_tabulated(iout,pm(1,imat),unitab,iunit,lsubmodel,eos_uid, eos_struct)
277c---
278 CASE ('LINEAR')
279 ieos = 18
280 CALL hm_read_eos_linear(iout,pm(1,imat),unitab,iunit,lsubmodel,eos_uid,mat_param(imat))
281c---
282 CASE ('EXPONENTIAL')
283 ieos = 19
284 CALL hm_read_eos_exponential(iout,pm(1,imat),unitab,lsubmodel,npropm, eos_struct)
285c---
286 CASE ('COMPACTION2')
287 ieos = 20
288 CALL hm_read_eos_compaction2(iout,pm(1,imat),unitab,lsubmodel,eos_uid,eos_tag,ieos,npropm,maxeos,
289 . eos_struct, nfunct, npc, tf ,snpc , npts, mat_param(imat)%REZON)
290 CASE ('COMPACTION_TAB')
291 ieos = 21
292 CALL hm_read_eos_compaction_tab(iout,pm(1,imat),unitab,lsubmodel,eos_uid,eos_tag,ieos,npropm,maxeos,
293 . eos_struct, ntable, table, mat_param(imat)%REZON)
294c---
295 CASE DEFAULT
296 ieos = -1
297 CALL ancmsg(msgid=67,anmode=aninfo,msgtype=msgerror,i1= eos_uid,c1=key2,c2='EOS KEYWORD IS NOT VALID')
298c---
299 END SELECT
300
301 ipm(4,imat) = ieos
302 mat_param(imat)%IEOS = ieos
303 mat_param(imat)%EOS%EOSTYPE = ieos
304 mat_param(imat)%EOS%ISFLUID = isfluid
305c--------------------------------------------------
306 ENDDO ! HM_NEOS
307c--------------------------------------------------
308 DO i=1,nummat-1
309 mtn = ipm(2,i)
310 IF (mtn /= 42) pm(100,i) = pm(32,i)
311 ENDDO
312c-----------
313 RETURN
314c--------------------------------------------------
315 1000 FORMAT(//
316 & 5x,'EQUATION OF STATE ',/,
317 & 5x,a,/,
318 & 5x,'MATERIAL ID . . . . . . . . . . . .=',i10/)
319c--------------------------------------------------
#define my_real
Definition cppsort.cpp:32
subroutine hm_get_string(name, sval, size, is_available)
subroutine hm_option_count(entity_type, hm_option_number)
subroutine hm_option_start(entity_type)
subroutine hm_read_eos_gruneisen(iout, pm, unitab, iunit, lsubmodel, imideos, mat_param)
subroutine hm_read_eos_ideal_gas(iout, pm, unitab, iunit, lsubmodel, imideos, mat_param)
subroutine hm_read_eos_ideal_gas_vt(iout, pm, unitab, iunit, lsubmodel, imideos, mat_param)
subroutine hm_read_eos_linear(iout, pm, unitab, iunit, lsubmodel, imideos, mat_param)
subroutine hm_read_eos_lszk(iout, pm, unitab, iunit, lsubmodel, imideos, mat_param)
subroutine hm_read_eos_murnaghan(npropm, iout, pm, unitab, iunit, lsubmodel, imideos, mat_param)
subroutine hm_read_eos_nasg(iout, pm, unitab, iunit, lsubmodel, imideos, mat_param)
subroutine hm_read_eos_noble_abel(iout, pm, unitab, iunit, lsubmodel, imideos, mat_param)
subroutine hm_read_eos_osborne(iout, pm, unitab, iunit, lsubmodel, imideos, mat_param)
subroutine hm_read_eos_polynomial(iout, pm, unitab, iunit, lsubmodel, imideos, isfluid, mat_param)
subroutine hm_read_eos_puff(iout, pm, unitab, iunit, lsubmodel, imideos, mat_param)
subroutine hm_read_eos_sesame(iout, pm, unitab, iunit, lsubmodel, imideos, imid, titr, bufmat, mfi, idf, mat_param)
subroutine hm_read_eos_stiffened_gas(iout, pm, unitab, iunit, lsubmodel, imideos, mat_param)
subroutine hm_read_eos_tabulated(iout, pm, unitab, iunit, lsubmodel, imideos, eos_struct)
subroutine hm_read_eos_tillotson(iout, pm, unitab, iunit, lsubmodel, imideos, eos_tag, ieos, mat_param)
integer, save maxeos
integer, parameter nchartitle
integer, parameter ncharkey
integer nsubmod
subroutine ancmsg(msgid, msgtype, anmode, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, r1, r2, r3, r4, r5, r6, r7, r8, r9, c1, c2, c3, c4, c5, c6, c7, c8, c9, prmode)
Definition message.F:895