40
41
42
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63#include "implicit_f.inc"
64#include "param_c.inc"
65
66
67
68 TYPE (UNIT_TYPE_),INTENT(IN) ::UNITAB
69 INTEGER IIN,IOUT,IUNIT
70 INTEGER,INTENT(INOUT) :: MFI, IDF
71 INTEGER,INTENT(IN) :: IMID
73 TYPE(SUBMODEL_DATA), DIMENSION(NSUBMOD), INTENT(IN) :: LSUBMODEL
74 INTEGER,INTENT(IN) :: IMIDEOS
75
76
77
78
79
80
81 INTEGER NR, NT, IDR, IDT, IDP, IDE
82 my_real e0, rho0, rho0i, p0, t0, xnr, xnt, dpdr, rho
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
89
90
91
92 is_encrypted = .false.
93 is_available = .false.
94 is_available_rho0 = .false.
95
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)
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
113
114
115
116 file_len = len_trim(file)
117 file_tmp(1:file_len) = file(1:file_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
136
137 bufmat(idr:idf-1) = zero
138
139 CALL mrdse2(bufmat(idr),nr,bufmat(idt),nt,bufmat(idp),bufmat(ide))
140 CLOSE(31)
141
142 CALL tb2si1(bufmat(idr),bufmat(idp),bufmat(ide),nr,nt)
143 CALL tbusr1(bufmat(idr),bufmat(idp),bufmat(ide),nr,nt,unitab)
144
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)
149
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
161 IF(rhoi == zero)THEN
162 mu0 = zero
163 ELSE
164 IF(rhor /= zero)THEN
165 mu0 = rhoi/rhor-one
166 ELSE
167 mu0 = zero
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)
201
202 RETURN
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 mintp_re(xx, nx, yy, ny, zz, x, y, z, dydz)
subroutine mintp_rt(xx, nx, yy, ny, zz, x, y, z, dzdx)
subroutine mrdse2(rr, nr, tt, nt, pp, ee)
character(len=infile_char_len) infile_name
integer, parameter nchartitle
integer, parameter ncharline
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)