MFC
Exascale flow solver
Loading...
Searching...
No Matches
m_global_parameters.fpp.f90
Go to the documentation of this file.
1# 1 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
2!>
3!! @file
4!! @brief Contains module m_global_parameters
5
6# 1 "/home/runner/work/MFC/MFC/src/common/include/case.fpp" 1
7! This file exists so that Fypp can be run without generating case.fpp files for
8! each target. This is useful when generating documentation, for example. This
9! should also let MFC be built with CMake directly, without invoking mfc.sh.
10
11! For pre-process.
12# 8 "/home/runner/work/MFC/MFC/src/common/include/case.fpp"
13
14! For moving immersed boundaries in simulation
15# 12 "/home/runner/work/MFC/MFC/src/common/include/case.fpp"
16# 6 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp" 2
17
18!> @brief Global parameters for the post-process: domain geometry, equation of state, and output database settings
20
21#ifdef MFC_MPI
22 use mpi !< message passing interface (mpi) module
23#endif
24
27 use m_thermochem, only: species_names
29 ! Shared state: generated_decls, num_dims, num_vels, sys_size, eqn_idx, b_size, tensor_size, chemistry, elasticity, shear_*
31
32 implicit none
33
34 !> @name Logistics
35 !> @{
36 integer :: num_procs !< Number of processors
37 !> @}
38
39 ! Computational Domain Parameters
40
41 integer :: proc_rank !< Rank of the local processor
42 !> @name Number of cells in the x-, y- and z-coordinate directions
43 !> @{
44 integer :: m_root
45 !> @}
46
47 !> @name Max and min number of cells in a direction of each combination of x-,y-, and z-
49 integer(kind=8) :: nglobal !< Total number of cells in global domain
50
51 !> @name Cylindrical coordinates (either axisymmetric or full 3D)
52 !> @{
53 integer :: grid_geometry
54 !> @}
55
56 !> @name Global number of cells in each direction
57 !> @{
58 integer :: m_glb, n_glb, p_glb
59 !> @}
60
61 ! num_dims, num_vels: in m_global_parameters_common
62 !> @name Cell-boundary locations in the x-, y- and z-coordinate directions
63 !> @{
64 real(wp), allocatable, dimension(:) :: x_cb, x_root_cb, y_cb, z_cb
65 !> @}
66
67 !> @name Cell-center locations in the x-, y- and z-coordinate directions
68 !> @{
69 real(wp), allocatable, dimension(:) :: x_cc, x_root_cc, y_cc, z_cc
70 real(sp), allocatable, dimension(:) :: x_root_cc_s, x_cc_s
71 !> @}
72
73 !> Cell-width distributions in the x-, y- and z-coordinate directions
74 !> @{
75 real(wp), allocatable, dimension(:) :: dx, dy, dz
76 !> @}
77
78 integer :: buff_size !< Number of ghost cells for boundary condition storage
79 !> @name IO options for adaptive time-stepping
80 !> @{
81 logical :: cfl_dt
82 integer :: n_save
83 !> @}
84
85 ! NOTE: m_root, x_root_cb, x_root_cc = defragmented grid (1D only; equals m, x_cb, x_cc in serial)
86
87 !> @name Simulation Algorithm Parameters
88 !> @{
89 ! sys_size, elasticity, b_size, tensor_size, chemistry, eqn_idx: in m_global_parameters_common
90 !> @}
91
92 !> @name Annotations of the structure, i.e. the organization, of the state vectors
93 !> @{
94 type(qbmm_idx_info) :: qbmm_idx !< QBMM moment index mappings.
95 integer :: beta_idx !< Index of lagrange bubbles beta
96 !> @}
97
98 ! Cell Indices for the (local) interior points (O-m, O-n, 0-p). Stands for "InDices With BUFFer".
99 type(int_bounds_info) :: idwint(1:3)
100
101 ! Cell indices (InDices With BUFFer): includes buffer in simulation only
103 logical :: bc_io
104 !> @name Boundary conditions in the x-, y- and z-coordinate directions
105 !> @{
108 !> @}
109
110 ! shear_num, shear_indices, shear_BC_flip_num, shear_BC_flip_indices: in m_global_parameters_common
111 ! proc_coords, start_idx, mpiiofs, mpi_info_int: in m_global_parameters_common
112 type(int_bounds_info), dimension(3) :: nidx !< Neighbor index offsets per direction (#1290 decomposition)
113 integer, allocatable, dimension(:,:,:) :: neighbor_ranks !< MPI ranks of neighbors (#1290 decomposition)
114 type(ib_airfoil_parameters), allocatable, dimension(:) :: ib_airfoil !< Per-airfoil NACA parameters (unused in post_process)
115 !> Per-airfoil computed surface grids (unused in post_process)
116 type(ib_airfoil_grid), allocatable, dimension(:) :: ib_airfoil_grids
117
118#ifdef MFC_MPI
119 type(mpi_io_var), public :: mpi_io_data
123 real(wp), allocatable, dimension(:,:), public :: mpi_io_data_lg_bubbles
124#endif
125
126 ! fluid_pp, bub_pp: auto-generated in generated_decls.fpp
127 real(wp), allocatable, dimension(:) :: adv !< Advection variables
128 ! Formatted Database File(s) Structure Parameters
129
130 type(bounds_info) :: x_output, y_output, z_output !< Portion of domain to output for post-processing
131 type(int_bounds_info) :: x_output_idx, y_output_idx, z_output_idx !< Indices of domain to output for post-processing
132 !> @name Size of the ghost zone layer in the x-, y- and z-coordinate directions. The definition of the ghost zone layers is only
133 !! necessary when using the Silo database file format in multidimensions. These zones provide VisIt with the subdomain
134 !! connectivity information that it requires in order to produce smooth plots.
135 !> @{
137 !> @}
138
139 ! alpha_rho_wrt, mom_wrt, vel_wrt, flux_wrt, alpha_rho_e_wrt, alpha_wrt,
140 ! omega_wrt, chem_wrt_Y, schlieren_alpha: auto-generated in generated_decls.fpp
141 integer :: fd_number !< Finite-difference half-stencil size: MAX(1, fd_order/2)
143 !> @name Bubble modeling variables and parameters
144 !> @{
145 real(wp) :: eu
146 real(wp), dimension(:), allocatable :: weight, r0
147 real(wp) :: phi_vg, phi_gv, pe_c, tw, k_vl, k_gl
148 real(wp) :: gam_m
149 real(wp), dimension(:), allocatable :: pb0, mass_g0, mass_v0, pe_t, k_v, k_g
150 real(wp), dimension(:), allocatable :: re_trans_t, re_trans_c, im_trans_t, im_trans_c, omegan
152 real(wp) :: g
153 integer :: nmom
154 !> @}
155
156 real(wp) :: wall_time, wall_time_avg !< Wall time measurements
157
158contains
159
160 !> Assigns default values to user inputs prior to reading them in. This allows for an easier consistency check of these
161 !! parameters once they are read from the input file.
163
164 integer :: i !< Generic loop iterator
165
166 ! Shared defaults (case_dir, m/n/p, cyl_coord, cfl flags, model_eqns, elasticity, BC blocks,
167 ! recon/weno/muscl/num_fluids/igr/mhd/relativity under case-opt guard, Tait EOS, bubble flags,
168 ! IB flags, parallel I/O flags, fft_wrt)
169
171
172 ! Boundary conditions (bc_x/y/z are per-target declarations, not visible in common)
173 bc_x%beg = dflt_int; bc_x%end = dflt_int
174 bc_y%beg = dflt_int; bc_y%end = dflt_int
175 bc_z%beg = dflt_int; bc_z%end = dflt_int
176
177# 167 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
178# 168 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
179 bc_x%vb1 = 0._wp
180 bc_x%ve1 = 0._wp
181# 168 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
182 bc_x%vb2 = 0._wp
183 bc_x%ve2 = 0._wp
184# 168 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
185 bc_x%vb3 = 0._wp
186 bc_x%ve3 = 0._wp
187# 171 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
188# 167 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
189# 168 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
190 bc_y%vb1 = 0._wp
191 bc_y%ve1 = 0._wp
192# 168 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
193 bc_y%vb2 = 0._wp
194 bc_y%ve2 = 0._wp
195# 168 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
196 bc_y%vb3 = 0._wp
197 bc_y%ve3 = 0._wp
198# 171 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
199# 167 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
200# 168 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
201 bc_z%vb1 = 0._wp
202 bc_z%ve1 = 0._wp
203# 168 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
204 bc_z%vb2 = 0._wp
205 bc_z%ve2 = 0._wp
206# 168 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
207 bc_z%vb3 = 0._wp
208 bc_z%ve3 = 0._wp
209# 171 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
210# 172 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
211
212# 174 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
213 bc_x%isothermal_in = .false.
214 bc_x%isothermal_out = .false.
215 bc_x%Twall_in = dflt_real
216 bc_x%Twall_out = dflt_real
217# 174 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
218 bc_y%isothermal_in = .false.
219 bc_y%isothermal_out = .false.
220 bc_y%Twall_in = dflt_real
221 bc_y%Twall_out = dflt_real
222# 174 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
223 bc_z%isothermal_in = .false.
224 bc_z%isothermal_out = .false.
225 bc_z%Twall_in = dflt_real
226 bc_z%Twall_out = dflt_real
227# 179 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
228
230
231 ! Computational domain parameters (post-specific)
233
236
237 cfl_dt = .false.
241
242 ! Simulation algorithm parameters (post-specific)
243 mixture_err = .false.
244 alt_soundspeed = .false.
245
246 bc_io = .false.
248
249 chem_params%gamma_method = 1
250 chem_params%transport_model = 1
251
252 chem_params%reaction_substeps = 0
253 chem_params%adap_substeps = .false.
254 chem_params%reaction_substeps_max = 0
255
256 ! Fluids physical parameters (post-specific; G = dflt_real differs from pre/sim)
257 do i = 1, num_fluids_max
258 fluid_pp(i)%gamma = dflt_real
259 fluid_pp(i)%pi_inf = dflt_real
260 fluid_pp(i)%cv = 0._wp
261 fluid_pp(i)%qv = 0._wp
262 fluid_pp(i)%qvp = 0._wp
263 fluid_pp(i)%G = dflt_real
264 fluid_pp(i)%non_newtonian = .false.
265 fluid_pp(i)%K = dflt_real
266 fluid_pp(i)%nn = dflt_real
267 fluid_pp(i)%tau0 = 0._wp
268 fluid_pp(i)%hb_m = dflt_real
269 fluid_pp(i)%mu_min = dflt_real
270 fluid_pp(i)%mu_max = dflt_real
271 fluid_pp(i)%mu_bulk = dflt_real
272 end do
273
274 ! Subgrid bubble parameters (bub_pp struct + scalar companions; bub_pp%R0ref is set in common
275 ! via R0ref; the scalar companions are per-target manual declarations)
278 bub_pp%rho0ref = dflt_real; rho0ref = dflt_real
290 bub_pp%k_v = dflt_real
291 bub_pp%k_g = dflt_real
296
297 ! Formatted database file(s) structure parameters (post-specific)
298 format = dflt_int
299
301
302 alpha_rho_wrt = .false.
303 alpha_rho_e_wrt = .false.
304 rho_wrt = .false.
305 mom_wrt = .false.
306 vel_wrt = .false.
307 chem_wrt_y = .false.
308 chem_wrt_t = .false.
310 flux_wrt = .false.
311 e_wrt = .false.
312 pres_wrt = .false.
313 alpha_wrt = .false.
314 gamma_wrt = .false.
315 heat_ratio_wrt = .false.
316 pi_inf_wrt = .false.
317 pres_inf_wrt = .false.
318 prim_vars_wrt = .false.
319 cons_vars_wrt = .false.
320 c_wrt = .false.
321 omega_wrt = .false.
322 qm_wrt = .false.
323 liutex_wrt = .false.
324 schlieren_wrt = .false.
325 sim_data = .false.
326 cf_wrt = .false.
327 ib_state_wrt = .false.
328 lag_txt_wrt = .false.
329 lag_header = .true.
330 lag_db_wrt = .false.
331 lag_id_wrt = .true.
332 lag_pos_wrt = .true.
333 lag_pos_prev_wrt = .false.
334 lag_vel_wrt = .true.
335 lag_rad_wrt = .true.
336 lag_rvel_wrt = .false.
337 lag_r0_wrt = .false.
338 lag_rmax_wrt = .false.
339 lag_rmin_wrt = .false.
340 lag_dphidt_wrt = .false.
341 lag_pres_wrt = .false.
342 lag_mv_wrt = .false.
343 lag_mg_wrt = .false.
344 lag_betat_wrt = .false.
345 lag_betac_wrt = .false.
346
348
351
352 ! Bubble modeling (post-specific)
353 nb = dflt_int
355
356 ! Output partial domain (post-specific)
357 output_partial_domain = .false.
358 x_output%beg = dflt_real
359 x_output%end = dflt_real
360 y_output%beg = dflt_real
361 y_output%end = dflt_real
362 z_output%beg = dflt_real
363 z_output%end = dflt_real
364
366
367 !> Computation of parameters, allocation procedures, and/or any other tasks needed to properly setup the module
369
370 integer :: i, j, fac
371
372 ! Setting m_root equal to m in the case of a 1D serial simulation
373
374 if (n == 0) m_root = m_glb
375
376 ! Gamma/Pi_inf: force num_fluids=1 (post_process-specific side effect of the gamma-law model)
378
379 ! post_process sets nmom to 6 for qbmm before the shared eqn_idx setup
380 ! (guard matches the original site: inside the 5-equation branch)
381 if (model_eqns == model_eqns_5eq .and. qbmm) nmom = 6
382
383 ! Populate eqn_idx, sys_size, b_size, tensor_size, elasticity, shear_* (shared logic)
385
386 ! post-only: 6eq alf is a dummy (no void fraction in 6eq)
387 if (model_eqns == model_eqns_6eq) eqn_idx%alf = 1
388
389 ! post-only: set default indices for disabled fields (used by post-processing consumers)
391 if (.not. cont_damage) eqn_idx%damage = dflt_int
392 if (.not. hyper_cleaning) eqn_idx%psi = dflt_int
393 end if
394
395 ! post-only: species defaults when chemistry is off
396 if (.not. chemistry) then
397 eqn_idx%species%beg = 1
398 eqn_idx%species%end = 1
399 end if
400
401 ! Per-target (post_process): beta_idx for bubbles_lagrange (5eq only, after main eqn_idx setup)
403 beta_idx = sys_size + 1
405 end if
406
407 ! Per-target (post_process): qbmm_idx allocations and fills
408 if (model_eqns == model_eqns_5eq .and. bubbles_euler) then
409 allocate (qbmm_idx%rs(nb), qbmm_idx%vs(nb))
410 allocate (qbmm_idx%ps(nb), qbmm_idx%ms(nb))
411
412 if (qbmm) then
413 allocate (qbmm_idx%moms(nb, nmom))
414 do i = 1, nb
415 do j = 1, nmom
416 qbmm_idx%moms(i, j) = eqn_idx%bub%beg + (j - 1) + (i - 1)*nmom
417 end do
418 qbmm_idx%rs(i) = qbmm_idx%moms(i, 2)
419 qbmm_idx%vs(i) = qbmm_idx%moms(i, 3)
420 end do
421 else
422 do i = 1, nb
423 if (polytropic .neqv. .true.) then
424 fac = 4
425 else
426 fac = 2
427 end if
428
429 qbmm_idx%rs(i) = eqn_idx%bub%beg + (i - 1)*fac
430 qbmm_idx%vs(i) = qbmm_idx%rs(i) + 1
431
432 if (polytropic .neqv. .true.) then
433 qbmm_idx%ps(i) = qbmm_idx%vs(i) + 1
434 qbmm_idx%ms(i) = qbmm_idx%ps(i) + 1
435 end if
436 end do
437 end if
438 end if
439
440 if (model_eqns == model_eqns_4eq .and. bubbles_euler) then
441 allocate (qbmm_idx%rs(nb), qbmm_idx%vs(nb))
442 allocate (qbmm_idx%ps(nb), qbmm_idx%ms(nb))
443 allocate (weight(nb), r0(nb))
444
445 do i = 1, nb
446 if (polytropic .neqv. .true.) then
447 fac = 4
448 else
449 fac = 2
450 end if
451
452 qbmm_idx%rs(i) = eqn_idx%bub%beg + (i - 1)*fac
453 qbmm_idx%vs(i) = qbmm_idx%rs(i) + 1
454
455 if (polytropic .neqv. .true.) then
456 qbmm_idx%ps(i) = qbmm_idx%vs(i) + 1
457 qbmm_idx%ms(i) = qbmm_idx%ps(i) + 1
458 end if
459 end do
460
461 if (nb == 1) then
462 weight(:) = 1._wp
463 r0(:) = 1._wp
464 else if (nb < 1) then
465 stop 'Invalid value of nb'
466 end if
467
468 if (polytropic) then
469 rhoref = 1._wp
470 pref = 1._wp
471 end if
472 end if
473
474 if (output_partial_domain) then
475 x_output_idx%beg = 0
476 x_output_idx%end = 0
477 y_output_idx%beg = 0
478 y_output_idx%end = 0
479 z_output_idx%beg = 0
480 z_output_idx%end = 0
481 end if
482
483#ifdef MFC_MPI
484 if (qbmm .and. .not. polytropic) then
485 allocate (mpi_io_data%view(1:sys_size + 2*nb*nnode))
486 allocate (mpi_io_data%var(1:sys_size + 2*nb*nnode))
487 else
488 allocate (mpi_io_data%view(1:sys_size))
489 allocate (mpi_io_data%var(1:sys_size))
490 end if
491
492 do i = 1, sys_size
493 if (down_sample) then
494 allocate (mpi_io_data%var(i)%sf(-1:m + 1,-1:n + 1,-1:p + 1))
495 else
496 allocate (mpi_io_data%var(i)%sf(0:m,0:n,0:p))
497 end if
498 mpi_io_data%var(i)%sf => null()
499 end do
500 if (qbmm .and. .not. polytropic) then
501 do i = sys_size + 1, sys_size + 2*nb*nnode
502 allocate (mpi_io_data%var(i)%sf(0:m,0:n,0:p))
503 mpi_io_data%var(i)%sf => null()
504 end do
505 end if
506
507 if (ib) allocate (mpi_io_ib_data%var%sf(0:m,0:n,0:p))
508#endif
509
510 ! Size of the ghost zone layer is non-zero only when post-processing the raw simulation data of a parallel multidimensional
511 ! computation in the Silo-HDF5 format. If this is the case, one must also verify whether the raw simulation data is 2D or
512 ! 3D. In the 2D case, size of the z-coordinate direction ghost zone layer must be zeroed out.
513 if (num_procs == 1 .or. format /= format_silo) then
514 offset_x%beg = 0
515 offset_x%end = 0
516 offset_y%beg = 0
517 offset_y%end = 0
518 offset_z%beg = 0
519 offset_z%end = 0
520 else if (n == 0) then
521 offset_y%beg = 0
522 offset_y%end = 0
523 offset_z%beg = 0
524 offset_z%end = 0
525 else if (p == 0) then
526 offset_z%beg = 0
527 offset_z%end = 0
528 end if
529
530 ! Determining the finite-difference number and the buffer size. Note that the size of the buffer is unrelated to the order
531 ! of the WENO scheme. Rather, it is directly dependent on maximum size of ghost zone layers and possibly the order of the
532 ! finite difference scheme used for the computation of vorticity and/or numerical Schlieren function.
533 buff_size = max(offset_x%beg, offset_x%end, offset_y%beg, offset_y%end, offset_z%beg, offset_z%end)
534
535 if (any(omega_wrt) .or. schlieren_wrt .or. qm_wrt .or. liutex_wrt) then
536 fd_number = max(1, fd_order/2)
538 end if
539
540 ! Configuring Coordinate Direction Indexes
541 idwint(1)%beg = 0; idwint(2)%beg = 0; idwint(3)%beg = 0
542 idwint(1)%end = m; idwint(2)%end = n; idwint(3)%end = p
543
544 idwbuff(1)%beg = -buff_size
545 if (num_dims > 1) then; idwbuff(2)%beg = -buff_size; else; idwbuff(2)%beg = 0; end if
546 if (num_dims > 2) then; idwbuff(3)%beg = -buff_size; else; idwbuff(3)%beg = 0; end if
547
548 idwbuff(1)%end = idwint(1)%end - idwbuff(1)%beg
549 idwbuff(2)%end = idwint(2)%end - idwbuff(2)%beg
550 idwbuff(3)%end = idwint(3)%end - idwbuff(3)%beg
551
552 ! Allocating single precision grid variables if needed
553 allocate (x_cc_s(-buff_size:m + buff_size))
554
555 ! Allocating the grid variables in the x-coordinate direction
556 allocate (x_cb(-1 - offset_x%beg:m + offset_x%end))
557 allocate (x_cc(-buff_size:m + buff_size))
558 allocate (dx(-buff_size:m + buff_size))
559
560 ! Allocating grid variables in the y- and z-coordinate directions
561 if (n > 0) then
562 allocate (y_cb(-1 - offset_y%beg:n + offset_y%end))
563 allocate (y_cc(-buff_size:n + buff_size))
564 allocate (dy(-buff_size:n + buff_size))
565
566 if (p > 0) then
567 allocate (z_cb(-1 - offset_z%beg:p + offset_z%end))
568 allocate (z_cc(-buff_size:p + buff_size))
569 allocate (dz(-buff_size:p + buff_size))
570 end if
571
572 ! Allocating the grid variables, only used for the 1D simulations, and containing the defragmented computational domain
573 ! grid data
574 else
575 allocate (x_root_cb(-1:m_root))
576 allocate (x_root_cc(0:m_root))
577
578 if (precision == precision_single) then
579 allocate (x_root_cc_s(0:m_root))
580 end if
581 end if
582
583 allocate (adv(num_fluids))
584
585 if (cyl_coord .neqv. .true.) then ! Cartesian grid
586 grid_geometry = 1
587 else if (cyl_coord .and. p == 0) then ! Axisymmetric cylindrical grid
588 grid_geometry = 2
589 else ! Fully 3D cylindrical grid
590 grid_geometry = 3
591 end if
592
594
595 !> Subroutine to initialize parallel infrastructure
600 end subroutine s_initialize_parallel_io
601
602 !> Deallocation procedures for the module
604
605 integer :: i
606
607 if (bubbles_euler) then
608 deallocate (qbmm_idx%rs, qbmm_idx%vs, qbmm_idx%ps, qbmm_idx%ms)
609 if (qbmm) deallocate (qbmm_idx%moms)
610 end if
611
612 ! Deallocating the grid variables for the x-coordinate direction
613 deallocate (x_cc, x_cb, dx)
614
615 ! Deallocating grid variables for the y- and z-coordinate directions
616 if (n > 0) then
617 deallocate (y_cc, y_cb, dy)
618 if (p > 0) then
619 deallocate (z_cc, z_cb, dz)
620 end if
621 else
622 ! Deallocating the grid variables, only used for the 1D simulations, and containing the defragmented computational
623 ! domain grid data
624 deallocate (x_root_cb, x_root_cc)
625 end if
626
627 ! Shared: deallocate proc_coords and start_idx
629
630 deallocate (adv)
631
632#ifdef MFC_MPI
633 if (parallel_io) then
634 do i = 1, sys_size
635 mpi_io_data%var(i)%sf => null()
636 end do
637
638 deallocate (mpi_io_data%var)
639 deallocate (mpi_io_data%view)
640 end if
641
642 if (ib) mpi_io_ib_data%var%sf => null()
643#endif
644
645 if (allocated(neighbor_ranks)) deallocate (neighbor_ranks)
646
648
649end module m_global_parameters
integer, intent(in) j
Compile-time constant parameters: default values, tolerances, and physical constants.
integer, parameter model_eqns_4eq
integer, parameter model_eqns_5eq
integer, parameter format_silo
integer, parameter dflt_int
Default integer value.
real(wp), parameter dflt_real
Default real value.
integer, parameter num_fluids_max
Maximum number of fluids in the simulation.
integer, parameter nnode
Number of QBMM nodes.
integer, parameter precision_single
integer, parameter model_eqns_6eq
integer, parameter model_eqns_gamma_law
Shared derived types for field data, patch geometry, bubble dynamics, and MPI I/O structures.
Shared global parameters and equation-index setup for all three executables. Each per-target m_global...
impure subroutine s_finalize_global_parameters_common
Shared finalize core: deallocate proc_coords and start_idx. Per-target finalize routines call this fi...
type(subgrid_bubble_physical_parameters) bub_pp
Subgrid bubble physical parameters.
integer sys_size
Number of unknowns in system of equations.
logical, dimension(num_fluids_max) alpha_rho_e_wrt
logical, dimension(num_species) chem_wrt_y
real(wp), dimension(num_fluids_max) schlieren_alpha
logical, dimension(num_fluids_max) alpha_wrt
type(physical_parameters), dimension(num_fluids_max) fluid_pp
Per-fluid stiffened-gas EOS parameters, Reynolds numbers, and shear modulus.
integer num_dims
Number of spatial dimensions.
logical, dimension(num_fluids_max) alpha_rho_wrt
type(eqn_idx_info) eqn_idx
All conserved-variable equation index ranges and scalars.
impure subroutine s_initialize_eqn_idx(nmom_in, nb_in)
Initialize equation-index state (eqn_idx, sys_size, b_size, tensor_size) from the namelist parameters...
impure subroutine s_initialize_parallel_io_common
Configure MPI parallel I/O settings and allocate processor coordinate arrays. Shared across all three...
impure subroutine s_assign_common_defaults
Assign default values to the user-input parameters that are shared across all three executables (pre_...
Global parameters for the post-process: domain geometry, equation of state, and output database setti...
real(sp), dimension(:), allocatable x_cc_s
type(mpi_io_levelset_norm_var), public mpi_io_levelsetnorm_data
impure subroutine s_assign_default_values_to_user_inputs
Assigns default values to user inputs prior to reading them in. This allows for an easier consistency...
impure subroutine s_finalize_global_parameters_module
Deallocation procedures for the module.
real(wp), dimension(:), allocatable im_trans_c
type(int_bounds_info), dimension(1:3) idwint
integer beta_idx
Index of lagrange bubbles beta.
type(int_bounds_info) offset_y
type(int_bounds_info), dimension(3) nidx
Neighbor index offsets per direction (#1290 decomposition).
real(wp), dimension(:), allocatable pb0
real(wp), dimension(:), allocatable im_trans_t
type(qbmm_idx_info) qbmm_idx
QBMM moment index mappings.
real(wp), dimension(:,:), allocatable, public mpi_io_data_lg_bubbles
real(wp), dimension(:), allocatable y_cc
integer proc_rank
Rank of the local processor.
real(wp), dimension(:), allocatable re_trans_t
real(wp), dimension(:), allocatable adv
Advection variables.
real(wp), dimension(:), allocatable x_root_cc
type(int_bounds_info) z_output_idx
Indices of domain to output for post-processing.
type(mpi_io_ib_var), public mpi_io_ib_data
real(wp), dimension(:), allocatable y_cb
real(wp), dimension(:), allocatable dz
real(wp), dimension(:), allocatable weight
real(wp), dimension(:), allocatable k_v
real(wp), dimension(:), allocatable x_root_cb
integer fd_number
Finite-difference half-stencil size: MAX(1, fd_order/2).
type(mpi_io_levelset_var), public mpi_io_levelset_data
type(int_bounds_info), dimension(1:3) idwbuff
integer buff_size
Number of ghost cells for boundary condition storage.
real(wp), dimension(:), allocatable z_cb
type(bounds_info) z_output
Portion of domain to output for post-processing.
type(ib_airfoil_parameters), dimension(:), allocatable ib_airfoil
Per-airfoil NACA parameters (unused in post_process).
integer, dimension(:,:,:), allocatable neighbor_ranks
MPI ranks of neighbors (#1290 decomposition).
real(wp), dimension(:), allocatable r0
type(int_bounds_info) x_output_idx
impure subroutine s_initialize_global_parameters_module
Computation of parameters, allocation procedures, and/or any other tasks needed to properly setup the...
real(wp), dimension(:), allocatable x_cc
real(wp), dimension(:), allocatable k_g
type(ib_airfoil_grid), dimension(:), allocatable ib_airfoil_grids
Per-airfoil computed surface grids (unused in post_process).
type(chemistry_parameters) chem_params
real(wp), dimension(:), allocatable x_cb
real(wp), dimension(:), allocatable dy
type(int_bounds_info) offset_x
real(wp), dimension(:), allocatable z_cc
integer num_procs
Number of processors.
type(int_bounds_info) y_output_idx
type(int_bounds_info) offset_z
type(cell_num_bounds) cells_bounds
real(wp), dimension(:), allocatable mass_g0
real(wp) wall_time_avg
Wall time measurements.
type(mpi_io_var), public mpi_io_data
impure subroutine s_initialize_parallel_io
Subroutine to initialize parallel infrastructure.
real(wp), dimension(:), allocatable omegan
real(wp), dimension(:), allocatable re_trans_c
real(sp), dimension(:), allocatable x_root_cc_s
real(wp), dimension(:), allocatable dx
Cell-width distributions in the x-, y- and z-coordinate directions.
real(wp), dimension(:), allocatable pe_t
real(wp), dimension(:), allocatable mass_v0
integer(kind=8) nglobal
Total number of cells in global domain.
Basic floating-point utilities: approximate equality, default detection, and coordinate bounds.
elemental subroutine, public s_update_cell_bounds(bounds, m, n, p)
Update the min and max number of cells in each set of axes.
Groups the x, y, z boundary condition begin/end codes for passing as a single argument.
Derived type adding beginning (beg) and end bounds info as attributes.
Max and min number of cells in a direction of each combination of x-,y-, and z-.
Computed surface grid for a NACA airfoil (simulation-only, not in namelist).
User-input parameters for a NACA 4-digit airfoil (namelist-safe: scalars only).
Integer bounds for variables.
QBMM moment index mappings - separate from bub beg/end so eqn_idx contains no allocatables.