From bdf370976230ce6e1982e21c6bfc0c12346f3fed Mon Sep 17 00:00:00 2001 From: Yanjun Zhang <120074479+ChrisZYJ@users.noreply.github.com> Date: Mon, 23 Dec 2024 22:38:27 -0800 Subject: [PATCH] output_partial_domain for post-processing (#768) Co-authored-by: Spencer Bryngelson --- docs/documentation/case.md | 8 ++ src/post_process/m_checker.fpp | 16 +++ src/post_process/m_data_output.fpp | 84 +++++++++++-- src/post_process/m_global_parameters.fpp | 23 ++++ src/post_process/m_mpi_proxy.fpp | 6 +- src/post_process/m_start_up.f90 | 153 ++++++----------------- toolchain/mfc/run/case_dicts.py | 4 + 7 files changed, 173 insertions(+), 121 deletions(-) diff --git a/docs/documentation/case.md b/docs/documentation/case.md index 037338ccc..5b3f54b20 100644 --- a/docs/documentation/case.md +++ b/docs/documentation/case.md @@ -522,6 +522,9 @@ To restart the simulation from $k$-th time step, see [Restarting Cases](running. | `probe_wrt` | Logical | Write the flow chosen probes data files for each time step | | `num_probes` | Integer | Number of probes | | `probe(i)%[x,y,z]` | Real | Coordinates of probe $i$ | +| `output_partial_domain` | Logical | Output part of the domain | +| `[x,y,z]_output%beg` | Real | Beginning of the output domain in the [x,y,z]-direction | +| `[x,y,z]_output%end` | Real | End of the output domain in the [x,y,z]-direction | The table lists formatted database output parameters. The parameters define variables that are outputted from simulation and file types and formats of data as well as options for post-processing. @@ -549,6 +552,11 @@ If `file_per_process` is true, then pre_process, simulation, and post_process mu - `probe_wrt` activates the output of state variables at coordinates specified by `probe(i)%[x;y,z]`. +- `output_partial_domain` activates the output of part of the domain specified by `[x,y,z]_output%beg` and `[x,y,z]_output%end`. +This is useful for large domains where only a portion of the domain is of interest. +It is not supported when `precision = 1` and `format = 1`. +It also cannot be enabled with `flux_wrt`, `heat_ratio_wrt`, `pres_inf_wrt`, `c_wrt`, `omega_wrt`, `ib`, `schlieren_wrt`, or `qm_wrt`. + ### 8. Acoustic Source {#acoustic-source} | Parameter | Type | Description | diff --git a/src/post_process/m_checker.fpp b/src/post_process/m_checker.fpp index 817e2ce00..2e587eea1 100644 --- a/src/post_process/m_checker.fpp +++ b/src/post_process/m_checker.fpp @@ -26,6 +26,7 @@ contains subroutine s_check_inputs call s_check_inputs_output_format + call s_check_inputs_partial_domain call s_check_inputs_partial_density call s_check_inputs_velocity call s_check_inputs_flux_limiter @@ -43,6 +44,21 @@ contains @:PROHIBIT(precision /= 1 .and. precision /= 2) end subroutine s_check_inputs_output_format + !> Checks constraints on partial domain parameters + subroutine s_check_inputs_partial_domain + @:PROHIBIT(output_partial_domain .and. format == 1) + @:PROHIBIT(output_partial_domain .and. precision == 1) + @:PROHIBIT(output_partial_domain .and. any([flux_wrt, heat_ratio_wrt, pres_inf_wrt, c_wrt, schlieren_wrt, qm_wrt, ib, any(omega_wrt)])) + + @:PROHIBIT(output_partial_domain .and. (f_is_default(x_output%beg) .or. f_is_default(x_output%end))) + @:PROHIBIT(output_partial_domain .and. n /= 0 .and. (f_is_default(y_output%beg) .or. f_is_default(y_output%end))) + @:PROHIBIT(output_partial_domain .and. p /= 0 .and. (f_is_default(z_output%beg) .or. f_is_default(z_output%end))) + + #:for X in ['x', 'y', 'z'] + @:PROHIBIT(${X}$_output%beg > ${X}$_output%end) + #:endfor + end subroutine s_check_inputs_partial_domain + !> Checks constraints on partial density parameters subroutine s_check_inputs_partial_density character(len=5) :: iStr diff --git a/src/post_process/m_data_output.fpp b/src/post_process/m_data_output.fpp index 98e3e03c6..a2813c7d6 100644 --- a/src/post_process/m_data_output.fpp +++ b/src/post_process/m_data_output.fpp @@ -28,6 +28,7 @@ module m_data_output implicit none private; public :: s_initialize_data_output_module, & + s_define_output_region, & s_open_formatted_database_file, & s_open_intf_data_file, & s_open_energy_data_file, & @@ -365,6 +366,9 @@ contains ! Pressure if (pres_wrt .or. prim_vars_wrt) dbvars = dbvars + 1 + ! Elastic stresses + if (hypoelasticity) dbvars = dbvars + (num_dims*(num_dims + 1))/2 + ! Volume fraction(s) if ((model_eqns == 2) .or. (model_eqns == 3)) then @@ -430,6 +434,42 @@ contains end subroutine s_initialize_data_output_module ! -------------------------- + subroutine s_define_output_region + + integer :: i + integer :: lower_bound, upper_bound + + #:for X, M in [('x', 'm'), ('y', 'n'), ('z', 'p')] + + if (${M}$ == 0) return ! Early return for y or z if simulation is 1D or 2D + + lower_bound = -offset_${X}$%beg + upper_bound = ${M}$+offset_${X}$%end + + do i = lower_bound, upper_bound + if (${X}$_cc(i) > ${X}$_output%beg) then + ${X}$_output_idx%beg = i + offset_${X}$%beg + exit + end if + end do + + do i = upper_bound, lower_bound, -1 + if (${X}$_cc(i) < ${X}$_output%end) then + ${X}$_output_idx%end = i + offset_${X}$%beg + exit + end if + end do + + ! If no grid points are within the output region + if ((${X}$_cc(lower_bound) > ${X}$_output%end) .or. (${X}$_cc(upper_bound) < ${X}$_output%beg)) then + ${X}$_output_idx%beg = 0 + ${X}$_output_idx%end = 0 + end if + + #:endfor + + end subroutine s_define_output_region + subroutine s_open_formatted_database_file(t_step) ! -------------------- ! Description: This subroutine opens a new formatted database file, or ! replaces an old one, and readies it for the data storage @@ -520,7 +560,14 @@ contains ! file by describing in it the dimensionality of post-processed ! data as well as the total number of flow variable(s) that will ! eventually be stored in it - write (dbfile) m, n, p, dbvars + if (output_partial_domain) then + write (dbfile) x_output_idx%end - x_output_idx%beg, & + y_output_idx%end - y_output_idx%beg, & + z_output_idx%end - z_output_idx%beg, & + dbvars + else + write (dbfile) m, n, p, dbvars + end if ! Next, analogous steps to the ones above are carried out by the ! root process to create and setup the formatted database master @@ -539,7 +586,11 @@ contains '. Exiting ...') end if - write (dbroot) m_root, 0, 0, dbvars + if (output_partial_domain) then + write (dbroot) x_output_idx%end - x_output_idx%beg, 0, 0, dbvars + else + write (dbroot) m_root, 0, 0, dbvars + end if end if @@ -729,7 +780,13 @@ contains real(y_cb, sp), & real(z_cb, sp) else - write (dbfile) x_cb, y_cb, z_cb + if (output_partial_domain) then + write (dbfile) x_cb(x_output_idx%beg - 1:x_output_idx%end), & + y_cb(y_output_idx%beg - 1:y_output_idx%end), & + z_cb(z_output_idx%beg - 1:z_output_idx%end) + else + write (dbfile) x_cb, y_cb, z_cb + end if end if elseif (n > 0) then @@ -737,7 +794,12 @@ contains write (dbfile) real(x_cb, sp), & real(y_cb, sp) else - write (dbfile) x_cb, y_cb + if (output_partial_domain) then + write (dbfile) x_cb(x_output_idx%beg - 1:x_output_idx%end), & + y_cb(y_output_idx%beg - 1:y_output_idx%end) + else + write (dbfile) x_cb, y_cb + end if end if ! One-dimensional local grid data is written to the formatted @@ -746,9 +808,13 @@ contains else if (precision == 1) then - write (dbfile) real(x_cb, wp) + write (dbfile) real(x_cb, sp) else - write (dbfile) x_cb + if (output_partial_domain) then + write (dbfile) x_cb(x_output_idx%beg - 1:x_output_idx%end) + else + write (dbfile) x_cb + end if end if if (num_procs > 1) then @@ -761,7 +827,11 @@ contains if (precision == 1) then write (dbroot) real(x_root_cb, wp) else - write (dbroot) x_root_cb + if (output_partial_domain) then + write (dbroot) x_root_cb(x_output_idx%beg - 1:x_output_idx%end) + else + write (dbroot) x_root_cb + end if end if end if diff --git a/src/post_process/m_global_parameters.fpp b/src/post_process/m_global_parameters.fpp index 31a4660fa..c9f59b8e6 100644 --- a/src/post_process/m_global_parameters.fpp +++ b/src/post_process/m_global_parameters.fpp @@ -197,6 +197,11 @@ module m_global_parameters integer :: precision !< Floating point precision of the database file(s) + logical :: output_partial_domain !< Specify portion of domain to output for post-processing + + type(bounds_info) :: x_output, y_output, z_output !< Portion of domain to output for post-processing + type(int_bounds_info) :: x_output_idx, y_output_idx, z_output_idx !< Indices of domain to output for post-processing + !> @name Size of the ghost zone layer in the x-, y- and z-coordinate directions. !! The definition of the ghost zone layers is only necessary when using the !! Silo database file format in multidimensions. These zones provide VisIt @@ -432,6 +437,15 @@ contains ! IBM num_ibs = dflt_int + ! Output partial domain + output_partial_domain = .false. + x_output%beg = dflt_real + x_output%end = dflt_real + y_output%beg = dflt_real + y_output%end = dflt_real + z_output%beg = dflt_real + z_output%end = dflt_real + end subroutine s_assign_default_values_to_user_inputs !> Computation of parameters, allocation procedures, and/or @@ -692,6 +706,15 @@ contains species_idx%end = 1 end if + if (output_partial_domain) then + x_output_idx%beg = 0 + x_output_idx%end = 0 + y_output_idx%beg = 0 + y_output_idx%end = 0 + z_output_idx%beg = 0 + z_output_idx%end = 0 + end if + momxb = mom_idx%beg momxe = mom_idx%end advxb = adv_idx%beg diff --git a/src/post_process/m_mpi_proxy.fpp b/src/post_process/m_mpi_proxy.fpp index 6e972f49c..acbba5ca6 100644 --- a/src/post_process/m_mpi_proxy.fpp +++ b/src/post_process/m_mpi_proxy.fpp @@ -170,7 +170,7 @@ contains & 'prim_vars_wrt', 'c_wrt', 'qm_wrt','schlieren_wrt', 'bubbles_euler', 'qbmm', & & 'polytropic', 'polydisperse', 'file_per_process', 'relax', 'cf_wrt', & & 'adv_n', 'ib', 'cfl_adap_dt', 'cfl_const_dt', 'cfl_dt', & - & 'surface_tension', 'hyperelasticity', 'bubbles_lagrange', 'rkck_adap_dt'] + & 'surface_tension', 'hyperelasticity', 'bubbles_lagrange', 'rkck_adap_dt', 'output_partial_domain'] call MPI_BCAST(${VAR}$, 1, MPI_LOGICAL, 0, MPI_COMM_WORLD, ierr) #:endfor @@ -191,7 +191,9 @@ contains end do #:for VAR in [ 'pref', 'rhoref', 'R0ref', 'poly_sigma', 'Web', 'Ca', & - & 'Re_inv', 'sigma', 't_save', 't_stop' ] + & 'Re_inv', 'sigma', 't_save', 't_stop', & + & 'x_output%beg', 'x_output%end', 'y_output%beg', & + & 'y_output%end', 'z_output%beg', 'z_output%end' ] call MPI_BCAST(${VAR}$, 1, mpi_p, 0, MPI_COMM_WORLD, ierr) #:endfor call MPI_BCAST(schlieren_alpha(1), num_fluids_max, mpi_p, 0, MPI_COMM_WORLD, ierr) diff --git a/src/post_process/m_start_up.f90 b/src/post_process/m_start_up.f90 index d2b1d0b2c..897821120 100644 --- a/src/post_process/m_start_up.f90 +++ b/src/post_process/m_start_up.f90 @@ -70,6 +70,7 @@ subroutine s_read_input_file num_fluids, mpp_lim, & weno_order, bc_x, & bc_y, bc_z, fluid_pp, format, precision, & + output_partial_domain, x_output, y_output, z_output, & hypoelasticity, G, & chem_wrt_Y, chem_wrt_T, avg_state, & alpha_rho_wrt, rho_wrt, mom_wrt, vel_wrt, & @@ -198,6 +199,25 @@ subroutine s_save_data(t_step, varname, pres, c, H) integer :: i, j, k, l + integer :: x_beg, x_end, y_beg, y_end, z_beg, z_end + + if (output_partial_domain) then + call s_define_output_region + x_beg = -offset_x%beg + x_output_idx%beg + x_end = offset_x%end + x_output_idx%end + y_beg = -offset_y%beg + y_output_idx%beg + y_end = offset_y%end + y_output_idx%end + z_beg = -offset_z%beg + z_output_idx%beg + z_end = offset_z%end + z_output_idx%end + else + x_beg = -offset_x%beg + x_end = offset_x%end + m + y_beg = -offset_y%beg + y_end = offset_y%end + n + z_beg = -offset_z%beg + z_end = offset_z%end + p + end if + ! Opening a new formatted database file call s_open_formatted_database_file(t_step) @@ -239,11 +259,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) if ((model_eqns == 2) .or. (model_eqns == 3) .or. (model_eqns == 4)) then do i = 1, num_fluids if (alpha_rho_wrt(i) .or. (cons_vars_wrt .or. prim_vars_wrt)) then - - q_sf = q_cons_vf(i)%sf(-offset_x%beg:m + offset_x%end, & - -offset_y%beg:n + offset_y%end, & - -offset_z%beg:p + offset_z%end) - + q_sf = q_cons_vf(i)%sf(x_beg:x_end, y_beg:y_end, z_beg:z_end) if (model_eqns /= 4) then write (varname, '(A,I0)') 'alpha_rho', i else @@ -262,11 +278,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) if (rho_wrt & .or. & (model_eqns == 1 .and. (cons_vars_wrt .or. prim_vars_wrt))) then - - q_sf = rho_sf(-offset_x%beg:m + offset_x%end, & - -offset_y%beg:n + offset_y%end, & - -offset_z%beg:p + offset_z%end) - + q_sf = rho_sf(x_beg:x_end, y_beg:y_end, z_beg:z_end) write (varname, '(A)') 'rho' call s_write_variable_to_formatted_database_file(varname, t_step) @@ -278,12 +290,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) ! Adding the momentum to the formatted database file ------------------- do i = 1, E_idx - mom_idx%beg if (mom_wrt(i) .or. cons_vars_wrt) then - - q_sf = q_cons_vf(i + cont_idx%end)%sf( & - -offset_x%beg:m + offset_x%end, & - -offset_y%beg:n + offset_y%end, & - -offset_z%beg:p + offset_z%end) - + q_sf = q_cons_vf(i + cont_idx%end)%sf(x_beg:x_end, y_beg:y_end, z_beg:z_end) write (varname, '(A,I0)') 'mom', i call s_write_variable_to_formatted_database_file(varname, t_step) @@ -296,12 +303,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) ! Adding the velocity to the formatted database file ------------------- do i = 1, E_idx - mom_idx%beg if (vel_wrt(i) .or. prim_vars_wrt) then - - q_sf = q_prim_vf(i + cont_idx%end)%sf( & - -offset_x%beg:m + offset_x%end, & - -offset_y%beg:n + offset_y%end, & - -offset_z%beg:p + offset_z%end) - + q_sf = q_prim_vf(i + cont_idx%end)%sf(x_beg:x_end, y_beg:y_end, z_beg:z_end) write (varname, '(A,I0)') 'vel', i call s_write_variable_to_formatted_database_file(varname, t_step) @@ -315,10 +317,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) if (chemistry) then do i = 1, num_species if (chem_wrt_Y(i) .or. prim_vars_wrt) then - q_sf = q_prim_vf(chemxb + i - 1)%sf(-offset_x%beg:m + offset_x%end, & - -offset_y%beg:n + offset_y%end, & - -offset_z%beg:p + offset_z%end) - + q_sf = q_prim_vf(chemxb + i - 1)%sf(x_beg:x_end, y_beg:y_end, z_beg:z_end) write (varname, '(A,A)') 'Y_', trim(species_names(i)) call s_write_variable_to_formatted_database_file(varname, t_step) @@ -328,10 +327,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) end do if (chem_wrt_T) then - q_sf = q_T_sf%sf(-offset_x%beg:m + offset_x%end, & - -offset_y%beg:n + offset_y%end, & - -offset_z%beg:p + offset_z%end) - + q_sf = q_T_sf%sf(x_beg:x_end, y_beg:y_end, z_beg:z_end) write (varname, '(A)') 'T' call s_write_variable_to_formatted_database_file(varname, t_step) @@ -355,11 +351,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) ! Adding the energy to the formatted database file --------------------- if (E_wrt .or. cons_vars_wrt) then - - q_sf = q_cons_vf(E_idx)%sf(-offset_x%beg:m + offset_x%end, & - -offset_y%beg:n + offset_y%end, & - -offset_z%beg:p + offset_z%end) - + q_sf = q_cons_vf(E_idx)%sf(x_beg:x_end, y_beg:y_end, z_beg:z_end) write (varname, '(A)') 'E' call s_write_variable_to_formatted_database_file(varname, t_step) @@ -371,10 +363,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) if (elasticity) then do i = 1, stress_idx%end - stress_idx%beg + 1 if (prim_vars_wrt) then - q_sf = q_prim_vf(i - 1 + stress_idx%beg)%sf( & - -offset_x%beg:m + offset_x%end, & - -offset_y%beg:n + offset_y%end, & - -offset_z%beg:p + offset_z%end) + q_sf = q_prim_vf(i - 1 + stress_idx%beg)%sf(x_beg:x_end, y_beg:y_end, z_beg:z_end) write (varname, '(A,I0)') 'tau', i call s_write_variable_to_formatted_database_file(varname, t_step) end if @@ -384,10 +373,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) if (hyperelasticity) then do i = 1, xiend - xibeg + 1 if (prim_vars_wrt) then - q_sf = q_prim_vf(i - 1 + xibeg)%sf( & - -offset_x%beg:m + offset_x%end, & - -offset_y%beg:n + offset_y%end, & - -offset_z%beg:p + offset_z%end) + q_sf = q_prim_vf(i - 1 + xibeg)%sf(x_beg:x_end, y_beg:y_end, z_beg:z_end) write (varname, '(A,I0)') 'xi', i call s_write_variable_to_formatted_database_file(varname, t_step) end if @@ -399,11 +385,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) ! Adding the pressure to the formatted database file ------------------- if (pres_wrt .or. prim_vars_wrt) then - - q_sf = q_prim_vf(E_idx)%sf(-offset_x%beg:m + offset_x%end, & - -offset_y%beg:n + offset_y%end, & - -offset_z%beg:p + offset_z%end) - + q_sf = q_prim_vf(E_idx)%sf(x_beg:x_end, y_beg:y_end, z_beg:z_end) write (varname, '(A)') 'pres' call s_write_variable_to_formatted_database_file(varname, t_step) @@ -419,12 +401,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) do i = 1, num_fluids - 1 if (alpha_wrt(i) .or. (cons_vars_wrt .or. prim_vars_wrt)) then - - q_sf = q_cons_vf(i + E_idx)%sf( & - -offset_x%beg:m + offset_x%end, & - -offset_y%beg:n + offset_y%end, & - -offset_z%beg:p + offset_z%end) - + q_sf = q_cons_vf(i + E_idx)%sf(x_beg:x_end, y_beg:y_end, z_beg:z_end) write (varname, '(A,I0)') 'alpha', i call s_write_variable_to_formatted_database_file(varname, t_step) @@ -436,12 +413,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) if (alpha_wrt(num_fluids) & .or. & (cons_vars_wrt .or. prim_vars_wrt)) then - - q_sf = q_cons_vf(adv_idx%end)%sf( & - -offset_x%beg:m + offset_x%end, & - -offset_y%beg:n + offset_y%end, & - -offset_z%beg:p + offset_z%end) - + q_sf = q_cons_vf(adv_idx%end)%sf(x_beg:x_end, y_beg:y_end, z_beg:z_end) write (varname, '(A,I0)') 'alpha', num_fluids call s_write_variable_to_formatted_database_file(varname, t_step) @@ -456,11 +428,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) if (gamma_wrt & .or. & (model_eqns == 1 .and. (cons_vars_wrt .or. prim_vars_wrt))) then - - q_sf = gamma_sf(-offset_x%beg:m + offset_x%end, & - -offset_y%beg:n + offset_y%end, & - -offset_z%beg:p + offset_z%end) - + q_sf = gamma_sf(x_beg:x_end, y_beg:y_end, z_beg:z_end) write (varname, '(A)') 'gamma' call s_write_variable_to_formatted_database_file(varname, t_step) @@ -486,11 +454,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) if (pi_inf_wrt & .or. & (model_eqns == 1 .and. (cons_vars_wrt .or. prim_vars_wrt))) then - - q_sf = pi_inf_sf(-offset_x%beg:m + offset_x%end, & - -offset_y%beg:n + offset_y%end, & - -offset_z%beg:p + offset_z%end) - + q_sf = pi_inf_sf(x_beg:x_end, y_beg:y_end, z_beg:z_end) write (varname, '(A)') 'pi_inf' call s_write_variable_to_formatted_database_file(varname, t_step) @@ -603,23 +567,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) ! Adding the color function to formatted database file if (cf_wrt) then - q_sf = q_cons_vf(c_idx)%sf( & - -offset_x%beg:m + offset_x%end, & - -offset_y%beg:n + offset_y%end, & - -offset_z%beg:p + offset_z%end) - - !do k = -offset_z%beg, p + offset_z%end - ! do j = -offset_y%beg, n + offset_y%end - ! do i = -offset_x%beg, m + offset_x%end - ! if (q_sf(i,j,k) > 0.5) then - ! q_sf(i,j,k) = 100000 + 8/0.15 - ! else - ! q_sf(i,j,k) = 100000 - ! end if - ! end do - ! end do - !end do - + q_sf = q_cons_vf(c_idx)%sf(x_beg:x_end, y_beg:y_end, z_beg:z_end) write (varname, '(A,I0)') 'color_function' call s_write_variable_to_formatted_database_file(varname, t_step) varname(:) = ' ' @@ -630,11 +578,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) ! Adding the volume fraction(s) to the formatted database file --------- if (bubbles_euler) then do i = adv_idx%beg, adv_idx%end - q_sf = q_cons_vf(i)%sf( & - -offset_x%beg:m + offset_x%end, & - -offset_y%beg:n + offset_y%end, & - -offset_z%beg:p + offset_z%end) - + q_sf = q_cons_vf(i)%sf(x_beg:x_end, y_beg:y_end, z_beg:z_end) write (varname, '(A,I0)') 'alpha', i - E_idx call s_write_variable_to_formatted_database_file(varname, t_step) varname(:) = ' ' @@ -645,10 +589,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) if (bubbles_euler) then !nR do i = 1, nb - q_sf = q_cons_vf(bub_idx%rs(i))%sf( & - -offset_x%beg:m + offset_x%end, & - -offset_y%beg:n + offset_y%end, & - -offset_z%beg:p + offset_z%end) + q_sf = q_cons_vf(bub_idx%rs(i))%sf(x_beg:x_end, y_beg:y_end, z_beg:z_end) write (varname, '(A,I3.3)') 'nR', i call s_write_variable_to_formatted_database_file(varname, t_step) varname(:) = ' ' @@ -656,10 +597,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) !nRdot do i = 1, nb - q_sf = q_cons_vf(bub_idx%vs(i))%sf( & - -offset_x%beg:m + offset_x%end, & - -offset_y%beg:n + offset_y%end, & - -offset_z%beg:p + offset_z%end) + q_sf = q_cons_vf(bub_idx%vs(i))%sf(x_beg:x_end, y_beg:y_end, z_beg:z_end) write (varname, '(A,I3.3)') 'nV', i call s_write_variable_to_formatted_database_file(varname, t_step) varname(:) = ' ' @@ -667,10 +605,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) if ((polytropic .neqv. .true.) .and. (.not. qbmm)) then !nP do i = 1, nb - q_sf = q_cons_vf(bub_idx%ps(i))%sf( & - -offset_x%beg:m + offset_x%end, & - -offset_y%beg:n + offset_y%end, & - -offset_z%beg:p + offset_z%end) + q_sf = q_cons_vf(bub_idx%ps(i))%sf(x_beg:x_end, y_beg:y_end, z_beg:z_end) write (varname, '(A,I3.3)') 'nP', i call s_write_variable_to_formatted_database_file(varname, t_step) varname(:) = ' ' @@ -678,10 +613,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) !nM do i = 1, nb - q_sf = q_cons_vf(bub_idx%ms(i))%sf( & - -offset_x%beg:m + offset_x%end, & - -offset_y%beg:n + offset_y%end, & - -offset_z%beg:p + offset_z%end) + q_sf = q_cons_vf(bub_idx%ms(i))%sf(x_beg:x_end, y_beg:y_end, z_beg:z_end) write (varname, '(A,I3.3)') 'nM', i call s_write_variable_to_formatted_database_file(varname, t_step) varname(:) = ' ' @@ -690,10 +622,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) ! number density if (adv_n) then - q_sf = q_cons_vf(n_idx)%sf( & - -offset_x%beg:m + offset_x%end, & - -offset_y%beg:n + offset_y%end, & - -offset_z%beg:p + offset_z%end) + q_sf = q_cons_vf(n_idx)%sf(x_beg:x_end, y_beg:y_end, z_beg:z_end) write (varname, '(A)') 'n' call s_write_variable_to_formatted_database_file(varname, t_step) varname(:) = ' ' diff --git a/toolchain/mfc/run/case_dicts.py b/toolchain/mfc/run/case_dicts.py index a8ec96a13..d037f39af 100644 --- a/toolchain/mfc/run/case_dicts.py +++ b/toolchain/mfc/run/case_dicts.py @@ -383,6 +383,7 @@ def analytic(self): 't_stop': ParamType.REAL, 'n_start': ParamType.INT, 'surface_tension': ParamType.LOG, + 'output_partial_domain': ParamType.LOG, 'bubbles_lagrange': ParamType.LOG, }) @@ -392,6 +393,9 @@ def analytic(self): POST_PROCESS[f'bc_{cmp}%beg'] = ParamType.INT POST_PROCESS[f'bc_{cmp}%end'] = ParamType.INT + POST_PROCESS[f'{cmp}_output%beg'] = ParamType.REAL + POST_PROCESS[f'{cmp}_output%end'] = ParamType.REAL + for real_attr in ["mom_wrt", "vel_wrt", "flux_wrt", "omega_wrt"]: POST_PROCESS[f'{real_attr}({cmp_id})'] = ParamType.LOG