-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.f90
executable file
·78 lines (66 loc) · 3.2 KB
/
init.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
!***********************************************************************
subroutine InitArrays
use param
use local_arrays
use local_aux, only: vorx, vory, vorz
use mpi_param, only: kstart,kend
use mpih, only: lvlhalo
use stat_arrays
use mls_local
use AuxiliaryRoutines
implicit none
integer :: j,k,kc,i
!Solution arrays, u,v,w, temperature, pressure
call AllocateReal3DArray(vx,1,n1,1,n2,kstart-lvlhalo,kend+lvlhalo)
call AllocateReal3DArray(vy,1,n1,1,n2,kstart-lvlhalo,kend+lvlhalo)
call AllocateReal3DArray(vz,1,n1,1,n2,kstart-lvlhalo,kend+lvlhalo)
call AllocateReal3DArray(temp,1,n1,1,n2,kstart-lvlhalo,kend+lvlhalo)
call AllocateReal3DArray(pr,1,n1,1,n2,kstart-lvlhalo,kend+lvlhalo)
! Phase-indicator, internal-solid treatment
allocate(VOFx(n1,n2,kstart-1:kend+1))
allocate(VOFy(n1,n2,kstart-1:kend+1))
allocate(VOFz(n1,n2,kstart-1:kend+1))
allocate(VOFp(n1,n2,kstart-1:kend+1))
call AllocateReal3DArray(d_UsolidT_dxj,1,n1,1,n2,kstart,kend)
call AllocateLogical3DArray(solid_mask,1,n1,1,n2,kstart,kend)
! Default values for single-phase
VOFx(:,:,:) = 1.
VOFy(:,:,:) = 1.
VOFz(:,:,:) = 1.
VOFp(:,:,:) = 1.
solid_mask(:,:,:) = .false.
! Auxilary fractional-step pseudo-pressure
call AllocateReal3DArray(dph,1,n1,1,n2+1, &
kstart-lvlhalo,kend+lvlhalo)
! Vorticity
call AllocateReal3DArray(vorx,1,n1,1,n2, &
kstart-lvlhalo,kend+lvlhalo)
call AllocateReal3DArray(vory,1,n1,1,n2, &
kstart-lvlhalo,kend+lvlhalo)
call AllocateReal3DArray(vorz,1,n1,1,n2, &
kstart-lvlhalo,kend+lvlhalo)
!HIT forcing
call AllocateReal3DArray(forcx,1,n1,1,n2,kstart-lvlhalo,kend+lvlhalo)
call AllocateReal3DArray(forcy,1,n1,1,n2,kstart-lvlhalo,kend+lvlhalo)
call AllocateReal3DArray(forcz,1,n1,1,n2,kstart-lvlhalo,kend+lvlhalo)
call AllocateReal3DArray(rhs,1,n1,1,n2,kstart,kend)
call AllocateReal3DArray(dq,1,n1,1,n2,kstart,kend)
call AllocateReal3DArray(qcap,1,n1,1,n2,kstart,kend)
call AllocateReal3DArray(htemp,1,n1,1,n2,kstart,kend)
call AllocateReal3DArray(ru1,1,n1,1,n2,kstart,kend)
call AllocateReal3DArray(ru2,1,n1,1,n2,kstart,kend)
call AllocateReal3DArray(ru3,1,n1,1,n2,kstart,kend)
call AllocateReal3DArray(rut,1,n1,1,n2,kstart,kend)
call AllocateReal3DArray(vx_me,1,n1,1,n2,kstart,kend)
call AllocateReal3DArray(vy_me,1,n1,1,n2,kstart,kend)
call AllocateReal3DArray(vz_me,1,n1,1,n2,kstart,kend)
call AllocateReal3DArray(pr_me,1,n1,1,n2,kstart,kend)
call AllocateReal3DArray(vx_rms,1,n1,1,n2,kstart,kend)
call AllocateReal3DArray(vy_rms,1,n1,1,n2,kstart,kend)
call AllocateReal3DArray(vz_rms,1,n1,1,n2,kstart,kend)
call AllocateReal3DArray(pr_rms,1,n1,1,n2,kstart,kend)
call AllocateReal3DArray(for_xc,1,n1,1,n2,kstart-lvlhalo,kend+lvlhalo)
call AllocateReal3DArray(for_yc,1,n1,1,n2,kstart-lvlhalo,kend+lvlhalo)
call AllocateReal3DArray(for_zc,1,n1,1,n2,kstart-lvlhalo,kend+lvlhalo)
call AllocateReal3DArray(for_temp,1,n1,1,n2,kstart-lvlhalo,kend+lvlhalo)
end