-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfield.f90
executable file
·63 lines (60 loc) · 1.36 KB
/
field.f90
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
module mod_field
use mod_var
implicit none
private
public updatefield
contains
!
subroutine updatefield(choose)
implicit none
integer i,j,k
integer, intent(in) :: choose
select case(choose)
case(0)
do k=-2,k1+2
do j=-2,j1+2
do i=-2,i1+2
rhol(i,j,k)= rho_1+(rho_3-rho_1)*PFM_phi(i,j,k)+(rho_2-rho_3)*Phi_c(i,j,k)
visl(i,j,k)= vis_1+(vis_3-vis_1)*PFM_phi(i,j,k)+(vis_2-vis_3)*Phi_c(i,j,k)
kk(i,j,k)= kk_1+(kk_3-kk_1)*PFM_phi(i,j,k)+(kk_2-kk_3)*Phi_c(i,j,k)
rholcp(i,j,k)=rho_1*cp_1+(rho_3*cp_3-rho_1*cp_1)*PFM_phi(i,j,k)+&
(rho_2*cp_2-rho_3*cp_3)*Phi_c(i,j,k)
enddo
enddo
enddo
case(1)
do k=-2,k1+2
do j=-2,j1+2
do i=-2,i1+2
rhol(i,j,k)= rho_1+(rho_3-rho_1)*PFM_phi(i,j,k)+(rho_2-rho_3)*Phi_c(i,j,k)
enddo
enddo
enddo
case(2)
do k=-2,k1+2
do j=-2,j1+2
do i=-2,i1+2
visl(i,j,k)= vis_1+(vis_3-vis_1)*PFM_phi(i,j,k)+(vis_2-vis_3)*Phi_c(i,j,k)
enddo
enddo
enddo
case(3)
do k=-2,k1+2
do j=-2,j1+2
do i=-2,i1+2
kk(i,j,k)= kk_1+(kk_3-kk_1)*PFM_phi(i,j,k)+(kk_2-kk_3)*Phi_c(i,j,k)
enddo
enddo
enddo
case(4)
do k=-2,k1+2
do j=-2,j1+2
do i=-2,i1+2
rholcp(i,j,k)=rho_1*cp_1+(rho_3*cp_3-rho_1*cp_1)*PFM_phi(i,j,k)+&
(rho_2*cp_2-rho_3*cp_3)*Phi_c(i,j,k)
enddo
enddo
enddo
end select
end subroutine updatefield
end module mod_field