OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_eos.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 ../starter/source/materials/eos/hm_read_eos.F
25!||--- called by ------------------------------------------------------
26!|| read_material_models ../starter/source/materials/read_material_models.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.F
29!|| hm_get_string ../starter/source/devtools/hm_reader/hm_get_string.F
30!|| hm_option_count ../starter/source/devtools/hm_reader/hm_option_count.F
31!|| hm_option_read_key ../starter/source/devtools/hm_reader/hm_option_read_key.F
32!|| hm_option_start ../starter/source/devtools/hm_reader/hm_option_start.F
33!|| hm_read_eos_compaction ../starter/source/materials/eos/hm_read_eos_compaction.F90
34!|| hm_read_eos_compaction2 ../starter/source/materials/eos/hm_read_eos_compaction2.F90
35!|| hm_read_eos_compaction_tab ../starter/source/materials/eos/hm_read_eos_compaction_tab.F90
36!|| hm_read_eos_exponential ../starter/source/materials/eos/hm_read_eos_exponential.F90
37!|| hm_read_eos_gruneisen ../starter/source/materials/eos/hm_read_eos_gruneisen.F
38!|| hm_read_eos_ideal_gas ../starter/source/materials/eos/hm_read_eos_ideal_gas.F
39!|| hm_read_eos_ideal_gas_vt ../starter/source/materials/eos/hm_read_eos_ideal_gas_vt.F
40!|| hm_read_eos_linear ../starter/source/materials/eos/hm_read_eos_linear.F
41!|| hm_read_eos_lszk ../starter/source/materials/eos/hm_read_eos_lszk.F
42!|| hm_read_eos_murnaghan ../starter/source/materials/eos/hm_read_eos_murnaghan.F
43!|| hm_read_eos_nasg ../starter/source/materials/eos/hm_read_eos_nasg.F
44!|| hm_read_eos_noble_abel ../starter/source/materials/eos/hm_read_eos_noble_abel.F
45!|| hm_read_eos_osborne ../starter/source/materials/eos/hm_read_eos_osborne.F
46!|| hm_read_eos_polynomial ../starter/source/materials/eos/hm_read_eos_polynomial.F
47!|| hm_read_eos_powderburn ../starter/source/materials/eos/hm_read_eos_powderburn.F90
48!|| hm_read_eos_puff ../starter/source/materials/eos/hm_read_eos_puff.F
49!|| hm_read_eos_sesame ../starter/source/materials/eos/hm_read_eos_sesame.F
50!|| hm_read_eos_stiffened_gas ../starter/source/materials/eos/hm_read_eos_stiffened_gas.F
51!|| hm_read_eos_tabulated ../starter/source/materials/eos/hm_read_eos_tabulated.F
52!|| hm_read_eos_tillotson ../starter/source/materials/eos/hm_read_eos_tillotson.F
53!||--- uses -----------------------------------------------------
54!|| elbuftag_mod ../starter/share/modules1/elbuftag_mod.F
55!|| hm_option_read_mod ../starter/share/modules1/hm_option_read_mod.F
56!|| hm_read_eos_compaction2_mod ../starter/source/materials/eos/hm_read_eos_compaction2.F90
57!|| hm_read_eos_compaction_mod ../starter/source/materials/eos/hm_read_eos_compaction.F90
58!|| hm_read_eos_compaction_tab_mod ../starter/source/materials/eos/hm_read_eos_compaction_tab.F90
59!|| message_mod ../starter/share/message_module/message_mod.F
60!|| submodel_mod ../starter/share/modules1/submodel_mod.F
61!|| table_mod ../starter/share/modules1/table_mod.F
62!||====================================================================
63 SUBROUTINE hm_read_eos(
64 . MAT_PARAM ,IPM ,PM ,BUFMAT ,NUMMAT ,NFUNCT ,
65 . BUFLEN ,IADBUF ,EOS_TAG ,UNITAB ,LSUBMODEL,
66 . MLAW_TAG ,NPC ,TF ,SNPC ,NPTS ,SBUFMAT,
67 . NTABLE ,TABLE)
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--------------------------------------------------
314 END
#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(mat_param, ipm, pm, bufmat, nummat, nfunct, buflen, iadbuf, eos_tag, unitab, lsubmodel, mlaw_tag, npc, tf, snpc, npts, sbufmat, ntable, table)
Definition hm_read_eos.F:68
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