-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheos.f
42 lines (36 loc) · 1.01 KB
/
eos.f
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
c -----------------------------------------
subroutine eos(den,pre,tem,is,ie,js,je)
c -----------------------------------------
C Equation of State
use common
implicit double precision(a-h,o-z)
double precision,dimension(:,:),intent(in) :: pre,tem
double precision,dimension(:,:),intent(out) :: den
integer :: is,ie,js,je
c den : Density
c pre : Pressure
c tem : Temperature
c Cs : Sound Velocity
c rmuj: Joule Thomson Coefficient
c gm : Ratio of Specific Heat
c rgc : Gas Constant
c Start of Editable Block -------------------------------------------
c Example: Ideal Gas Case
do j=js,je
do i=is,ie
den(i,j) = rmw*pre(i,j)/(tem(i,j)*rgc)
enddo
enddo
do j=js,je
do i=is,ie
Cs(i,j) = dsqrt(gm(i,j)*pre(i,j)/den(i,j))
enddo
enddo
do j=js,je
do i=is,ie
rmuj(i,j) = 0.d0
enddo
enddo
c End of Editable Block ---------------------------------------------
return
end subroutine eos