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 !> @{
107 !> @}
108
109 ! shear_num, shear_indices, shear_BC_flip_num, shear_BC_flip_indices: in m_global_parameters_common
110 ! proc_coords, start_idx, mpiiofs, mpi_info_int: in m_global_parameters_common
111 type(ib_airfoil_parameters), allocatable, dimension(:) :: ib_airfoil !< Per-airfoil NACA parameters (unused in post_process)
112 !> Per-airfoil computed surface grids (unused in post_process)
113 type(ib_airfoil_grid), allocatable, dimension(:) :: ib_airfoil_grids
114
115#ifdef MFC_MPI
116 type(mpi_io_var), public :: mpi_io_data
120 real(wp), allocatable, dimension(:,:), public :: mpi_io_data_lg_bubbles
121#endif
122
123 ! fluid_pp, bub_pp: auto-generated in generated_decls.fpp
124 real(wp), allocatable, dimension(:) :: adv !< Advection variables
125 ! Formatted Database File(s) Structure Parameters
126
127 type(bounds_info) :: x_output, y_output, z_output !< Portion of domain to output for post-processing
128 type(int_bounds_info) :: x_output_idx, y_output_idx, z_output_idx !< Indices of domain to output for post-processing
129 !> @name Size of the ghost zone layer in the x-, y- and z-coordinate directions. The definition of the ghost zone layers is only
130 !! necessary when using the Silo database file format in multidimensions. These zones provide VisIt with the subdomain
131 !! connectivity information that it requires in order to produce smooth plots.
132 !> @{
134 !> @}
135
136 ! alpha_rho_wrt, mom_wrt, vel_wrt, flux_wrt, alpha_rho_e_wrt, alpha_wrt,
137 ! omega_wrt, chem_wrt_Y, schlieren_alpha: auto-generated in generated_decls.fpp
138 integer :: fd_number !< Finite-difference half-stencil size: MAX(1, fd_order/2)
140 !> @name Bubble modeling variables and parameters
141 !> @{
142 real(wp) :: eu
143 real(wp), dimension(:), allocatable :: weight, r0
144 real(wp) :: phi_vg, phi_gv, pe_c, tw, k_vl, k_gl
145 real(wp) :: gam_m
146 real(wp), dimension(:), allocatable :: pb0, mass_g0, mass_v0, pe_t, k_v, k_g
147 real(wp), dimension(:), allocatable :: re_trans_t, re_trans_c, im_trans_t, im_trans_c, omegan
149 real(wp) :: g
150 integer :: nmom
151 !> @}
152
153 real(wp) :: wall_time, wall_time_avg !< Wall time measurements
154
155contains
156
157 !> Assigns default values to user inputs prior to reading them in. This allows for an easier consistency check of these
158 !! parameters once they are read from the input file.
160
161 integer :: i !< Generic loop iterator
162
163 ! Shared defaults (case_dir, m/n/p, cyl_coord, cfl flags, model_eqns, elasticity, BC blocks,
164 ! recon/weno/muscl/num_fluids/igr/mhd/relativity under case-opt guard, Tait EOS, bubble flags,
165 ! IB flags, parallel I/O flags, fft_wrt)
166
168
169 ! Boundary conditions (bc_x/y/z are per-target declarations, not visible in common)
170 bc_x%beg = dflt_int; bc_x%end = dflt_int
171 bc_y%beg = dflt_int; bc_y%end = dflt_int
172 bc_z%beg = dflt_int; bc_z%end = dflt_int
173
174# 164 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
175# 165 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
176 bc_x%vb1 = 0._wp
177 bc_x%ve1 = 0._wp
178# 165 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
179 bc_x%vb2 = 0._wp
180 bc_x%ve2 = 0._wp
181# 165 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
182 bc_x%vb3 = 0._wp
183 bc_x%ve3 = 0._wp
184# 168 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
185# 164 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
186# 165 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
187 bc_y%vb1 = 0._wp
188 bc_y%ve1 = 0._wp
189# 165 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
190 bc_y%vb2 = 0._wp
191 bc_y%ve2 = 0._wp
192# 165 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
193 bc_y%vb3 = 0._wp
194 bc_y%ve3 = 0._wp
195# 168 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
196# 164 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
197# 165 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
198 bc_z%vb1 = 0._wp
199 bc_z%ve1 = 0._wp
200# 165 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
201 bc_z%vb2 = 0._wp
202 bc_z%ve2 = 0._wp
203# 165 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
204 bc_z%vb3 = 0._wp
205 bc_z%ve3 = 0._wp
206# 168 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
207# 169 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
208
209# 171 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
210 bc_x%isothermal_in = .false.
211 bc_x%isothermal_out = .false.
212 bc_x%Twall_in = dflt_real
213 bc_x%Twall_out = dflt_real
214# 171 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
215 bc_y%isothermal_in = .false.
216 bc_y%isothermal_out = .false.
217 bc_y%Twall_in = dflt_real
218 bc_y%Twall_out = dflt_real
219# 171 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
220 bc_z%isothermal_in = .false.
221 bc_z%isothermal_out = .false.
222 bc_z%Twall_in = dflt_real
223 bc_z%Twall_out = dflt_real
224# 176 "/home/runner/work/MFC/MFC/src/post_process/m_global_parameters.fpp"
225
227
228 ! Computational domain parameters (post-specific)
230
233
234 cfl_dt = .false.
238
239 ! Simulation algorithm parameters (post-specific)
240 mixture_err = .false.
241 alt_soundspeed = .false.
242
243 bc_io = .false.
245
246 chem_params%gamma_method = 1
247 chem_params%transport_model = 1
248
249 ! Fluids physical parameters (post-specific; G = dflt_real differs from pre/sim)
250 do i = 1, num_fluids_max
251 fluid_pp(i)%gamma = dflt_real
252 fluid_pp(i)%pi_inf = dflt_real
253 fluid_pp(i)%cv = 0._wp
254 fluid_pp(i)%qv = 0._wp
255 fluid_pp(i)%qvp = 0._wp
256 fluid_pp(i)%G = dflt_real
257 fluid_pp(i)%non_newtonian = .false.
258 fluid_pp(i)%K = dflt_real
259 fluid_pp(i)%nn = dflt_real
260 fluid_pp(i)%tau0 = 0._wp
261 fluid_pp(i)%hb_m = dflt_real
262 fluid_pp(i)%mu_min = dflt_real
263 fluid_pp(i)%mu_max = dflt_real
264 fluid_pp(i)%mu_bulk = dflt_real
265 end do
266
267 ! Subgrid bubble parameters (bub_pp struct + scalar companions; bub_pp%R0ref is set in common
268 ! via R0ref; the scalar companions are per-target manual declarations)
271 bub_pp%rho0ref = dflt_real; rho0ref = dflt_real
283 bub_pp%k_v = dflt_real
284 bub_pp%k_g = dflt_real
289
290 ! Formatted database file(s) structure parameters (post-specific)
291 format = dflt_int
292
294
295 alpha_rho_wrt = .false.
296 alpha_rho_e_wrt = .false.
297 rho_wrt = .false.
298 mom_wrt = .false.
299 vel_wrt = .false.
300 chem_wrt_y = .false.
301 chem_wrt_t = .false.
303 flux_wrt = .false.
304 e_wrt = .false.
305 pres_wrt = .false.
306 alpha_wrt = .false.
307 gamma_wrt = .false.
308 heat_ratio_wrt = .false.
309 pi_inf_wrt = .false.
310 pres_inf_wrt = .false.
311 prim_vars_wrt = .false.
312 cons_vars_wrt = .false.
313 c_wrt = .false.
314 omega_wrt = .false.
315 qm_wrt = .false.
316 liutex_wrt = .false.
317 schlieren_wrt = .false.
318 sim_data = .false.
319 cf_wrt = .false.
320 ib_state_wrt = .false.
321 lag_txt_wrt = .false.
322 lag_header = .true.
323 lag_db_wrt = .false.
324 lag_id_wrt = .true.
325 lag_pos_wrt = .true.
326 lag_pos_prev_wrt = .false.
327 lag_vel_wrt = .true.
328 lag_rad_wrt = .true.
329 lag_rvel_wrt = .false.
330 lag_r0_wrt = .false.
331 lag_rmax_wrt = .false.
332 lag_rmin_wrt = .false.
333 lag_dphidt_wrt = .false.
334 lag_pres_wrt = .false.
335 lag_mv_wrt = .false.
336 lag_mg_wrt = .false.
337 lag_betat_wrt = .false.
338 lag_betac_wrt = .false.
339
341
344
345 ! Bubble modeling (post-specific)
346 nb = dflt_int
348
349 ! Output partial domain (post-specific)
350 output_partial_domain = .false.
351 x_output%beg = dflt_real
352 x_output%end = dflt_real
353 y_output%beg = dflt_real
354 y_output%end = dflt_real
355 z_output%beg = dflt_real
356 z_output%end = dflt_real
357
359
360 !> Computation of parameters, allocation procedures, and/or any other tasks needed to properly setup the module
362
363 integer :: i, j, fac
364
365 ! Setting m_root equal to m in the case of a 1D serial simulation
366
367 if (n == 0) m_root = m_glb
368
369 ! Gamma/Pi_inf: force num_fluids=1 (post_process-specific side effect of the gamma-law model)
371
372 ! post_process sets nmom to 6 for qbmm before the shared eqn_idx setup
373 ! (guard matches the original site: inside the 5-equation branch)
374 if (model_eqns == model_eqns_5eq .and. qbmm) nmom = 6
375
376 ! Populate eqn_idx, sys_size, b_size, tensor_size, elasticity, shear_* (shared logic)
378
379 ! post-only: 6eq alf is a dummy (no void fraction in 6eq)
380 if (model_eqns == model_eqns_6eq) eqn_idx%alf = 1
381
382 ! post-only: set default indices for disabled fields (used by post-processing consumers)
384 if (.not. cont_damage) eqn_idx%damage = dflt_int
385 if (.not. hyper_cleaning) eqn_idx%psi = dflt_int
386 end if
387
388 ! post-only: species defaults when chemistry is off
389 if (.not. chemistry) then
390 eqn_idx%species%beg = 1
391 eqn_idx%species%end = 1
392 end if
393
394 ! Per-target (post_process): beta_idx for bubbles_lagrange (5eq only, after main eqn_idx setup)
396 beta_idx = sys_size + 1
398 end if
399
400 ! Per-target (post_process): qbmm_idx allocations and fills
401 if (model_eqns == model_eqns_5eq .and. bubbles_euler) then
402 allocate (qbmm_idx%rs(nb), qbmm_idx%vs(nb))
403 allocate (qbmm_idx%ps(nb), qbmm_idx%ms(nb))
404
405 if (qbmm) then
406 allocate (qbmm_idx%moms(nb, nmom))
407 do i = 1, nb
408 do j = 1, nmom
409 qbmm_idx%moms(i, j) = eqn_idx%bub%beg + (j - 1) + (i - 1)*nmom
410 end do
411 qbmm_idx%rs(i) = qbmm_idx%moms(i, 2)
412 qbmm_idx%vs(i) = qbmm_idx%moms(i, 3)
413 end do
414 else
415 do i = 1, nb
416 if (polytropic .neqv. .true.) then
417 fac = 4
418 else
419 fac = 2
420 end if
421
422 qbmm_idx%rs(i) = eqn_idx%bub%beg + (i - 1)*fac
423 qbmm_idx%vs(i) = qbmm_idx%rs(i) + 1
424
425 if (polytropic .neqv. .true.) then
426 qbmm_idx%ps(i) = qbmm_idx%vs(i) + 1
427 qbmm_idx%ms(i) = qbmm_idx%ps(i) + 1
428 end if
429 end do
430 end if
431 end if
432
433 if (model_eqns == model_eqns_4eq .and. bubbles_euler) then
434 allocate (qbmm_idx%rs(nb), qbmm_idx%vs(nb))
435 allocate (qbmm_idx%ps(nb), qbmm_idx%ms(nb))
436 allocate (weight(nb), r0(nb))
437
438 do i = 1, nb
439 if (polytropic .neqv. .true.) then
440 fac = 4
441 else
442 fac = 2
443 end if
444
445 qbmm_idx%rs(i) = eqn_idx%bub%beg + (i - 1)*fac
446 qbmm_idx%vs(i) = qbmm_idx%rs(i) + 1
447
448 if (polytropic .neqv. .true.) then
449 qbmm_idx%ps(i) = qbmm_idx%vs(i) + 1
450 qbmm_idx%ms(i) = qbmm_idx%ps(i) + 1
451 end if
452 end do
453
454 if (nb == 1) then
455 weight(:) = 1._wp
456 r0(:) = 1._wp
457 else if (nb < 1) then
458 stop 'Invalid value of nb'
459 end if
460
461 if (polytropic) then
462 rhoref = 1._wp
463 pref = 1._wp
464 end if
465 end if
466
467 if (output_partial_domain) then
468 x_output_idx%beg = 0
469 x_output_idx%end = 0
470 y_output_idx%beg = 0
471 y_output_idx%end = 0
472 z_output_idx%beg = 0
473 z_output_idx%end = 0
474 end if
475
476#ifdef MFC_MPI
477 if (qbmm .and. .not. polytropic) then
478 allocate (mpi_io_data%view(1:sys_size + 2*nb*nnode))
479 allocate (mpi_io_data%var(1:sys_size + 2*nb*nnode))
480 else
481 allocate (mpi_io_data%view(1:sys_size))
482 allocate (mpi_io_data%var(1:sys_size))
483 end if
484
485 do i = 1, sys_size
486 if (down_sample) then
487 allocate (mpi_io_data%var(i)%sf(-1:m + 1,-1:n + 1,-1:p + 1))
488 else
489 allocate (mpi_io_data%var(i)%sf(0:m,0:n,0:p))
490 end if
491 mpi_io_data%var(i)%sf => null()
492 end do
493 if (qbmm .and. .not. polytropic) then
494 do i = sys_size + 1, sys_size + 2*nb*nnode
495 allocate (mpi_io_data%var(i)%sf(0:m,0:n,0:p))
496 mpi_io_data%var(i)%sf => null()
497 end do
498 end if
499
500 if (ib) allocate (mpi_io_ib_data%var%sf(0:m,0:n,0:p))
501#endif
502
503 ! Size of the ghost zone layer is non-zero only when post-processing the raw simulation data of a parallel multidimensional
504 ! computation in the Silo-HDF5 format. If this is the case, one must also verify whether the raw simulation data is 2D or
505 ! 3D. In the 2D case, size of the z-coordinate direction ghost zone layer must be zeroed out.
506 if (num_procs == 1 .or. format /= format_silo) then
507 offset_x%beg = 0
508 offset_x%end = 0
509 offset_y%beg = 0
510 offset_y%end = 0
511 offset_z%beg = 0
512 offset_z%end = 0
513 else if (n == 0) then
514 offset_y%beg = 0
515 offset_y%end = 0
516 offset_z%beg = 0
517 offset_z%end = 0
518 else if (p == 0) then
519 offset_z%beg = 0
520 offset_z%end = 0
521 end if
522
523 ! Determining the finite-difference number and the buffer size. Note that the size of the buffer is unrelated to the order
524 ! of the WENO scheme. Rather, it is directly dependent on maximum size of ghost zone layers and possibly the order of the
525 ! finite difference scheme used for the computation of vorticity and/or numerical Schlieren function.
526 buff_size = max(offset_x%beg, offset_x%end, offset_y%beg, offset_y%end, offset_z%beg, offset_z%end)
527
528 if (any(omega_wrt) .or. schlieren_wrt .or. qm_wrt .or. liutex_wrt) then
529 fd_number = max(1, fd_order/2)
531 end if
532
533 ! Configuring Coordinate Direction Indexes
534 idwint(1)%beg = 0; idwint(2)%beg = 0; idwint(3)%beg = 0
535 idwint(1)%end = m; idwint(2)%end = n; idwint(3)%end = p
536
537 idwbuff(1)%beg = -buff_size
538 if (num_dims > 1) then; idwbuff(2)%beg = -buff_size; else; idwbuff(2)%beg = 0; end if
539 if (num_dims > 2) then; idwbuff(3)%beg = -buff_size; else; idwbuff(3)%beg = 0; end if
540
541 idwbuff(1)%end = idwint(1)%end - idwbuff(1)%beg
542 idwbuff(2)%end = idwint(2)%end - idwbuff(2)%beg
543 idwbuff(3)%end = idwint(3)%end - idwbuff(3)%beg
544
545 ! Allocating single precision grid variables if needed
546 allocate (x_cc_s(-buff_size:m + buff_size))
547
548 ! Allocating the grid variables in the x-coordinate direction
549 allocate (x_cb(-1 - offset_x%beg:m + offset_x%end))
550 allocate (x_cc(-buff_size:m + buff_size))
551 allocate (dx(-buff_size:m + buff_size))
552
553 ! Allocating grid variables in the y- and z-coordinate directions
554 if (n > 0) then
555 allocate (y_cb(-1 - offset_y%beg:n + offset_y%end))
556 allocate (y_cc(-buff_size:n + buff_size))
557 allocate (dy(-buff_size:n + buff_size))
558
559 if (p > 0) then
560 allocate (z_cb(-1 - offset_z%beg:p + offset_z%end))
561 allocate (z_cc(-buff_size:p + buff_size))
562 allocate (dz(-buff_size:p + buff_size))
563 end if
564
565 ! Allocating the grid variables, only used for the 1D simulations, and containing the defragmented computational domain
566 ! grid data
567 else
568 allocate (x_root_cb(-1:m_root))
569 allocate (x_root_cc(0:m_root))
570
571 if (precision == precision_single) then
572 allocate (x_root_cc_s(0:m_root))
573 end if
574 end if
575
576 allocate (adv(num_fluids))
577
578 if (cyl_coord .neqv. .true.) then ! Cartesian grid
579 grid_geometry = 1
580 else if (cyl_coord .and. p == 0) then ! Axisymmetric cylindrical grid
581 grid_geometry = 2
582 else ! Fully 3D cylindrical grid
583 grid_geometry = 3
584 end if
585
587
588 !> Subroutine to initialize parallel infrastructure
593 end subroutine s_initialize_parallel_io
594
595 !> Deallocation procedures for the module
597
598 integer :: i
599
600 if (bubbles_euler) then
601 deallocate (qbmm_idx%rs, qbmm_idx%vs, qbmm_idx%ps, qbmm_idx%ms)
602 if (qbmm) deallocate (qbmm_idx%moms)
603 end if
604
605 ! Deallocating the grid variables for the x-coordinate direction
606 deallocate (x_cc, x_cb, dx)
607
608 ! Deallocating grid variables for the y- and z-coordinate directions
609 if (n > 0) then
610 deallocate (y_cc, y_cb, dy)
611 if (p > 0) then
612 deallocate (z_cc, z_cb, dz)
613 end if
614 else
615 ! Deallocating the grid variables, only used for the 1D simulations, and containing the defragmented computational
616 ! domain grid data
617 deallocate (x_root_cb, x_root_cc)
618 end if
619
620 ! Shared: deallocate proc_coords and start_idx
622
623 deallocate (adv)
624
625#ifdef MFC_MPI
626 if (parallel_io) then
627 do i = 1, sys_size
628 mpi_io_data%var(i)%sf => null()
629 end do
630
631 deallocate (mpi_io_data%var)
632 deallocate (mpi_io_data%view)
633 end if
634
635 if (ib) mpi_io_ib_data%var%sf => null()
636#endif
637
639
640end 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
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).
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)
Updates the min and max number of cells in each set of axes.
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.