-
Notifications
You must be signed in to change notification settings - Fork 0
/
mprops.src
74 lines (74 loc) · 2.24 KB
/
mprops.src
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#include "zeus2d.def"
c=======================================================================
c//////////////////////////// FILE MPROPS \\\\\\\\\\\\\\\\\\\\\\\\\\\\
c
c PURPOSE: This file contains subroutines which compute the material
c properties needed in the radiation hydrodynamics. Each routine is
c independent, requires no common blocks (all data passed via
c arguments), and works on a vector whose starting and ending index
c are also input via arguments. The routines include:
c EOS - equation of state; computes gas pressure and derivative wrt e
c TEMP - computes material temperature and derivative wrt e
c PLANCK- computes the frequency integrated Planck function and
c derivative wrt temp
c ABSORP - computes absorption coefficient and derivative wrt temp
c SCATT - computes scattering coefficient
c-----------------------------------------------------------------------
c
subroutine eos(e,d,gam,istrt,iend,p,dpde)
implicit NONE
integer istrt,iend,i
REAL e(1),d(1),gam,p(1),dpde(1)
do 10 i=istrt,iend
p (i) = (gam-1.0)*e(i)
dpde(i) = gam-1.0
10 continue
return
end
c
subroutine temp(e,d,gam,istrt,iend,t,dtde)
implicit NONE
integer istrt,iend,i
REAL e(1),d(1),gam,t(1),mmw,gasc,dtde(1)
parameter(mmw=1.0)
parameter(gasc=8.625e7/mmw)
do 10 i=istrt,iend
t (i) = (gam-1.0)*e(i)/(d(i)*gasc)
dtde(i) = (gam-1.0) /(d(i)*gasc)
10 continue
return
end
c
subroutine planck(t,istrt,iend,b,db)
implicit NONE
integer istrt,iend,i
REAL t(1),b(1),sbc,db(1)
parameter(sbc=1.8044e-5)
do 10 i=istrt,iend
db(i) = sbc*t(i)**3
b(i) = db(i)*t(i)
db(i) = 4.0*db(i)
10 continue
return
end
c
subroutine absorp(t,d,istrt,iend,xe,dxe)
implicit NONE
integer istrt,iend,i
REAL t(1),d(1),xe(1),dxe(1)
do 10 i=istrt,iend
xe(i) = ABSORPTION
dxe(i) = D_ABSORPTION_DT
10 continue
return
end
c
subroutine scatt(t,d,istrt,iend,xe)
implicit NONE
integer istrt,iend,i
REAL t(1),d(1),xe(1)
do 10 i=istrt,iend
xe(i) = SCATTERING
10 continue
return
end