Setup a component of SGS turbulence process.
108
109 implicit none
110 class(AtmosPhyTb), intent(inout) :: this
111 class(ModelMeshBase), target, intent(in) :: model_mesh
112 class(TIME_manager_component), intent(inout) :: tm_parent_comp
113
114 real(DP) :: TIME_DT = undef8
115 character(len=H_SHORT) :: TIME_DT_UNIT = 'SEC'
116
117 character(len=H_MID) :: TB_TYPE = 'SMAGORINSKY'
118
119 character(len=H_SHORT) :: PostGLFilter_Type = 'None'
120 character(len=H_SHORT) :: PostGLFilter_ConvFilterShape = 'GAUSSIAN'
121 integer :: PostGLFilter_Nnodeh1D_reconst = -1
122 real(RP) :: PostGLFilter_GaussinWidthFac = 1.5_rp
123 real(RP) :: PostModalFilter_ALPHA_h = 0.0_rp
124 real(RP) :: PostModalFilter_EtaC_h = 0.0_rp
125 integer :: PostModalFilter_ORDER_h = 16
126 real(RP) :: PostModalFilter_ALPHA_v = 0.0_rp
127 integer :: PostModalFilter_ORDER_v = 16
128
129 namelist /param_atmos_phy_tb/ &
130 time_dt, &
131 time_dt_unit, &
132 tb_type, &
133 postglfilter_type, &
134 postglfilter_nnodeh1d_reconst, &
135 postglfilter_gaussinwidthfac, &
136 postmodalfilter_alpha_h, &
137 postmodalfilter_etac_h, &
138 postmodalfilter_order_h, &
139 postmodalfilter_alpha_v, &
140 postmodalfilter_order_v
141
142
143 class(AtmosMesh), pointer :: atm_mesh
144 class(MeshBase), pointer :: ptr_mesh
145 real(DP) :: dtsec
146
147 integer :: ierr
148 class(ElementBase3D), pointer :: elem3D
149 type(HexahedralElement) :: elem3D_hex
150
151
152 if (.not. this%IsActivated()) return
153
154 log_newline
155 log_info("ATMOS_PHY_TB_setup",*) 'Setup'
156
157
158 rewind(io_fid_conf)
159 read(io_fid_conf,nml=param_atmos_phy_tb,iostat=ierr)
160 if( ierr < 0 ) then
161 log_info("ATMOS_PHY_TB_setup",*) 'Not found namelist. Default used.'
162 elseif( ierr > 0 ) then
163 log_error("ATMOS_PHY_TB_setup",*) 'Not appropriate names in namelist PARAM_ATMOS_PHY_TB. Check!'
164 call prc_abort
165 endif
166 log_nml(param_atmos_phy_tb)
167
168
169
170 call model_mesh%GetModelMesh( ptr_mesh )
171 select type(model_mesh)
173 atm_mesh => model_mesh
174 end select
175
176
177
178 call tm_parent_comp%Regist_process( 'ATMOS_PHY_TB', time_dt, time_dt_unit, &
179 this%tm_process_id )
180
181 dtsec = tm_parent_comp%process_list(this%tm_process_id)%dtsec
182
183
184 call this%vars%Init( model_mesh )
185
186
187 call this%tb_driver%Init( tb_type, dtsec, atm_mesh )
188
189
190 this%dyn_bnd => null()
191
192
193
194 select case( trim(postglfilter_type) )
195 case ('ConvolFilter', 'Reconstruction', 'Reconstruction2')
196 this%gFilter_flag = .true.
197 case ('None', 'ModalFilter')
198 this%gFilter_flag = .false.
199 case default
200 log_info("ATMOS_PHY_TB_setup",*) 'Not appropriate names of PostGLFilter_Type in namelist PARAM_ATMOS_PHY_TB. Check!'
201 call prc_abort
202 end select
203
204
205 if ( this%gFilter_flag ) then
206 if ( postglfilter_nnodeh1d_reconst < 0 ) then
207 elem3d=> atm_mesh%ptr_mesh%lcmesh_list(1)%refElem3D
208 postglfilter_nnodeh1d_reconst = elem3d%Nnode_h1D
209 end if
210 call this%gFilter_phy_tb%Init( postglfilter_type, &
211 postglfilter_convfiltershape, postglfilter_gaussinwidthfac, &
212 postglfilter_nnodeh1d_reconst, &
213 2, 0, 0, atm_mesh%ptr_mesh )
214 end if
215 if ( postmodalfilter_alpha_h > 0.0_rp .or. postmodalfilter_alpha_v > 0.0_rp ) then
216 this%modalFilter_flag = .true.
217 elem3d=> atm_mesh%ptr_mesh%lcmesh_list(1)%refElem3D
218 call elem3d_hex%Init( elem3d%PolyOrder_h, elem3d%PolyOrder_v, .false. )
219 call this%modalfilter_3D%Init( elem3d_hex, postmodalfilter_etac_h, postmodalfilter_alpha_h, postmodalfilter_order_h, 0.0_rp, postmodalfilter_alpha_v, postmodalfilter_order_v )
220 call elem3d_hex%Final()
221 else
222 this%modalFilter_flag = .false.
223 end if
224
225 return
module FElib / Element / hexahedron
Derived type to manage a computational mesh (base class)
Derived type representing a hexahedral element.