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) 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 63 of file hm_read_eos.F.

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