-
Notifications
You must be signed in to change notification settings - Fork 68
/
level_set_base.f90
129 lines (106 loc) · 4.73 KB
/
level_set_base.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
!!
!! Copyright (C) 2009-2013 Johns Hopkins University
!!
!! This file is part of lesgo.
!!
!! lesgo is free software: you can redistribute it and/or modify
!! it under the terms of the GNU General Public License as published by
!! the Free Software Foundation, either version 3 of the License, or
!! (at your option) any later version.
!!
!! lesgo is distributed in the hope that it will be useful,
!! but WITHOUT ANY WARRANTY; without even the implied warranty of
!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
!! GNU General Public License for more details.
!!
!! You should have received a copy of the GNU General Public License
!! along with lesgo. If not, see <http://www.gnu.org/licenses/>.
!!
module level_set_base
use types, only : rp => rprec
use types, only : rprec
use param, only : ld, ny, nz, dx, lbz
implicit none
save
public
private :: rp, ld, ny, nz, dx, lbz
!private
!public :: phi
!logical, parameter :: global_CD_calc = .true. ! Compute global CD based on inflow velocity
logical :: global_CA_calc = .false. ! Compute global CA based on inflow velocity
integer :: global_CA_nskip = 10 ! Number of time steps to skip between global CA writes
!logical, parameter :: vel_BC = .false.
logical :: vel_BC = .false. !--means we are forcing velocity for
! level set BC
! (default = .false.)
! logical, parameter :: use_log_profile = .false. ! (default = .false.)
! logical, parameter :: use_enforce_un = .false. ! (default = .false.)
! logical, parameter :: physBC = .true. ! (default = .true.)
! logical, parameter :: use_smooth_tau = .true. ! (default = .true.)
! logical, parameter :: use_extrap_tau_log = .false. ! (default = .false.)
! logical, parameter :: use_extrap_tau_simple = .true. ! (default = .true.)
! logical, parameter :: use_modify_dutdn = .false. !--only works w/interp_tau; not MPI compliant
! !--wont work w/extra_tau_log
! ! (default = .false.)
logical :: use_log_profile = .false. ! (default = .false.)
logical :: use_enforce_un = .false. ! (default = .false.)
logical :: physBC = .true. ! (default = .true.)
logical :: use_smooth_tau = .true. ! (default = .true.)
logical :: use_extrap_tau_log = .false. ! (default = .false.)
logical :: use_extrap_tau_simple = .true. ! (default = .true.)
logical :: use_modify_dutdn = .false. !--only works w/interp_tau; not MPI compliant
!--wont work w/extra_tau_log
! (default = .false.)
! ! Enables scale dependent Cs evaluations (not dynamic evaluation)
! ! Used when sgs_model=4 in param module
! logical, parameter :: lag_dyn_modify_beta = .true.
! Enables scale dependent Cs evaluations (not dynamic evaluation)
! Used when sgs_model=4 in param module
logical :: lag_dyn_modify_beta = .true.
! ! Configures the mode in which SOR smoothing is applied in the IB
! ! 'xy' may be safely used in most cases (must be used for MPI cases)
! ! '3d' not MPI compliant
! character (*), parameter :: smooth_mode = 'xy' !--'xy', '3d'
! Configures the mode in which SOR smoothing is applied in the IB
! 'xy' may be safely used in most cases (must be used for MPI cases)
! '3d' not MPI compliant
character(25) :: smooth_mode = 'xy' !--'xy', '3d'
!real (rp), parameter :: zo_level_set = 0.0001_rp !--nondimensional roughness length of surface
real (rp) :: zo_level_set = 0.0001_rp !--nondimensional roughness length of surface
logical :: phi_cutoff_is_set = .false.
logical :: phi_0_is_set = .false.
!real (rp) :: phi(ld, ny, lbz:nz)
real(rp), allocatable, dimension(:,:,:) :: phi
logical :: use_trees
#ifdef PPMPI
! Make sure all values (top and bottom) are less than Nz
integer :: nphitop = 3
integer :: nphibot = 2
integer :: nveltop = 1
integer :: nvelbot = 1
integer :: ntautop = 3
integer :: ntaubot = 2
integer :: nFMMtop = 1
integer :: nFMMbot = 1
#else
integer, parameter :: nphitop = 0
integer, parameter :: nphibot = 0
integer, parameter :: nveltop = 0
integer, parameter :: nvelbot = 0
integer, parameter :: ntautop = 0
integer, parameter :: ntaubot = 0
integer, parameter :: nFMMtop = 0
integer, parameter :: nFMMbot = 0
#endif
contains
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
subroutine level_set_base_init()
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
!
! This subroutine initializes all arrays defined in level_set_base
!
implicit none
allocate( phi( ld, ny, lbz:nz ) )
return
end subroutine level_set_base_init
end module level_set_base