diff --git a/.gitignore b/.gitignore index 8529e45a97..9e3a10fc5f 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ examples/*/binary examples/*/fort.1 examples/*/*.sh examples/*/*.err +*.mod diff --git a/CMakeLists.txt b/CMakeLists.txt index 416655c1c2..d3a014e85f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,9 +71,7 @@ list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/toolchain/cmake") # === Compiler Flags if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU") add_compile_options( - $<$:-fdefault-real-8> $<$:-ffree-line-length-none> - $<$:-fdefault-double-8> ) if (CMAKE_BUILD_TYPE STREQUAL "Debug") @@ -108,9 +106,7 @@ elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel") add_compile_options($<$:-free>) elseif ((CMAKE_Fortran_COMPILER_ID STREQUAL "NVHPC") OR (CMAKE_Fortran_COMPILER_ID STREQUAL "PGI")) add_compile_options( - $<$:-r8> $<$:-Mfreeform> - $<$:-Mr8intrinsics> $<$:-cpp> -Minfo=accel ) diff --git a/docs/documentation/case.md b/docs/documentation/case.md index 899e039a54..40400897a2 100644 --- a/docs/documentation/case.md +++ b/docs/documentation/case.md @@ -75,11 +75,8 @@ Definition of the parameters is described in the following subsections. | Parameter | Type | Description | | ---: | :----: | :--- | -| `case_dir` | String | Case script directory | | `run_time_info` | Logical | Output run-time information | -- `case_dir` specifies the directory where the python input file is located. - - `run_time_info` generates a text file that includes run-time information including the CFL number(s) at each time-step. ### 2. Computational Domain @@ -91,6 +88,7 @@ Definition of the parameters is described in the following subsections. | `a_x[y,z]` | Real | Rate at which the grid is stretched in the $x$[y,z]-direction | | `x[y,z]_a` | Real | Beginning of the stretching in the negative $x$[y,z]-direction | | `x[y,z]_b` | Real | Beginning of the stretching in the positive $x$[y,z]-direction | +| `loops_x[y,z]` | Integer | Number of times to recursively apply grid stretching | | `cyl_coord` | Logical | Cylindrical coordinates (2D: Axisymmetric, 3D: Cylindrical) | | `m` | Integer | Number of grid cells in the $x$-coordinate direction | | `n` | Integer | Number of grid cells in the $y$-coordinate direction | @@ -118,7 +116,8 @@ The grid is gradually stretched such that the domain boundaries are pushed away $$ x_{cb,stretch} = x_{cb} + \frac{x_{cb}}{a_x} \Bigg[ \mathrm{log}\left[\mathrm{cosh} \left( \frac{a_x(x_{cb}-x_a)}{L} \right) \right] + \mathrm{log}\left[\mathrm{cosh} \left( \frac{a_x(x_{cb}-x_b)}{L} \right) \right] -2 \mathrm{log}\left[\mathrm{cosh} \left( \frac{a_x(x_b-x_a)}{2L} \right) \right] \Bigg] $$ -where `x_cb` and `x_[cb,stretch]` are the coordinates of a cell boundary at the original and stretched domains, respectively. `L` is the domain length along the `x` axis: `L`=`x_domain%end`-`x_domain%beg`. Crudely speaking, `x_a` and `x_b` define the coordinates at which the grid begins to get stretched in the negative and positive directions along the $x$ axis, respectively. $a_x$ defines the smoothness of the stretching. Stretching along the $y$ and $z$ axes follows the same logistics. Optimal choice of the parameters for grid stretching is case-dependent and left to the user. +where `x_cb` and `x_[cb,stretch]` are the coordinates of a cell boundary at the original and stretched domains, respectively. `L` is the domain length along the `x` axis: `L`=`x_domain%end`-`x_domain%beg`. Crudely speaking, `x_a` and `x_b` define the coordinates at which the grid begins to get stretched in the negative and positive directions along the $x$ axis, respectively. $a_x$ defines the smoothness of the stretching. Stretching along the $y$ and $z$ axes follows the same logistics. Optimal choice of the parameters for grid stretching is case-dependent and left to the user. `loops_x[y,z]` defines the number of times +the grid stretching funciton is applied and has a default value of one. - `cyl_coord` activates cylindrical coordinates. The domain is defined in $x$-$y$-$z$ cylindrical coordinates, instead of Cartesian coordinates. Domain discritization is accordingly conducted along the axes of cylindrical coordinates. Wnen $p=0$, the domain is defined on $x$-$y$ axi-symmetric coordinates. In both Coordinates, mesh stretching can be defined along the $x$- and $y$-axes. MPI topology is automatically optimized to maximize the parallel efficiency for given choice of coordinate systems. @@ -203,24 +202,15 @@ Details of implementation of viscosity in MFC can be found in [Coralic (2015)](r | `adv_alphan` | Logical | Equations for all $N$ volume fractions (instead of $N-1$) | | `mpp_lim` | Logical | Mixture physical parameters limits | | `mixture_err` | Logical | Mixture properties correction | -| `time_stepper` | Integer | Runge--Kutta order [1--5] | -| `weno_vars` | Integer | WENO reconstruction on [1] Conservative; [2] Primitive variables | +| `time_stepper` | Integer | Runge--Kutta order [1--3] | | `weno_order` | Integer | WENO order [1,3,5] | | `weno_eps` | Real | WENO perturbation (avoid division by zero) | -| `char_decomp` | Logical | Characteristic decomposition | | `mapped_weno` | Logical | WENO with mapping of nonlinear weights | | `null_weights` | Logical | Null WENO weights at boundaries | | `mp_weno` | Logical | Monotonicity preserving WENO | | `riemann_solver` | Integer | Riemann solver algorithm: [1] HLL*; [2] HLLC; [3] Exact* | | `avg_state` | Integer | Averaged state evaluation method: [1] Roe averagen*; [2] Arithmetic mean | | `wave_speeds` | Integer | Wave-speed estimation: [1] Direct (Batten et al. 1997); [2] Pressure-velocity* (Toro 1999) | -| `commute_err` †* | Logical | Commutative error correction via cell-interior quadrature | -| `split_err` †* | Logical | Dimensional splitting error correction via cell-boundary | -| `reg_eps` * | Real | Interface thickness parameter for regularization terms | -| `flux_lim` * | Integer | Choice of flux limiter: [1] Minmod; [2] MC; [3] Ospre; [4] Superbee; [5] Sweby; [6] van Albada; [7] van Leer. | -| `tvd_rhs_flux` * | Logical | Apply TVD flux limiter to intercell fluxes outside Riemann solver | -| `tvd_riemann_flux` * | Logical | Apply TVD flux limiter to cell edges inside Riemann solver | -| `tvd_wave_speeds` * | Logical | TVD wave-speeds for flux computation inside Riemann solver | - \* Options that work only with `model_eqns` $=2$. - † Options that work only with `cyl_coord` $=$ `False`. @@ -252,16 +242,10 @@ where $\alpha_i$ is the void fraction of $i$-th component. When a single-compone - `time_stepper` specifies the order of the Runge-Kutta (RK) time integration scheme that is used for temporal integration in simulation, from the 1st to 5th order by corresponding integer. Note that `time_stepper` $=$ 3 specifies the total variation diminishing (TVD), third order RK scheme ([Gottlieb and Shu, 1998](references.md#Gottlieb98)). -- `weno_vars` specifies the choice of state variables that are reconstructed using a WENO scheme by an integer of 1 or 2. - -- `weno_vars` $=$ 1 and 2 correspond to conservative variables and primitive variables, respectively. - - `weno_order` specifies the order of WENO scheme that is used for spatial reconstruction of variables by an integer of 1, 3, and 5, that correspond to the 1st, 3rd, and 5th order, respectively. - `weno_eps` specifies the lower bound of the WENO nonlinear weights. Practically, `weno_eps` $<10^{-6}$ is used. -- `char_decomp` activates projection of the state variables onto characteristic fields prior to WENO reconstruction. - - `mapped_weno` activates mapping of the nonlinear WENO weights to the more accurate nonlinear weights in order to reinstate the optimal order of accuracy of the reconstruction in the proximity of critical points ([Henrick et al., 2005](references.md#Henrick05)). - `null_weights` activates nullification of the nonlinear WENO weights at the buffer regions outside the domain boundaries when the Riemann extrapolation boundary condition is specified (`bc_[x,y,z]\%beg[end]}` $=-4$). @@ -275,19 +259,6 @@ Note that `time_stepper` $=$ 3 specifies the total variation diminishing (TVD), - `wave_speeds` specifies the choice of the method to compute the left, right, and middle wave speeds in the Riemann solver by an integer of 1 and 2. `wave_speeds` $=$ 1 and 2 correspond to the direct method ([Batten et al., 1997](references.md#Batten97)), and indirect method that approximates the pressures and velocity ([Toro, 2013](references.md#Toro13)), respectively. -- `commute_err` activates WENO reconstruction of the cell-averaged variables at the cell-interior Gaussian quadrature points, following the two-point, fourth order Gaussian quadrature rule ([Titarev and Toro, 2004](references.md#Titarev04)). - -- `split_err` activates numerical approximation of the left or right cell-boundary integral-average of the given variables by getting the arithmetic mean of their WENO-reconstructed values at the cell-boundary Gaussian quadrature points, following the two-point, fourth order Gaussian quadrature rule ([Titarev and Toro, 2004](references.md#Titarev04)). When `commute_err` and `split_err` are set `True` and the 5th-order WENO is used, the global order of accuracy of the spatial integration of the governing equations becomes fourth order ([Coralic and Colonius, 2014](references.md#Coralic14)). - -- `reg_eps` specifies the magnitude of interface regularization for two-component flows that prevents diffusion of the phase interface ([Tiwari et al., 2013](references.md#Tiwari13)). The default value of `reg_eps` is unity. When `reg_eps` is undefined, interface regularization is not used. Details of implementation and assessment are addressed in [Meng (2016)](references.md#Meng16); [Schmidmayer et al. (2019)](references.md#Schmidmayer19). - -- `flux_lim` specifies the choice of flux limiter that is used in simulation by an integer from 1 through 7 as listed in table [Flux Limiters](#flux-limiters). When `flux_lim` is undefined, flux limiter is not applied. Details of the limiters and their implementations in MFC can be found in [Meng (2016)](references.md#Meng16). - -- `tvd_rhs_flux` activates a specified flux limiter to inte-rcell fluxes outside Riemann solver. - -- `tvd_riemann_flux` activate a specified flux limiter to cell edges inside the Riemann solver. `tvd_rhs_flux` and `tvd_riemann_flux` are mutually exclusive. - -- `tvd_wave_speeds` activates the use of the TVD wave speeds for flux computation inside the Riemann solver when `tvd_riemann_flux` is set `True`. ### 6. Formatted Output @@ -298,8 +269,7 @@ Note that `time_stepper` $=$ 3 specifies the total variation diminishing (TVD), | `parallel_io` | Logical | Parallel I/O | | `cons_vars_wrt` | Logical | Write conservative variables | | `prim_vars_wrt` | Logical | Write primitive variables | -| `fourier_decomp` | Logical | Apply a spatial Fourier decomposition to the output variables | -| `alpha_rho_wrt(i)` | Logical | Add the partial density of the fluid $i$ to the database | +| `alpha_rho_wrt(i)` | Logical | Add the partial density of the fluid $i$ to the database \| | `rho_wrt` | Logical | Add the mixture density to the database | | `mom_wrt(i)` | Logical | Add the $i$-direction momentum to the database | | `vel_wrt(i)` | Logical | Add the $i$-direction velocity to the database | @@ -319,8 +289,6 @@ Note that `time_stepper` $=$ 3 specifies the total variation diminishing (TVD), | `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$ | -| `com_wrt(i)` | Logical | Add the center of mass of fluid $i$ to the database | -| `cb_wrt(i)` | Logical | Add coherent body data of fluid $i$ to the database | 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. @@ -342,10 +310,6 @@ Parallel I/O enables the use of different number of processors in each of the pr - `probe_wrt` activates output of state variables at coordinates specified by `probe(i)%[x;y,z]`. -- `com_wrt(i)` activates output of the center of mass of $i$-th fluid component into the database. - -- `cb_wrt(i)` activates output of the coherent body mass of $i$-th fluid component in the domain into the database. - ### 7. Acoustic Source @@ -468,7 +432,7 @@ The table lists velocity field parameters. The parameters are optionally used to | -2 | Normal | Reflective | | -3 | Normal | Ghost cell extrapolation | | -4 | Normal | Riemann extrapolation | -| -5 | Normal | Slip wall | +| -5 | Characteristic | Slip wall | | -6 | Characteristic | Non-reflecting subsonic buffer | | -7 | Characteristic | Non-reflecting subsonic inflow | | -8 | Characteristic | Non-reflecting subsonic outflow | @@ -511,20 +475,6 @@ corresponds to the input value in `input.py` labeled `patch_icpp(j)%geometry` w $j$ is the patch index. Each patch requires a different set of parameters, which are also listed in this table. -### Flux limiters - -| # | Description | -| ---: | :---- | -| 1 | Minmod | -| 2 | MC | -| 3 | Ospre | -| 4 | Superbee | -| 5 | Sweby | -| 6 | van Albada | -| 7 | van Leer | - -The flux limiters supported by the MFC are listed in table [Flux Limiters](#flux-limiters). Each limiter can be specified by specifying the value of `flux_lim`. Details of their implementations can be found in [Meng (2016)](references.md#Meng16). - ### Monopole supports | # | Description | diff --git a/examples/0D_qbmm/case.py b/examples/0D_qbmm/case.py index dda0b2afca..b9ccb68e51 100644 --- a/examples/0D_qbmm/case.py +++ b/examples/0D_qbmm/case.py @@ -83,7 +83,6 @@ 'mpp_lim' : 'F', 'mixture_err' : 'F', 'time_stepper' : 1, - 'weno_vars' : 2, 'weno_order' : 3, 'weno_eps' : 1.E-16, 'mapped_weno' : 'T', diff --git a/examples/1D_bubblescreen/case.py b/examples/1D_bubblescreen/case.py index 666eb7d7ae..13f691a386 100755 --- a/examples/1D_bubblescreen/case.py +++ b/examples/1D_bubblescreen/case.py @@ -99,7 +99,6 @@ 'mpp_lim' : 'F', 'mixture_err' : 'F', 'time_stepper' : 3, - 'weno_vars' : 2, 'weno_order' : 5, 'weno_eps' : 1.E-16, 'mapped_weno' : 'T', diff --git a/examples/1D_exp_bubscreen/case.py b/examples/1D_exp_bubscreen/case.py index add995ac54..42778931fc 100755 --- a/examples/1D_exp_bubscreen/case.py +++ b/examples/1D_exp_bubscreen/case.py @@ -112,7 +112,6 @@ 'mpp_lim' : 'F', 'mixture_err' : 'F', 'time_stepper' : 3, - 'weno_vars' : 2, 'weno_order' : 5, 'weno_eps' : 1.E-16, 'mapped_weno' : 'T', diff --git a/examples/1D_hypo_2materials/case.py b/examples/1D_hypo_2materials/case.py index b9f7637b83..bcf5eb9b19 100755 --- a/examples/1D_hypo_2materials/case.py +++ b/examples/1D_hypo_2materials/case.py @@ -37,8 +37,7 @@ 'adv_alphan' : 'T', 'mpp_lim' : 'F', 'mixture_err' : 'F', - 'time_stepper' : 3, - 'weno_vars' : 2, + 'time_stepper' : 3, 'weno_order' : 3, 'weno_eps' : 1.E-16, 'mapped_weno' : 'F', diff --git a/examples/1D_impact/case.py b/examples/1D_impact/case.py index 42d1203c93..e05d996116 100755 --- a/examples/1D_impact/case.py +++ b/examples/1D_impact/case.py @@ -37,8 +37,7 @@ 'adv_alphan' : 'T', 'mpp_lim' : 'F', 'mixture_err' : 'F', - 'time_stepper' : 3, - 'weno_vars' : 2, + 'time_stepper' : 3, 'weno_order' : 3, 'weno_eps' : 1.E-16, 'mapped_weno' : 'F', diff --git a/examples/1D_kapilashocktube/case.py b/examples/1D_kapilashocktube/case.py index 1601eeb116..80432c3dbd 100755 --- a/examples/1D_kapilashocktube/case.py +++ b/examples/1D_kapilashocktube/case.py @@ -27,7 +27,6 @@ 'mpp_lim' : 'F', 'mixture_err' : 'F', 'time_stepper' : 3, - 'weno_vars' : 2, 'weno_order' : 5, 'weno_eps' : 1.E-16, 'mapped_weno' : 'T', diff --git a/examples/1D_poly_bubscreen/case.py b/examples/1D_poly_bubscreen/case.py index e7e39d05cc..901031d1aa 100644 --- a/examples/1D_poly_bubscreen/case.py +++ b/examples/1D_poly_bubscreen/case.py @@ -104,7 +104,6 @@ 'mpp_lim' : 'F', 'mixture_err' : 'F', 'time_stepper' : 1, - 'weno_vars' : 2, 'weno_order' : 1, 'weno_eps' : 1.E-16, 'mapped_weno' : 'F', diff --git a/examples/1D_qbmm/case.py b/examples/1D_qbmm/case.py index e763a7731d..7ff74f6abb 100644 --- a/examples/1D_qbmm/case.py +++ b/examples/1D_qbmm/case.py @@ -106,7 +106,6 @@ 'mpp_lim' : 'F', 'mixture_err' : 'F', 'time_stepper' : 3, - 'weno_vars' : 2, 'weno_order' : 5, 'weno_eps' : 1.E-16, 'mapped_weno' : 'T', diff --git a/examples/1D_sodHypo/case.py b/examples/1D_sodHypo/case.py index 4203ba8f55..d3f1c710d8 100755 --- a/examples/1D_sodHypo/case.py +++ b/examples/1D_sodHypo/case.py @@ -37,8 +37,7 @@ 'adv_alphan' : 'T', 'mpp_lim' : 'F', 'mixture_err' : 'F', - 'time_stepper' : 3, - 'weno_vars' : 2, + 'time_stepper' : 3, 'weno_order' : 5, 'weno_eps' : 1.E-16, 'mapped_weno' : 'F', diff --git a/examples/1D_sodshocktube/case.py b/examples/1D_sodshocktube/case.py index 985e86b7a4..bf706e1c8c 100755 --- a/examples/1D_sodshocktube/case.py +++ b/examples/1D_sodshocktube/case.py @@ -37,7 +37,6 @@ 'mpp_lim' : 'F', 'mixture_err' : 'F', 'time_stepper' : 3, - 'weno_vars' : 2, 'weno_order' : 5, 'weno_eps' : 1.E-16, 'mapped_weno' : 'T', diff --git a/examples/1D_vacuum/case.py b/examples/1D_vacuum/case.py index 7a5d724b9a..537dedd68a 100644 --- a/examples/1D_vacuum/case.py +++ b/examples/1D_vacuum/case.py @@ -29,7 +29,6 @@ 'mpp_lim' : 'T', 'mixture_err' : 'T', 'time_stepper' : 3, - 'weno_vars' : 2, 'weno_order' : 3, 'weno_eps' : 1.E-16, 'mapped_weno' : 'T', diff --git a/examples/1D_vacuum_restart/case.py b/examples/1D_vacuum_restart/case.py index 39a7fdbfcd..3e18e8fd99 100644 --- a/examples/1D_vacuum_restart/case.py +++ b/examples/1D_vacuum_restart/case.py @@ -29,7 +29,6 @@ 'mpp_lim' : 'T', 'mixture_err' : 'T', 'time_stepper' : 3, - 'weno_vars' : 2, 'weno_order' : 3, 'weno_eps' : 1.E-16, 'mapped_weno' : 'T', diff --git a/examples/1D_vacuum_restart/restart_case.py b/examples/1D_vacuum_restart/restart_case.py index ad4744619c..beafa28bb9 100644 --- a/examples/1D_vacuum_restart/restart_case.py +++ b/examples/1D_vacuum_restart/restart_case.py @@ -30,7 +30,6 @@ 'mpp_lim' : 'T', 'mixture_err' : 'T', 'time_stepper' : 3, - 'weno_vars' : 2, 'weno_order' : 3, 'weno_eps' : 1.E-16, 'mapped_weno' : 'T', diff --git a/examples/2D_5wave_quasi1D/case.py b/examples/2D_5wave_quasi1D/case.py index d9b507a10c..eba92cfcb8 100755 --- a/examples/2D_5wave_quasi1D/case.py +++ b/examples/2D_5wave_quasi1D/case.py @@ -42,8 +42,7 @@ 'adv_alphan' : 'T', 'mpp_lim' : 'F', 'mixture_err' : 'F', - 'time_stepper' : 3, - 'weno_vars' : 2, + 'time_stepper' : 3, 'weno_order' : 3, 'weno_eps' : 1.E-16, 'mapped_weno' : 'F', diff --git a/examples/2D_advection/case.py b/examples/2D_advection/case.py index 0e16ac20e1..a5dedd379b 100644 --- a/examples/2D_advection/case.py +++ b/examples/2D_advection/case.py @@ -31,7 +31,6 @@ 'mpp_lim' : 'T', 'mixture_err' : 'T', 'time_stepper' : 3, - 'weno_vars' : 2, 'weno_order' : 5, 'weno_eps' : 1.E-16, 'mapped_weno' : 'T', diff --git a/examples/2D_axisym_shockbubble/case.py b/examples/2D_axisym_shockbubble/case.py index 8e4c8d6703..0b68c8589d 100644 --- a/examples/2D_axisym_shockbubble/case.py +++ b/examples/2D_axisym_shockbubble/case.py @@ -54,7 +54,6 @@ 'mpp_lim' : 'T', 'mixture_err' : 'T', 'time_stepper' : 3, - 'weno_vars' : 2, 'weno_order' : 5, 'weno_eps' : 1.E-16, 'mapped_weno' : 'T', diff --git a/examples/2D_axisym_shockwatercavity/case.py b/examples/2D_axisym_shockwatercavity/case.py index fd376673c2..c6c5c50781 100644 --- a/examples/2D_axisym_shockwatercavity/case.py +++ b/examples/2D_axisym_shockwatercavity/case.py @@ -187,7 +187,6 @@ 'mpp_lim' : 'T', 'mixture_err' : 'T', 'time_stepper' : 3, - 'weno_vars' : 2, 'weno_order' : 3, 'weno_eps' : 1.0E-16, 'mapped_weno' : 'T', diff --git a/examples/2D_shearlayer/case.py b/examples/2D_shearlayer/case.py index 112cc54243..56862e59a8 100644 --- a/examples/2D_shearlayer/case.py +++ b/examples/2D_shearlayer/case.py @@ -32,7 +32,6 @@ 'mpp_lim' : 'T', 'mixture_err' : 'T', 'time_stepper' : 3, - 'weno_vars' : 2, 'weno_order' : 5, 'weno_eps' : 1.00000000000000E-16, 'mapped_weno' :'T', diff --git a/examples/2D_shockbubble/case.py b/examples/2D_shockbubble/case.py index 09b66fb06b..b31c10f37a 100644 --- a/examples/2D_shockbubble/case.py +++ b/examples/2D_shockbubble/case.py @@ -49,7 +49,6 @@ 'mpp_lim' : 'T', 'mixture_err' : 'T', 'time_stepper' : 3, - 'weno_vars' : 2, 'weno_order' : 5, 'weno_eps' : 1.E-16, 'mapped_weno' : 'T', diff --git a/examples/2D_shockdroplet/case.py b/examples/2D_shockdroplet/case.py index 0900e2f486..c2140e207e 100755 --- a/examples/2D_shockdroplet/case.py +++ b/examples/2D_shockdroplet/case.py @@ -53,7 +53,6 @@ 'mpp_lim' : 'T', 'mixture_err' : 'T', 'time_stepper' : 3, - 'weno_vars' : 2, 'weno_order' : 5, 'weno_eps' : 1.E-16, 'mapped_weno' : 'T', diff --git a/examples/2D_viscous/case.py b/examples/2D_viscous/case.py index 20d568684e..127d8a56f5 100644 --- a/examples/2D_viscous/case.py +++ b/examples/2D_viscous/case.py @@ -42,7 +42,6 @@ 'mpp_lim' : 'T', 'mixture_err' : 'T', 'time_stepper' : 3, - 'weno_vars' : 2, 'weno_order' : 5, 'weno_eps' : 1.E-16, 'mapped_weno' : 'T', diff --git a/examples/2D_whale_bubble_annulus/case.py b/examples/2D_whale_bubble_annulus/case.py index bb6e39f71e..798130a41d 100755 --- a/examples/2D_whale_bubble_annulus/case.py +++ b/examples/2D_whale_bubble_annulus/case.py @@ -91,7 +91,6 @@ 'adv_alphan' : 'T', 'mixture_err' : 'T', 'time_stepper' : 3, - 'weno_vars' : 2, 'weno_order' : 3, 'weno_eps' : 1.E-16, 'mapped_weno' : 'T', diff --git a/examples/3D_shockdroplet/case.py b/examples/3D_shockdroplet/case.py index 3578f0eb82..df4b7a70a2 100644 --- a/examples/3D_shockdroplet/case.py +++ b/examples/3D_shockdroplet/case.py @@ -203,7 +203,6 @@ 'mpp_lim' : 'T', 'mixture_err' : 'T', 'time_stepper' : 3, - 'weno_vars' : 2, 'weno_order' : 3, 'weno_eps' : 1.0E-16, 'mapped_weno' : 'T', diff --git a/examples/3D_sphbubcollapse/case.py b/examples/3D_sphbubcollapse/case.py index dcc5a2d84d..776121bdf0 100644 --- a/examples/3D_sphbubcollapse/case.py +++ b/examples/3D_sphbubcollapse/case.py @@ -63,9 +63,6 @@ 'mixture_err' : 'T', # Use TVD RK3 for time marching 'time_stepper' : 3, - # Reconstruct the primitive variables to minimize spurious - # oscillations - 'weno_vars' : 2, # Use WENO5 'weno_order' : 5, 'weno_eps' : 1.E-16, diff --git a/examples/3D_weak_scaling/case.py b/examples/3D_weak_scaling/case.py index 989ed8aff8..02d400cba9 100644 --- a/examples/3D_weak_scaling/case.py +++ b/examples/3D_weak_scaling/case.py @@ -199,7 +199,6 @@ 'mpp_lim' : 'T', 'mixture_err' : 'T', 'time_stepper' : 3, - 'weno_vars' : 2, 'weno_order' : 3, 'weno_eps' : 1.0E-16, 'mapped_weno' : 'T', diff --git a/src/post_process/m_checker.f90 b/src/post_process/m_checker.f90 index bac5eee695..773905898e 100644 --- a/src/post_process/m_checker.f90 +++ b/src/post_process/m_checker.f90 @@ -246,14 +246,6 @@ subroutine s_check_inputs() elseif (precision /= 1 .and. precision /= 2) then call s_mpi_abort('Unsupported choice for the value of '// & 'precision. Exiting ...') - - ! Constraints on the option to coarsen the formatted database files - elseif (coarsen_silo .and. format /= 1) then - call s_mpi_abort('Unsupported combination of values of format '// & - 'and coarsen_silo. Exiting ...') - elseif (coarsen_silo .and. n == 0) then - call s_mpi_abort('Unsupported combination of values of n '// & - 'and coarsen_silo. Exiting ...') end if ! Constraints on the post-processing of the partial densities diff --git a/src/post_process/m_data_output.f90 b/src/post_process/m_data_output.fpp similarity index 74% rename from src/post_process/m_data_output.f90 rename to src/post_process/m_data_output.fpp index e2f2c64c54..93e5619682 100644 --- a/src/post_process/m_data_output.f90 +++ b/src/post_process/m_data_output.fpp @@ -42,13 +42,12 @@ module m_data_output ! gather the flow variable(s) from all sub-domains on to the root process. ! If the run is not parallel, but serial, then q_root_sf is equal to q_sf. real(kind(0d0)), allocatable, dimension(:, :, :), public :: q_sf - real(kind(0d0)), allocatable, dimension(:, :, :), public :: dft_q_sf - real(kind(0d0)), allocatable, dimension(:, :, :) :: coarse_x_q_sf - real(kind(0d0)), allocatable, dimension(:, :, :) :: coarse_xy_q_sf - real(kind(0d0)), allocatable, dimension(:, :, :) :: coarse_xyz_q_sf real(kind(0d0)), allocatable, dimension(:, :, :) :: q_root_sf real(kind(0d0)), allocatable, dimension(:, :, :) :: cyl_q_sf - real(kind(0d0)), allocatable, dimension(:, :, :) :: cyl_coarse_q_sf + ! Single precision storage for flow variables + real(kind(0.0)), allocatable, dimension(:, :, :), public :: q_sf_s + real(kind(0.0)), allocatable, dimension(:, :, :) :: q_root_sf_s + real(kind(0.0)), allocatable, dimension(:, :, :) :: cyl_q_sf_s ! The spatial and data extents array variables contain information about the ! minimum and maximum values of the grid and flow variable(s), respectively. @@ -123,29 +122,28 @@ subroutine s_initialize_data_output_module() ! ---------------------------- -offset_y%beg:n + offset_y%end, & -offset_z%beg:p + offset_z%end)) if (grid_geometry == 3) then - if (coarsen_silo) then - allocate (cyl_coarse_q_sf(-offset_y%beg:(n/2) + offset_y%end, & - -offset_z%beg:(p/2) + offset_z%end, & - -offset_x%beg:(m/2) + offset_x%end)) - else allocate (cyl_q_sf(-offset_y%beg:n + offset_y%end, & -offset_z%beg:p + offset_z%end, & -offset_x%beg:m + offset_x%end)) - end if end if - if (coarsen_silo) then - allocate (coarse_x_q_sf(-offset_x%beg:(m/2) + offset_x%end, & - -offset_y%beg:n + offset_y%end, & - -offset_z%beg:p + offset_z%end)) - allocate (coarse_xy_q_sf(-offset_x%beg:(m/2) + offset_x%end, & - -offset_y%beg:(n/2) + offset_y%end, & - -offset_z%beg:p + offset_z%end)) - allocate (coarse_xyz_q_sf(-offset_x%beg:(m/2) + offset_x%end, & - -offset_y%beg:(n/2) + offset_y%end, & - -offset_z%beg:(p/2) + offset_z%end)) + + if (precision == 1) then + allocate (q_sf_s(-offset_x%beg:m + offset_x%end, & + -offset_y%beg:n + offset_y%end, & + -offset_z%beg:p + offset_z%end)) + if (grid_geometry == 3) then + allocate (cyl_q_sf_s(-offset_y%beg:n + offset_y%end, & + -offset_z%beg:p + offset_z%end, & + -offset_x%beg:m + offset_x%end)) + end if end if - if (n == 0) allocate (q_root_sf(0:m_root, 0:0, 0:0)) + if (n == 0) then + allocate (q_root_sf(0:m_root, 0:0, 0:0)) + if (precision == 1) then + allocate (q_root_sf_s(0:m_root, 0:0, 0:0)) + end if + end if ! Allocating the spatial and data extents and also the variables for ! the offsets and the one bookkeeping the number of cell-boundaries @@ -185,37 +183,22 @@ subroutine s_initialize_data_output_module() ! ---------------------------- lo_offset = (/offset_x%beg, offset_y%beg, offset_z%beg/) hi_offset = (/offset_x%end, offset_y%end, offset_z%end/) end if - if (coarsen_silo) then - if (grid_geometry == 3) then - dims = (/(n/2) + offset_y%beg + offset_y%end + 2, & - (p/2) + offset_z%beg + offset_z%end + 2, & - (m/2) + offset_x%beg + offset_x%end + 2/) - else - dims = (/(m/2) + offset_x%beg + offset_x%end + 2, & - (n/2) + offset_y%beg + offset_y%end + 2, & - (p/2) + offset_z%beg + offset_z%end + 2/) - end if + + if (grid_geometry == 3) then + dims = (/n + offset_y%beg + offset_y%end + 2, & + p + offset_z%beg + offset_z%end + 2, & + m + offset_x%beg + offset_x%end + 2/) else - if (grid_geometry == 3) then - dims = (/n + offset_y%beg + offset_y%end + 2, & - p + offset_z%beg + offset_z%end + 2, & - m + offset_x%beg + offset_x%end + 2/) - else - dims = (/m + offset_x%beg + offset_x%end + 2, & - n + offset_y%beg + offset_y%end + 2, & - p + offset_z%beg + offset_z%end + 2/) - end if + dims = (/m + offset_x%beg + offset_x%end + 2, & + n + offset_y%beg + offset_y%end + 2, & + p + offset_z%beg + offset_z%end + 2/) end if else lo_offset = (/offset_x%beg, offset_y%beg/) hi_offset = (/offset_x%end, offset_y%end/) - if (coarsen_silo) then - dims = (/(m/2) + offset_x%beg + offset_x%end + 2, & - (n/2) + offset_y%beg + offset_y%end + 2/) - else - dims = (/m + offset_x%beg + offset_x%end + 2, & - n + offset_y%beg + offset_y%end + 2/) - end if + + dims = (/m + offset_x%beg + offset_x%end + 2, & + n + offset_y%beg + offset_y%end + 2/) end if end if @@ -224,11 +207,7 @@ subroutine s_initialize_data_output_module() ! ---------------------------- if (format == 1) then ! Creating the directory associated with the local process - if (coarsen_silo) then - dbdir = trim(case_dir)//'/coarse_silo_hdf5' - else - dbdir = trim(case_dir)//'/silo_hdf5' - end if + dbdir = trim(case_dir)//'/silo_hdf5' write (proc_rank_dir, '(A,I0)') '/p', proc_rank @@ -431,19 +410,6 @@ subroutine s_initialize_data_output_module() ! ---------------------------- ! END: Querying Number of Flow Variable(s) in Binary Output ======== - ! Modifiying the value of the precision variable, which is used to - ! indicate the floating point precision of the data that is stored - ! in the formatted database file(s). This is performed so that this - ! variable may be directly used as input to the functions that are - ! in charge of writing the data. Only possible for Silo-HDF5 format. - if (format == 1) then - if (precision == 1) then ! Single precision - precision = DB_FLOAT - else - precision = DB_DOUBLE ! Double precision - end if - end if - end subroutine s_initialize_data_output_module ! -------------------------- subroutine s_open_formatted_database_file(t_step) ! -------------------- @@ -656,86 +622,55 @@ subroutine s_write_grid_to_formatted_database_file(t_step) ! ----------- ! with its offsets that indicate the presence and size of ghost ! zone layer(s), are put in the formatted database slave file. - if (coarsen_silo) then - coarse_x_cb(-1 - offset_x%beg:-1) = x_cb(-1 - offset_x%beg:-1) - coarse_x_cb(m/2:(m/2) + offset_x%end) = x_cb(m:m + offset_x%end) - do i = 1, m, 2 - coarse_x_cb((i - 1)/2) = x_cb(i) - end do - - if (n > 0) then - coarse_y_cb(-1 - offset_y%beg:-1) = y_cb(-1 - offset_y%beg:-1) - coarse_y_cb(n/2:(n/2) + offset_y%end) = y_cb(n:n + offset_y%end) - do i = 1, n, 2 - coarse_y_cb((i - 1)/2) = y_cb(i) + if (precision == 1) then + if (p > 0) then + do i = -1-offset_z%beg,p + offset_z%end + z_cb_s(i) = real(z_cb(i)) + end do + else + do i = -1-offset_x%beg,m + offset_x%end + x_cb_s(i) = real(x_cb(i)) end do - if (p > 0) then - coarse_z_cb(-1 - offset_z%beg:-1) = z_cb(-1 - offset_z%beg:-1) - coarse_z_cb(p/2:(p/2) + offset_z%end) = z_cb(p:p + offset_z%end) - do i = 1, p, 2 - coarse_z_cb((i - 1)/2) = z_cb(i) - end do - end if + do i = -1-offset_y%beg,n + offset_y%end + y_cb_s(i) = real(y_cb(i)) + end do end if end if - if (p > 0) then - err = DBMKOPTLIST(2, optlist) - err = DBADDIOPT(optlist, DBOPT_LO_OFFSET, lo_offset) - err = DBADDIOPT(optlist, DBOPT_HI_OFFSET, hi_offset) - if (coarsen_silo) then - if (grid_geometry == 3) then - err = DBPUTQM(dbfile, 'rectilinear_grid', 16, & - 'x', 1, 'y', 1, 'z', 1, & - coarse_y_cb, coarse_z_cb, coarse_x_cb, dims, 3, & - precision, DB_COLLINEAR, & - optlist, ierr) - else - err = DBPUTQM(dbfile, 'rectilinear_grid', 16, & - 'x', 1, 'y', 1, 'z', 1, & - coarse_x_cb, coarse_y_cb, coarse_z_cb, dims, 3, & - precision, DB_COLLINEAR, & - optlist, ierr) - end if - else + #:for PRECISION, SFX, DBT in [(1,'_s','DB_FLOAT'),(2,'',"DB_DOUBLE")] + if (precision == ${PRECISION}$) then + if (p > 0) then + err = DBMKOPTLIST(2, optlist) + err = DBADDIOPT(optlist, DBOPT_LO_OFFSET, lo_offset) + err = DBADDIOPT(optlist, DBOPT_HI_OFFSET, hi_offset) if (grid_geometry == 3) then err = DBPUTQM(dbfile, 'rectilinear_grid', 16, & - 'x', 1, 'y', 1, 'z', 1, & - y_cb, z_cb, x_cb, dims, 3, & - precision, DB_COLLINEAR, & - optlist, ierr) + 'x', 1, 'y', 1, 'z', 1, & + y_cb${SFX}$, z_cb${SFX}$, x_cb${SFX}$, dims, 3, & + ${DBT}$, DB_COLLINEAR, & + optlist, ierr) else err = DBPUTQM(dbfile, 'rectilinear_grid', 16, & - 'x', 1, 'y', 1, 'z', 1, & - x_cb, y_cb, z_cb, dims, 3, & - precision, DB_COLLINEAR, & - optlist, ierr) + 'x', 1, 'y', 1, 'z', 1, & + x_cb${SFX}$, y_cb${SFX}$, z_cb${SFX}$, dims, 3, & + ${DBT}$, DB_COLLINEAR, & + optlist, ierr) end if - end if - err = DBFREEOPTLIST(optlist) - - else - err = DBMKOPTLIST(2, optlist) - err = DBADDIOPT(optlist, DBOPT_LO_OFFSET, lo_offset) - err = DBADDIOPT(optlist, DBOPT_HI_OFFSET, hi_offset) - if (coarsen_silo) then - err = DBPUTQM(dbfile, 'rectilinear_grid', 16, & - 'x', 1, 'y', 1, 'z', 1, & - coarse_x_cb, coarse_y_cb, DB_F77NULL, dims, 2, & - precision, DB_COLLINEAR, & - optlist, ierr) + err = DBFREEOPTLIST(optlist) else + err = DBMKOPTLIST(2, optlist) + err = DBADDIOPT(optlist, DBOPT_LO_OFFSET, lo_offset) + err = DBADDIOPT(optlist, DBOPT_HI_OFFSET, hi_offset) err = DBPUTQM(dbfile, 'rectilinear_grid', 16, & - 'x', 1, 'y', 1, 'z', 1, & - x_cb, y_cb, DB_F77NULL, dims, 2, & - precision, DB_COLLINEAR, & - optlist, ierr) + 'x', 1, 'y', 1, 'z', 1, & + x_cb${SFX}$, y_cb${SFX}$, DB_F77NULL, dims, 2, & + ${DBT}$, DB_COLLINEAR, & + optlist, ierr) + err = DBFREEOPTLIST(optlist) end if - err = DBFREEOPTLIST(optlist) - end if - + #:endfor ! END: Silo-HDF5 Database Format =================================== ! Binary Database Format =========================================== @@ -912,79 +847,54 @@ subroutine s_write_variable_to_formatted_database_file(varname, t_step) ! the flow variable data that it is responsible for to the ! formatted database slave file. - if (coarsen_silo) call s_coarsen_variable() - - if (grid_geometry == 3) then - if (coarsen_silo) then - do i = -offset_x%beg, (m/2) + offset_x%end - do j = -offset_y%beg, (n/2) + offset_y%end - do k = -offset_z%beg, (p/2) + offset_z%end - cyl_coarse_q_sf(j, k, i) = coarse_xyz_q_sf(i, j, k) - end do + if (precision == 1) then + do i = -offset_x%beg, m + offset_x%end + do j = -offset_y%beg, n + offset_y%end + do k = -offset_z%beg, p + offset_z%end + q_sf_s(i,j,k) = real(q_sf(i, j, k)) end do end do - else - do i = -offset_x%beg, m + offset_x%end - do j = -offset_y%beg, n + offset_y%end - do k = -offset_z%beg, p + offset_z%end - cyl_q_sf(j, k, i) = q_sf(i, j, k) - end do + end do + end if + + if (grid_geometry == 3) then + do i = -offset_x%beg, m + offset_x%end + do j = -offset_y%beg, n + offset_y%end + do k = -offset_z%beg, p + offset_z%end + cyl_q_sf(j, k, i) = q_sf(i, j, k) end do end do - end if + end do end if - if (p > 0) then - if (coarsen_silo) then - if (grid_geometry == 3) then - err = DBPUTQV1(dbfile, trim(varname), & - len_trim(varname), & - 'rectilinear_grid', 16, & - cyl_coarse_q_sf, dims - 1, 3, DB_F77NULL, & - 0, precision, DB_ZONECENT, & - DB_F77NULL, ierr) - else - err = DBPUTQV1(dbfile, trim(varname), & - len_trim(varname), & - 'rectilinear_grid', 16, & - coarse_xyz_q_sf, dims - 1, 3, DB_F77NULL, & - 0, precision, DB_ZONECENT, & - DB_F77NULL, ierr) - end if - else + #:for PRECISION, SFX, DBT in [(1,'_s','DB_FLOAT'),(2,'',"DB_DOUBLE")] + if (precision == ${PRECISION}$) then + if (p > 0) then if (grid_geometry == 3) then err = DBPUTQV1(dbfile, trim(varname), & - len_trim(varname), & - 'rectilinear_grid', 16, & - cyl_q_sf, dims - 1, 3, DB_F77NULL, & - 0, precision, DB_ZONECENT, & - DB_F77NULL, ierr) + len_trim(varname), & + 'rectilinear_grid', 16, & + cyl_q_sf${SFX}$, dims - 1, 3, DB_F77NULL, & + 0, ${DBT}$, DB_ZONECENT, & + DB_F77NULL, ierr) else err = DBPUTQV1(dbfile, trim(varname), & - len_trim(varname), & - 'rectilinear_grid', 16, & - q_sf, dims - 1, 3, DB_F77NULL, & - 0, precision, DB_ZONECENT, & - DB_F77NULL, ierr) + len_trim(varname), & + 'rectilinear_grid', 16, & + q_sf${SFX}$, dims - 1, 3, DB_F77NULL, & + 0, ${DBT}$, DB_ZONECENT, & + DB_F77NULL, ierr) end if - end if - else - if (coarsen_silo) then - err = DBPUTQV1(dbfile, trim(varname), & - len_trim(varname), & - 'rectilinear_grid', 16, & - coarse_xy_q_sf, dims - 1, 2, DB_F77NULL, & - 0, precision, DB_ZONECENT, & - DB_F77NULL, ierr) else err = DBPUTQV1(dbfile, trim(varname), & - len_trim(varname), & - 'rectilinear_grid', 16, & - q_sf, dims - 1, 2, DB_F77NULL, & - 0, precision, DB_ZONECENT, & - DB_F77NULL, ierr) + len_trim(varname), & + 'rectilinear_grid', 16, & + q_sf${SFX}$, dims - 1, 2, DB_F77NULL, & + 0, ${DBT}$, DB_ZONECENT, & + DB_F77NULL, ierr) end if end if + #:endfor end if @@ -1029,49 +939,6 @@ subroutine s_write_variable_to_formatted_database_file(varname, t_step) end subroutine s_write_variable_to_formatted_database_file ! ----------- - subroutine s_coarsen_variable() ! -------------------------------------- - ! Description: The purpose of this subroutine is to coarsen any variable - ! that is to be written to the formatted database file by averaging every - ! two cells together into a single value. This averaging is done separately - ! in each dimension. - - ! Generic loop iterator - integer :: i, j, k - - ! Average q_sf onto coarser grid - coarse_x_q_sf(-offset_x%beg:-1, :, :) = q_sf(-offset_x%beg:-1, :, :) - coarse_x_q_sf((m/2) + 1:(m/2) + offset_x%end, :, :) = q_sf(m + 1:m + offset_x%end, :, :) - do i = 1, m, 2 - coarse_x_q_sf((i - 1)/2, -offset_y%beg:n + offset_y%end, -offset_z%beg:p + offset_z%end) & - = 5d-1*(q_sf(i, -offset_y%beg:n + offset_y%end, -offset_z%beg:p + offset_z%end) + & - q_sf(i - 1, -offset_y%beg:n + offset_y%end, -offset_z%beg:p + offset_z%end)) - end do - if (mod(m, 2) == 0) coarse_x_q_sf(m/2, :, :) = q_sf(m, :, :) - - if (n > 0) then - coarse_xy_q_sf(:, -offset_y%beg:-1, :) = coarse_x_q_sf(:, -offset_y%beg:-1, :) - coarse_xy_q_sf(:, (n/2) + 1:(n/2) + offset_y%end, :) = coarse_x_q_sf(:, n + 1:n + offset_y%end, :) - do i = 1, n, 2 - coarse_xy_q_sf(-offset_x%beg:(m/2) + offset_x%end, (i - 1)/2, -offset_z%beg:p + offset_z%end) & - = 5d-1*(coarse_x_q_sf(-offset_x%beg:(m/2) + offset_x%end, i, -offset_z%beg:p + offset_z%end) + & - coarse_x_q_sf(-offset_x%beg:(m/2) + offset_x%end, i - 1, -offset_z%beg:p + offset_z%end)) - end do - if (mod(n, 2) == 0) coarse_xy_q_sf(:, n/2, :) = coarse_x_q_sf(:, n, :) - - if (p > 0) then - coarse_xyz_q_sf(:, :, -offset_z%beg:-1) = coarse_xy_q_sf(:, :, -offset_z%beg:-1) - coarse_xyz_q_sf(:, :, (p/2) + 1:(p/2) + offset_z%end) = coarse_xy_q_sf(:, :, p + 1:p + offset_z%end) - do i = 1, p, 2 - coarse_xyz_q_sf(-offset_x%beg:(m/2) + offset_x%end, -offset_y%beg:(n/2) + offset_y%end, (i - 1)/2) & - = 5d-1*(coarse_xy_q_sf(-offset_x%beg:(m/2) + offset_x%end, -offset_y%beg:(n/2) + offset_y%end, i) + & - coarse_xy_q_sf(-offset_x%beg:(m/2) + offset_x%end, -offset_y%beg:(n/2) + offset_y%end, i - 1)) - end do - if (mod(p, 2) == 0) coarse_xyz_q_sf(:, :, p/2) = coarse_xy_q_sf(:, :, p) - end if - end if - - end subroutine s_coarsen_variable ! ------------------------------------ - subroutine s_close_formatted_database_file() ! ------------------------- ! Description: The purpose of this subroutine is to close any formatted ! database file(s) that may be opened at the time-step that @@ -1106,14 +973,9 @@ subroutine s_finalize_data_output_module() ! ------------------------- ! that were written to the formatted database file(s). Note that the ! root variable is only deallocated in the case of a 1D computation. deallocate (q_sf) - if (coarsen_silo) deallocate (coarse_x_q_sf, coarse_xy_q_sf, coarse_xyz_q_sf) if (n == 0) deallocate (q_root_sf) if (grid_geometry == 3) then - if (coarsen_silo) then - deallocate (cyl_coarse_q_sf) - else - deallocate (cyl_q_sf) - end if + deallocate (cyl_q_sf) end if ! Deallocating spatial and data extents and also the variables for diff --git a/src/post_process/m_global_parameters.f90 b/src/post_process/m_global_parameters.f90 index 4b81e056c3..e84d9c400d 100644 --- a/src/post_process/m_global_parameters.f90 +++ b/src/post_process/m_global_parameters.f90 @@ -50,7 +50,7 @@ module m_global_parameters !> @name Cell-boundary locations in the x-, y- and z-coordinate directions !> @{ real(kind(0d0)), allocatable, dimension(:) :: x_cb, x_root_cb, y_cb, z_cb - real(kind(0d0)), allocatable, dimension(:) :: coarse_x_cb, coarse_y_cb, coarse_z_cb + real(kind(0.0)), allocatable, dimension(:) :: x_cb_s, y_cb_s, z_cb_s !> @} !> @name Cell-center locations in the x-, y- and z-coordinate directions @@ -146,8 +146,6 @@ module m_global_parameters integer :: format !< Format of the database file(s) - logical :: coarsen_silo - integer :: precision !< Floating point precision of the database file(s) !> @name Size of the ghost zone layer in the x-, y- and z-coordinate directions. @@ -187,12 +185,6 @@ module m_global_parameters logical :: schlieren_wrt !> @} - !> @name Options for Fourier decomposition in the azimuthal direction if 3D - !! cylindrical coordinates are used - !> @{ - logical :: fourier_decomp - !> @} - real(kind(0d0)), dimension(num_fluids_max) :: schlieren_alpha !< !! Amplitude coefficients of the numerical Schlieren function that are used !! to adjust the intensity of numerical Schlieren renderings for individual @@ -291,8 +283,6 @@ subroutine s_assign_default_values_to_user_inputs() ! ------------------ precision = dflt_int - coarsen_silo = .false. - alpha_rho_wrt = .false. rho_wrt = .false. mom_wrt = .false. @@ -316,8 +306,6 @@ subroutine s_assign_default_values_to_user_inputs() ! ------------------ schlieren_alpha = dflt_real - fourier_decomp = .false. - fd_order = dflt_int ! Tait EOS @@ -580,6 +568,17 @@ subroutine s_initialize_global_parameters_module() ! ---------------------- buff_size = buff_size + fd_number end if + ! Allocating single precision grid variables if needed + if (precision == 1) then + allocate (x_cb_s(-1 - offset_x%beg:m + offset_x%end)) + if (n > 0) then + allocate (y_cb_s(-1 - offset_x%beg:n + offset_x%end)) + if (p > 0) then + allocate (z_cb_s(-1 - offset_x%beg:m + offset_x%end)) + end if + end if + end if + ! Allocating the grid variables in the x-coordinate direction allocate (x_cb(-1 - offset_x%beg:m + offset_x%end)) allocate (x_cc(-buff_size:m + buff_size)) @@ -607,14 +606,6 @@ subroutine s_initialize_global_parameters_module() ! ---------------------- end if - if (coarsen_silo) then - allocate (coarse_x_cb(-1 - offset_x%beg:(m/2) + offset_x%end)) - if (n > 0) then - allocate (coarse_y_cb(-1 - offset_y%beg:(n/2) + offset_y%end)) - if (p > 0) allocate (coarse_z_cb(-1 - offset_z%beg:(p/2) + offset_z%end)) - end if - end if - allocate (adv(num_fluids)) if (cyl_coord .neqv. .true.) then ! Cartesian grid @@ -820,14 +811,6 @@ subroutine s_finalize_global_parameters_module() ! ------------------- end if - if (coarsen_silo) then - deallocate (coarse_x_cb) - if (n > 0) then - deallocate (coarse_y_cb) - if (p > 0) deallocate (coarse_z_cb) - end if - end if - deallocate (proc_coords) deallocate (adv) diff --git a/src/post_process/m_mpi_proxy.fpp b/src/post_process/m_mpi_proxy.fpp index 2a282d9202..478f6003e6 100644 --- a/src/post_process/m_mpi_proxy.fpp +++ b/src/post_process/m_mpi_proxy.fpp @@ -163,10 +163,9 @@ contains #:for VAR in [ 'cyl_coord', 'adv_alphan', 'mpp_lim', 'mixture_err', & & 'alt_soundspeed', 'hypoelasticity', 'parallel_io', 'rho_wrt', & - & 'coarsen_silo', 'E_wrt', 'pres_wrt', 'gamma_wrt', & + & 'E_wrt', 'pres_wrt', 'gamma_wrt', 'polytropic', 'polydisperse', & & 'heat_ratio_wrt', 'pi_inf_wrt', 'pres_inf_wrt', 'cons_vars_wrt', & - & 'prim_vars_wrt', 'c_wrt', 'qm_wrt','schlieren_wrt', 'bubbles', & - & 'polytropic', 'fourier_decomp', 'polydisperse' ] + & 'prim_vars_wrt', 'c_wrt', 'qm_wrt','schlieren_wrt', 'bubbles'] call MPI_BCAST(${VAR}$, 1, MPI_LOGICAL, 0, MPI_COMM_WORLD, ierr) #:endfor diff --git a/src/post_process/m_start_up.f90 b/src/post_process/m_start_up.f90 index df2eafc87a..5be1dbfeef 100644 --- a/src/post_process/m_start_up.f90 +++ b/src/post_process/m_start_up.f90 @@ -53,8 +53,7 @@ subroutine s_read_input_file() ! --------------------------------------- omega_wrt, qm_wrt, schlieren_wrt, schlieren_alpha, & fd_order, mixture_err, alt_soundspeed, & flux_lim, flux_wrt, cyl_coord, & - parallel_io, coarsen_silo, fourier_decomp, & - rhoref, pref, bubbles, R0ref, nb, & + parallel_io, rhoref, pref, bubbles, R0ref, nb, & polytropic, thermal, Ca, Web, Re_inv, & polydisperse, poly_sigma diff --git a/src/simulation/m_checker.fpp b/src/simulation/m_checker.fpp index d3fab5e4f0..79d92ead2c 100644 --- a/src/simulation/m_checker.fpp +++ b/src/simulation/m_checker.fpp @@ -87,8 +87,6 @@ contains call s_mpi_abort('Bubble models untested with 6-equation model') elseif (model_eqns == 1) then call s_mpi_abort('Bubble models untested with pi-gamma model') - elseif (weno_vars /= 2) then - call s_mpi_abort('Bubble modeling requires weno_vars = 2') !TODO: Comment this out when testing riemann with hll elseif (riemann_solver /= 2) then call s_mpi_abort('Bubble modeling requires riemann_solver = 2') @@ -161,8 +159,6 @@ contains if (time_stepper /= 23) then call s_mpi_abort('Unsupported value of time_stepper. Exiting ...') end if - elseif (all(weno_vars /= (/1, 2/))) then - call s_mpi_abort('Unsupported value of weno_vars. Exiting ...') elseif (all(weno_order /= (/1, 3, 5/))) then call s_mpi_abort('Unsupported value of weno_order. Exiting ...') elseif (m + 1 < num_stcls_min*weno_order) then diff --git a/src/simulation/m_global_parameters.fpp b/src/simulation/m_global_parameters.fpp index a05bb6a244..30cfeea3fd 100644 --- a/src/simulation/m_global_parameters.fpp +++ b/src/simulation/m_global_parameters.fpp @@ -95,7 +95,6 @@ module m_global_parameters logical :: adv_alphan !< Advection of the last volume fraction logical :: mpp_lim !< Mixture physical parameters (MPP) limits integer :: time_stepper !< Time-stepper algorithm - integer :: weno_vars !< WENO-reconstructed state variables type logical :: prim_vars_wrt #:if MFC_CASE_OPTIMIZATION @@ -344,7 +343,6 @@ contains adv_alphan = .false. mpp_lim = .false. time_stepper = dflt_int - weno_vars = dflt_int weno_eps = dflt_real mapped_weno = .false. mp_weno = .false. diff --git a/src/simulation/m_mpi_proxy.fpp b/src/simulation/m_mpi_proxy.fpp index de87df46e1..52dea6cecc 100644 --- a/src/simulation/m_mpi_proxy.fpp +++ b/src/simulation/m_mpi_proxy.fpp @@ -96,12 +96,12 @@ contains #:for VAR in ['t_step_old', 'm', 'n', 'p', 'm_glb', 'n_glb', 'p_glb', & & 't_step_start','t_step_stop','t_step_save','model_eqns', & - & 'num_fluids','time_stepper', 'weno_vars', 'riemann_solver', & + & 'num_fluids','time_stepper', 'riemann_solver', 'num_mono', & & 'wave_speeds', 'avg_state', 'precision', 'bc_x%beg', 'bc_x%end', & & 'bc_y%beg', 'bc_y%end', 'bc_z%beg', 'bc_z%end', 'bc_x_glb%beg', & & 'bc_x_glb%end', 'bc_y_glb%beg', 'bc_y_glb%end', 'bc_z_glb%beg', & & 'bc_z_glb%end', 'fd_order', 'num_probes', 'num_integrals', & - & 'bubble_model', 'thermal', 'R0_type', 'num_mono' ] + & 'bubble_model', 'thermal', 'R0_type'] call MPI_BCAST(${VAR}$, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr) #:endfor diff --git a/src/simulation/m_start_up.fpp b/src/simulation/m_start_up.fpp index 4c4431983d..a54f190db8 100644 --- a/src/simulation/m_start_up.fpp +++ b/src/simulation/m_start_up.fpp @@ -83,8 +83,8 @@ contains namelist /user_inputs/ case_dir, run_time_info, m, n, p, dt, & t_step_start, t_step_stop, t_step_save, & model_eqns, num_fluids, adv_alphan, & - mpp_lim, time_stepper, weno_vars, & - weno_eps, weno_flat, riemann_flat, cu_mpi, cu_tensor, & + mpp_lim, time_stepper, weno_eps, weno_flat, & + riemann_flat, cu_mpi, cu_tensor, & mapped_weno, mp_weno, & riemann_solver, wave_speeds, avg_state, & bc_x, bc_y, bc_z, & diff --git a/toolchain/mfc/run/case_dicts.py b/toolchain/mfc/run/case_dicts.py index 2f77271906..41ef28233c 100644 --- a/toolchain/mfc/run/case_dicts.py +++ b/toolchain/mfc/run/case_dicts.py @@ -66,14 +66,13 @@ SIMULATION = COMMON + [ 'run_time_info', 't_step_old', 't_tol', 'dt', 't_step_start', - 't_step_stop', 't_step_save', 'time_stepper', 'weno_vars', 'weno_eps', - 'char_decomp', 'mapped_weno', 'mp_weno', 'weno_avg', 'weno_Re_flux', - 'riemann_solver', 'wave_speeds', 'avg_state', 'commute_err', 'split_err', - 'alt_crv', 'alt_soundspeed', 'regularization', 'reg_eps', 'null_weights', - 'mixture_err', 'tvd_riemann_flux', 'tvd_rhs_flux', 'tvd_wave_speeds', - 'flux_lim', 'lsq_deriv', 'fd_order', 'num_probes', 'probe_wrt', + 't_step_stop', 't_step_save', 'time_stepper', 'weno_eps', + 'mapped_weno', 'mp_weno', 'weno_avg', 'weno_Re_flux', + 'riemann_solver', 'wave_speeds', 'avg_state', 'prim_vars_wrt', + 'alt_crv', 'alt_soundspeed', 'regularization', 'null_weights', + 'mixture_err', 'lsq_deriv', 'fd_order', 'num_probes', 'probe_wrt', 'bubble_model', 'Monopole', 'num_mono', 'qbmm', 'R0_type', 'integral_wrt', - 'num_integrals', 'cu_mpi', 'prim_vars_wrt' + 'num_integrals', 'cu_mpi' ] for cmp in ["x", "y", "z"]: @@ -112,12 +111,12 @@ POST_PROCESS = COMMON + [ 't_step_start', 't_step_stop', 't_step_save', 'alt_soundspeed', - 'mixture_err', 'format', 'coarsen_silo', 'fourier_decomp', + 'mixture_err', 'format', 'schlieren_wrt', 'schlieren_alpha', 'fd_order', 'fourier_modes%beg', 'fourier_modes%end', 'alpha_rho_wrt', 'rho_wrt', 'mom_wrt', 'vel_wrt', 'flux_lim', 'flux_wrt', 'E_wrt', 'pres_wrt', 'alpha_wrt', 'kappa_wrt', 'gamma_wrt', 'heat_ratio_wrt', 'pi_inf_wrt', 'pres_inf_wrt', 'cons_vars_wrt', 'prim_vars_wrt', 'c_wrt', 'omega_wrt', - 'qm_wrt', 'schlieren_wrt', 'schlieren_alpha', 'fd_order' + 'qm_wrt' ] for cmp_id in range(1,3+1): diff --git a/toolchain/mfc/test/case.py b/toolchain/mfc/test/case.py index f949f3672c..cfa6b6492f 100644 --- a/toolchain/mfc/test/case.py +++ b/toolchain/mfc/test/case.py @@ -24,7 +24,6 @@ 'mpp_lim' : 'F', 'mixture_err' : 'F', 'time_stepper' : 3, - 'weno_vars' : 2, 'weno_order' : 5, 'weno_eps' : 1.E-16, 'mapped_weno' : 'F',