Skip to content

Commit

Permalink
requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wilfonba committed Nov 5, 2024
1 parent 6ab5b79 commit c8ad8c0
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 15 deletions.
6 changes: 6 additions & 0 deletions docs/documentation/case.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,8 @@ Details of implementation of viscosity in MFC can be found in [Coralic (2015)](r
| `n_start` | Integer | Save file from which to start simulation |
| `t_save` | Real | Time duration between data output |
| `t_stop` | Real | Simulation stop time |
| `surface_tension` | Logical | Activate surface tension. Requires `surface_tension = T` |
| `viscous` | Logical | Activate viscosity Requires `viscous = T` |

- \* Options that work only with `model_eqns = 2`.
- † Options that work only with ``cyl_coord = 'F'``.
Expand Down Expand Up @@ -445,6 +447,10 @@ If this option is false, velocity gradient is computed using finite difference s
- `weno_avg` it activates the arithmetic average of the left and right, WENO-reconstructed, cell-boundary values.
This option requires `weno_Re_flux` to be true because cell boundary values are only utilized when employing the scalar divergence method in the computation of velocity gradients.

- `surface_tension` activates surface tension when set to `'T'`. Requires `sigma` to be set.

- `viscous` activates viscosity when set to `'T'`. Requires `Re(1)` and `Re(2)` to be set.

#### Constant Time-Stepping

- `dt` specifies the constant time step size that is used in simulation.
Expand Down
4 changes: 1 addition & 3 deletions src/post_process/m_start_up.f90
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ subroutine s_read_input_file
polydisperse, poly_sigma, file_per_process, relax, &
relax_model, cf_wrt, sigma, adv_n, ib, &
cfl_adap_dt, cfl_const_dt, t_save, t_stop, n_start, &
cfl_target
cfl_target, surface_tension

! Inquiring the status of the post_process.inp file
file_loc = 'post_process.inp'
Expand Down Expand Up @@ -114,8 +114,6 @@ subroutine s_read_input_file

if (cfl_adap_dt .or. cfl_const_dt) cfl_dt = .true.

if (.not. f_is_default(sigma)) surface_tension = .true.

else
call s_mpi_abort('File post_process.inp is missing. Exiting ...')
end if
Expand Down
5 changes: 2 additions & 3 deletions src/pre_process/m_start_up.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ contains
sigR, sigV, dist_type, rhoRV, R0_type, &
file_per_process, relax, relax_model, &
palpha_eps, ptgalpha_eps, ib, num_ibs, patch_ib, &
sigma, adv_n, cfl_adap_dt, cfl_const_dt, n_start, n_start_old
sigma, adv_n, cfl_adap_dt, cfl_const_dt, n_start, &
n_start_old, surface_tension

! Inquiring the status of the pre_process.inp file
file_loc = 'pre_process.inp'
Expand Down Expand Up @@ -170,8 +171,6 @@ contains

if (cfl_adap_dt .or. cfl_const_dt) cfl_dt = .true.

if (.not. f_is_default(sigma)) surface_tension = .true.

else
call s_mpi_abort('File pre_process.inp is missing. Exiting ...')
end if
Expand Down
1 change: 0 additions & 1 deletion src/simulation/m_global_parameters.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,6 @@ contains
if (fluid_pp(i)%Re(2) > 0) Re_size(2) = Re_size(2) + 1
end do

if (any(Re_size > 0d0)) viscous = .true.
if (Re_size(1) > 0d0) shear_stress = .true.
if (Re_size(2) > 0d0) bulk_stress = .true.

Expand Down
6 changes: 3 additions & 3 deletions src/simulation/m_riemann_solvers.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -4363,7 +4363,7 @@ contains
! to convert mixture or species variables to the mixture variables
! s_convert_to_mixture_variables => null()
if (shear_stress) then
if (viscous) then
@:DEALLOCATE_GLOBAL(Re_avg_rsx_vf)
end if
@:DEALLOCATE_GLOBAL(vel_src_rsx_vf)
Expand All @@ -4376,7 +4376,7 @@ contains
if (n == 0) return
if (shear_stress) then
if (viscous) then
@:DEALLOCATE_GLOBAL(Re_avg_rsy_vf)
end if
@:DEALLOCATE_GLOBAL(vel_src_rsy_vf)
Expand All @@ -4389,7 +4389,7 @@ contains
if (p == 0) return
if (shear_stress) then
if (viscous) then
@:DEALLOCATE_GLOBAL(Re_avg_rsz_vf)
end if
@:DEALLOCATE_GLOBAL(vel_src_rsz_vf)
Expand Down
5 changes: 2 additions & 3 deletions src/simulation/m_start_up.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ contains
pi_fac, adv_n, adap_dt, bf_x, bf_y, bf_z, &
k_x, k_y, k_z, w_x, w_y, w_z, p_x, p_y, p_z, &
g_x, g_y, g_z, n_start, t_save, t_stop, &
cfl_adap_dt, cfl_const_dt, cfl_target
cfl_adap_dt, cfl_const_dt, cfl_target, &
viscous, surface_tension

! Checking that an input file has been provided by the user. If it
! has, then the input file is read in, otherwise, simulation exits.
Expand Down Expand Up @@ -198,8 +199,6 @@ contains

if (cfl_adap_dt .or. cfl_const_dt) cfl_dt = .true.

if (.not. f_is_default(sigma)) surface_tension = .true.

else
call s_mpi_abort(trim(file_path)//' is missing. Exiting ...')
end if
Expand Down
6 changes: 5 additions & 1 deletion toolchain/mfc/run/case_dicts.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ def analytic(self):
'num_ibs': ParamType.INT,
'cfl_dt': ParamType.LOG,
'n_start': ParamType.INT,
'n_start_old': ParamType.INT
'n_start_old': ParamType.INT,
'surface_tension': ParamType.LOG,
})

for ib_id in range(1, 10+1):
Expand Down Expand Up @@ -225,6 +226,8 @@ def analytic(self):
't_save': ParamType.REAL,
'cfl_target': ParamType.REAL,
'low_Mach': ParamType.INT,
'surface_tension': ParamType.LOG,
'viscous': ParamType.LOG,
})

for var in [ 'diffusion', 'reactions' ]:
Expand Down Expand Up @@ -336,6 +339,7 @@ def analytic(self):
't_save': ParamType.REAL,
't_stop': ParamType.REAL,
'n_start': ParamType.INT,
'surface_tension': ParamType.LOG,
})

for cmp_id in range(1,3+1):
Expand Down
2 changes: 1 addition & 1 deletion toolchain/mfc/test/cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ def alter_viscosity(dimInfo):
# Viscosity & bubbles checks
if len(dimInfo[0]) > 0:
stack.push("Viscosity -> Bubbles",
{"fluid_pp(1)%Re(1)": 50, "bubbles": 'T'})
{"fluid_pp(1)%Re(1)": 50, "bubbles": 'T', "viscous": 'T'})

stack.push('', {
'nb' : 1, 'fluid_pp(1)%gamma' : 0.16, 'fluid_pp(1)%pi_inf': 3515.0,
Expand Down

0 comments on commit c8ad8c0

Please sign in to comment.