Skip to content

Commit c8ad8c0

Browse files
committed
requested changes
1 parent 6ab5b79 commit c8ad8c0

File tree

8 files changed

+20
-15
lines changed

8 files changed

+20
-15
lines changed

docs/documentation/case.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,8 @@ Details of implementation of viscosity in MFC can be found in [Coralic (2015)](r
371371
| `n_start` | Integer | Save file from which to start simulation |
372372
| `t_save` | Real | Time duration between data output |
373373
| `t_stop` | Real | Simulation stop time |
374+
| `surface_tension` | Logical | Activate surface tension. Requires `surface_tension = T` |
375+
| `viscous` | Logical | Activate viscosity Requires `viscous = T` |
374376

375377
- \* Options that work only with `model_eqns = 2`.
376378
- † Options that work only with ``cyl_coord = 'F'``.
@@ -445,6 +447,10 @@ If this option is false, velocity gradient is computed using finite difference s
445447
- `weno_avg` it activates the arithmetic average of the left and right, WENO-reconstructed, cell-boundary values.
446448
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.
447449

450+
- `surface_tension` activates surface tension when set to `'T'`. Requires `sigma` to be set.
451+
452+
- `viscous` activates viscosity when set to `'T'`. Requires `Re(1)` and `Re(2)` to be set.
453+
448454
#### Constant Time-Stepping
449455

450456
- `dt` specifies the constant time step size that is used in simulation.

src/post_process/m_start_up.f90

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ subroutine s_read_input_file
8383
polydisperse, poly_sigma, file_per_process, relax, &
8484
relax_model, cf_wrt, sigma, adv_n, ib, &
8585
cfl_adap_dt, cfl_const_dt, t_save, t_stop, n_start, &
86-
cfl_target
86+
cfl_target, surface_tension
8787

8888
! Inquiring the status of the post_process.inp file
8989
file_loc = 'post_process.inp'
@@ -114,8 +114,6 @@ subroutine s_read_input_file
114114

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

117-
if (.not. f_is_default(sigma)) surface_tension = .true.
118-
119117
else
120118
call s_mpi_abort('File post_process.inp is missing. Exiting ...')
121119
end if

src/pre_process/m_start_up.fpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ contains
141141
sigR, sigV, dist_type, rhoRV, R0_type, &
142142
file_per_process, relax, relax_model, &
143143
palpha_eps, ptgalpha_eps, ib, num_ibs, patch_ib, &
144-
sigma, adv_n, cfl_adap_dt, cfl_const_dt, n_start, n_start_old
144+
sigma, adv_n, cfl_adap_dt, cfl_const_dt, n_start, &
145+
n_start_old, surface_tension
145146

146147
! Inquiring the status of the pre_process.inp file
147148
file_loc = 'pre_process.inp'
@@ -170,8 +171,6 @@ contains
170171

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

173-
if (.not. f_is_default(sigma)) surface_tension = .true.
174-
175174
else
176175
call s_mpi_abort('File pre_process.inp is missing. Exiting ...')
177176
end if

src/simulation/m_global_parameters.fpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,6 @@ contains
981981
if (fluid_pp(i)%Re(2) > 0) Re_size(2) = Re_size(2) + 1
982982
end do
983983

984-
if (any(Re_size > 0d0)) viscous = .true.
985984
if (Re_size(1) > 0d0) shear_stress = .true.
986985
if (Re_size(2) > 0d0) bulk_stress = .true.
987986

src/simulation/m_riemann_solvers.fpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4363,7 +4363,7 @@ contains
43634363
! to convert mixture or species variables to the mixture variables
43644364
! s_convert_to_mixture_variables => null()
43654365
4366-
if (shear_stress) then
4366+
if (viscous) then
43674367
@:DEALLOCATE_GLOBAL(Re_avg_rsx_vf)
43684368
end if
43694369
@:DEALLOCATE_GLOBAL(vel_src_rsx_vf)
@@ -4376,7 +4376,7 @@ contains
43764376
43774377
if (n == 0) return
43784378
4379-
if (shear_stress) then
4379+
if (viscous) then
43804380
@:DEALLOCATE_GLOBAL(Re_avg_rsy_vf)
43814381
end if
43824382
@:DEALLOCATE_GLOBAL(vel_src_rsy_vf)
@@ -4389,7 +4389,7 @@ contains
43894389
43904390
if (p == 0) return
43914391
4392-
if (shear_stress) then
4392+
if (viscous) then
43934393
@:DEALLOCATE_GLOBAL(Re_avg_rsz_vf)
43944394
end if
43954395
@:DEALLOCATE_GLOBAL(vel_src_rsz_vf)

src/simulation/m_start_up.fpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ contains
164164
pi_fac, adv_n, adap_dt, bf_x, bf_y, bf_z, &
165165
k_x, k_y, k_z, w_x, w_y, w_z, p_x, p_y, p_z, &
166166
g_x, g_y, g_z, n_start, t_save, t_stop, &
167-
cfl_adap_dt, cfl_const_dt, cfl_target
167+
cfl_adap_dt, cfl_const_dt, cfl_target, &
168+
viscous, surface_tension
168169

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

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

201-
if (.not. f_is_default(sigma)) surface_tension = .true.
202-
203202
else
204203
call s_mpi_abort(trim(file_path)//' is missing. Exiting ...')
205204
end if

toolchain/mfc/run/case_dicts.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ def analytic(self):
8787
'num_ibs': ParamType.INT,
8888
'cfl_dt': ParamType.LOG,
8989
'n_start': ParamType.INT,
90-
'n_start_old': ParamType.INT
90+
'n_start_old': ParamType.INT,
91+
'surface_tension': ParamType.LOG,
9192
})
9293

9394
for ib_id in range(1, 10+1):
@@ -225,6 +226,8 @@ def analytic(self):
225226
't_save': ParamType.REAL,
226227
'cfl_target': ParamType.REAL,
227228
'low_Mach': ParamType.INT,
229+
'surface_tension': ParamType.LOG,
230+
'viscous': ParamType.LOG,
228231
})
229232

230233
for var in [ 'diffusion', 'reactions' ]:
@@ -336,6 +339,7 @@ def analytic(self):
336339
't_save': ParamType.REAL,
337340
't_stop': ParamType.REAL,
338341
'n_start': ParamType.INT,
342+
'surface_tension': ParamType.LOG,
339343
})
340344

341345
for cmp_id in range(1,3+1):

toolchain/mfc/test/cases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ def alter_viscosity(dimInfo):
648648
# Viscosity & bubbles checks
649649
if len(dimInfo[0]) > 0:
650650
stack.push("Viscosity -> Bubbles",
651-
{"fluid_pp(1)%Re(1)": 50, "bubbles": 'T'})
651+
{"fluid_pp(1)%Re(1)": 50, "bubbles": 'T', "viscous": 'T'})
652652

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

0 commit comments

Comments
 (0)