OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_eos_sesame.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_sesame ../starter/source/materials/eos/hm_read_eos_sesame.F
25!||--- called by ------------------------------------------------------
26!|| hm_read_eos ../starter/source/materials/eos/hm_read_eos.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.F
29!|| hm_get_floatv ../starter/source/devtools/hm_reader/hm_get_floatv.F
30!|| hm_get_string ../starter/source/devtools/hm_reader/hm_get_string.F
31!|| hm_option_is_encrypted ../starter/source/devtools/hm_reader/hm_option_is_encrypted.F
32!|| mrdse2 ../starter/source/materials/mat/mat026/mrdse2.F
33!|| tb2si1 ../starter/source/materials/eos/sesame_tools.F
34!|| tbusr1 ../starter/source/materials/eos/sesame_tools.F
35!||--- uses -----------------------------------------------------
36!|| message_mod ../starter/share/message_module/message_mod.F
37!|| submodel_mod ../starter/share/modules1/submodel_mod.F
38!||====================================================================
39 SUBROUTINE hm_read_eos_sesame(IOUT,PM,UNITAB,IUNIT,LSUBMODEL,IMIDEOS,IMID,TITR,BUFMAT,MFI,IDF)
40C-----------------------------------------------
41C M o d u l e s
42C-----------------------------------------------
43 USE unitab_mod
44 USE submodel_mod
45 USE message_mod
48C-----------------------------------------------
49C D e s c r i p t i o n
50C-----------------------------------------------
51C reading parameters for
52C NOBLE-ABEL EQUATION OF STATE
53C-----------------------------------------------
54C C o m m e n t s
55C-----------------------------------------------
56C RHOI = PM(89) -> provided by /MAT
57C RHOR = PM(01) -> provided by /MAT (can be erased by EOS if present : obsolete)
58C => MU0 = RHO/RHOR-1.
59C PM(31) = P(MU0,E0) -> will be used to initialize diagonal of stress tensor SIG(1:3,*)
60C-----------------------------------------------
61C I m p l i c i t T y p e s
62C-----------------------------------------------
63#include "implicit_f.inc"
64#include "param_c.inc"
65C-----------------------------------------------
66C D u m m y A r g u m e n t s
67C-----------------------------------------------
68 TYPE (UNIT_TYPE_),INTENT(IN) ::UNITAB
69 INTEGER IIN,IOUT,IUNIT
70 INTEGER,INTENT(INOUT) :: MFI, IDF
71 INTEGER,INTENT(IN) :: IMID
72 my_real pm(npropm),bufmat(*)
73 TYPE(submodel_data), DIMENSION(NSUBMOD), INTENT(IN) :: LSUBMODEL
74 INTEGER,INTENT(IN) :: IMIDEOS
75C-----------------------------------------------
76C C o m m o n B l o c k s
77C-----------------------------------------------
78C-----------------------------------------------
79C L o c a l V a r i a b l e s
80C-----------------------------------------------
81 INTEGER NR, NT, IDR, IDT, IDP, IDE
82 my_real e0, rho0, rho0i, p0, t0, xnr, xnt, dpdr, rho
83 my_real dydz,rhoi,rhor
84 my_real mu0,df,ssp0,g0,dpdmu
85 CHARACTER FILE*(ncharline),FILE_TMP*(ncharline)
86 INTEGER :: FILE_LEN
87 LOGICAL :: IS_ENCRYPTED, IS_AVAILABLE, IS_AVAILABLE_RHO0
88 CHARACTER(LEN=NCHARTITLE) :: TITR
89C-----------------------------------------------
90C S o u r c e L i n e s
91C-----------------------------------------------
92 is_encrypted = .false.
93 is_available = .false.
94 is_available_rho0 = .false.
95
96 CALL hm_option_is_encrypted(is_encrypted)
97
98 CALL hm_get_floatv('MAT_EA', e0, is_available,lsubmodel,unitab)
99 CALL hm_get_floatv('SESAME_RHO', rho0, is_available_rho0,lsubmodel,unitab)
100 CALL hm_get_string('ISRTY',file, ncharline,is_available)
101
102 rhor = pm(1)
103 rhoi = pm(89)
104
105 IF(rho0 > zero) THEN
106 rhor = rho0
107 pm(1)= rho0
108 ELSE
109 rho0=rhor
110 ENDIF
111
112 pm(23) = e0
113C----------------
114C READ TABLE
115C----------------
116 file_len = len_trim(file)
117 file_tmp(1:file_len) = file(1:file_len)
118 file = infile_name(1:infile_name_len)//file_tmp(1:file_len)
119 file_len = file_len + infile_name_len
120 OPEN(unit=31,file=file(1:file_len),err=999,status='OLD',form='FORMATTED')
121 READ(31,*)
122 READ(31,'(2E15.0)')xnr,xnt
123 rewind(31)
124 nr = nint(xnr)
125 nt = nint(xnt)
126 pm(33)=nr
127 pm(34)=nt
128 pm(35)=idf
129 IF(pm(79) == zero)pm(79)=three100
130 idr = idf
131 idt = idr + nr
132 idp = idt + nt
133 ide = idp + nr * nt
134 idf = ide + nr * nt
135 mfi = mfi + idf - idr
136C
137 bufmat(idr:idf-1) = zero
138C
139 CALL mrdse2(bufmat(idr),nr,bufmat(idt),nt,bufmat(idp),bufmat(ide))
140 CLOSE(31)
141C
142 CALL tb2si1(bufmat(idr),bufmat(idp),bufmat(ide),nr,nt)
143 CALL tbusr1(bufmat(idr),bufmat(idp),bufmat(ide),nr,nt,unitab)
144C
145 rho = pm(89)
146
147 CALL mintp_re(bufmat(idr),nr,bufmat(idt),nt,bufmat(ide),rho,t0,e0/rho0,dydz)
148 CALL mintp_rt(bufmat(idr),nr,bufmat(idt),nt,bufmat(idp),rho,t0,p0,dpdr)
149C
150 WRITE(iout,1000)
151 IF(is_encrypted)THEN
152 WRITE(iout,'(5X,A,//)')'CONFIDENTIAL DATA'
153 ELSE
154 WRITE(iout,1500)e0,file,p0,t0
155 IF(is_available_rho0)WRITE(iout,1501)pm(1)
156 ENDIF
157
158 pm(31) = p0
159
160 !SSP0
161 IF(rhoi == zero)THEN
162 mu0 = zero ! error 683 already displayed
163 ELSE
164 IF(rhor /= zero)THEN
165 mu0 = rhoi/rhor-one
166 ELSE
167 mu0 = zero ! error 683 already displayed
168 ENDIF
169 ENDIF
170
171 IF(rhoi /= zero)THEN
172 df = rhor/rhoi
173 ELSE
174 df = zero
175 ENDIF
176
177 rho0i=pm(89)
178 ssp0 = zero
179 g0 = pm(22)
180 rhoi = pm(89)
181 dpdmu=rho0i*dpdr
182 dpdmu=max(zero,dpdmu)
183 IF(rhor > zero) ssp0 = sqrt((dpdmu + two_third*g0)/rhor)
184 pm(27)=ssp0
185
186 RETURN
187 999 CONTINUE
188 CALL ancmsg(msgid=19,msgtype=msgerror,anmode=aninfo,i1=imid,c1='EOS',c2='EOS',c3=titr,c4=file)
189 RETURN
190
191 1000 FORMAT(
192 & 5x,' SESAME TABLE EOS ',/,
193 & 5x,' ---------------- ',/)
194 1500 FORMAT(
195 & 5x,'INITIAL INTERNAL ENERGY PER UNIT VOLUME. =',1pg20.13/,
196 & 5x,'SESAME TABLE 301 . . . . . . . . . . . . =',a70/,
197 & 5x,'INITIAL PRESSURE . . . . . . . . . . . . =',1pg20.13/,
198 & 5x,'INITIAL TEMPERATURE. . . . . . . . . . . =',1pg20.13)
199 1501 FORMAT(
200 & 5x,'EOS REFERENCE DENSITY . . . . . . . . . .=',1pg20.13)
201C
202 RETURN
203 END
204
205
206
#define my_real
Definition cppsort.cpp:32
subroutine hm_get_floatv(name, rval, is_available, lsubmodel, unitab)
subroutine hm_get_string(name, sval, size, is_available)
subroutine hm_option_is_encrypted(is_encrypted)
subroutine hm_read_eos_sesame(iout, pm, unitab, iunit, lsubmodel, imideos, imid, titr, bufmat, mfi, idf)
#define max(a, b)
Definition macros.h:21
subroutine mintp_re(xx, nx, yy, ny, zz, x, y, z, dydz)
Definition mintp_re.F:34
subroutine mintp_rt(xx, nx, yy, ny, zz, x, y, z, dzdx)
Definition mintp_rt.F:35
subroutine mrdse2(rr, nr, tt, nt, pp, ee)
Definition mrdse2.F:31
integer infile_name_len
character(len=infile_char_len) infile_name
integer, parameter nchartitle
subroutine tbusr1(r, p, e, nr, nt, unitab)
subroutine tb2si1(dens, pres, ener, nr, nt)
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