MFC
Exascale flow solver
Loading...
Searching...
No Matches
m_bubbles_el Module Reference

Tracks Lagrangian bubbles and couples their dynamics to the Eulerian flow via volume averaging. More...

Functions/Subroutines

impure subroutine s_initialize_bubbles_el_module (q_cons_vf)
 Initializes the lagrangian subgrid bubble solver.
impure subroutine s_read_input_bubbles (q_cons_vf)
 The purpose of this procedure is to obtain the initial bubbles' information.
impure subroutine s_add_bubbles (inputbubble, q_cons_vf, bub_id)
 The purpose of this procedure is to obtain the information of the bubbles when starting fresh.
impure subroutine s_restart_bubbles (bub_id, save_count)
 The purpose of this procedure is to obtain the information of the bubbles from a restart point.
subroutine s_compute_bubble_el_dynamics (q_prim_vf, stage)
 Contains the bubble dynamics subroutines.
subroutine s_compute_bubbles_el_source (q_cons_vf, q_prim_vf, rhs_vf)
 The purpose of this subroutine is to obtain the bubble source terms based on Maeda and Colonius (2018) and add them to the RHS scalar field.
subroutine s_compute_cson_from_pinf (q_prim_vf, pinf, cell, rhol, gamma, pi_inf, cson)
 This procedure computes the speed of sound from a given driving pressure.
subroutine s_smear_voidfraction ()
 The purpose of this subroutine is to smear the effect of the bubbles in the Eulerian framework.
subroutine s_get_pinf (bub_id, q_prim_vf, ptype, f_pinfl, cell, preterm1, term2, romega)
 The purpose of this procedure is obtain the bubble driving pressure p_inf.
impure subroutine s_update_lagrange_tdv_rk (stage)
 This subroutine updates the Lagrange variables using the tvd RK time steppers. The time derivative of the bubble variables must be stored at every stage to avoid precision errors.
subroutine s_locate_cell (pos, cell, scoord)
 This subroutine returns the computational coordinate of the cell for the given position.
impure subroutine s_transfer_data_to_tmp ()
 This subroutine transfer data into the temporal variables.
logical function particle_in_domain (pos_part)
 The purpose of this procedure is to determine if the global coordinates of the bubbles are present in the current MPI processor (including ghost cells).
logical function particle_in_domain_physical (pos_part)
 The purpose of this procedure is to determine if the lagrangian bubble is located in the physical domain. The ghost cells are not part of the physical domain.
subroutine s_gradient_dir (q, dq, dir)
 The purpose of this procedure is to calculate the gradient of a scalar field along the x, y and z directions following a second-order central difference considering uneven widths.
impure subroutine s_write_lag_particles (qtime)
 Subroutine that writes on each time step the changes of the lagrangian bubbles.
impure subroutine s_write_void_evol (qtime)
 Subroutine that writes some useful statistics related to the volume fraction of the particles (void fraction) in the computatioational domain on each time step.
impure subroutine s_write_restart_lag_bubbles (t_step)
 Subroutine that writes the restarting files for the particles in the lagrangian solver.
subroutine s_calculate_lag_bubble_stats ()
 This procedure calculates the maximum and minimum radius of each bubble.
impure subroutine s_write_lag_bubble_stats ()
 Subroutine that writes the maximum and minimum radius of each bubble.
impure subroutine s_remove_lag_bubble (bub_id)
 The purpose of this subroutine is to remove one specific particle if dt is too small.
impure subroutine s_finalize_lagrangian_solver ()
 The purpose of this subroutine is to deallocate variables.

Variables

integer, dimension(:, :), allocatable lag_id
 Global and local IDs.
real(wp), dimension(:), allocatable bub_r0
 Initial bubble radius.
real(wp), dimension(:), allocatable rmax_stats
 Maximum radius.
real(wp), dimension(:), allocatable rmin_stats
 Minimum radius.
real(wp), dimension(:), allocatable gas_mg
 Bubble's gas mass.
real(wp), dimension(:), allocatable gas_betat
 heatflux model (Preston et al., 2007)
real(wp), dimension(:), allocatable gas_betac
 massflux model (Preston et al., 2007)
real(wp), dimension(:), allocatable bub_dphidt
 subgrid velocity potential (Maeda & Colonius, 2018)
real(wp), dimension(:, :), allocatable gas_p
 Pressure in the bubble.
real(wp), dimension(:, :), allocatable gas_mv
 Vapor mass in the bubble.
real(wp), dimension(:, :), allocatable intfc_rad
 Bubble radius.
real(wp), dimension(:, :), allocatable intfc_vel
 Velocity of the bubble interface.
real(wp), dimension(:, :, :), allocatable mtn_pos
 Bubble's position.
real(wp), dimension(:, :, :), allocatable mtn_posprev
 Bubble's previous position.
real(wp), dimension(:, :, :), allocatable mtn_vel
 Bubble's velocity.
real(wp), dimension(:, :, :), allocatable mtn_s
 Bubble's computational cell position in real format.
real(wp), dimension(:, :), allocatable intfc_draddt
 Time derivative of bubble's radius.
real(wp), dimension(:, :), allocatable intfc_dveldt
 Time derivative of bubble's interface velocity.
real(wp), dimension(:, :), allocatable gas_dpdt
 Time derivative of gas pressure.
real(wp), dimension(:, :), allocatable gas_dmvdt
 Time derivative of the vapor mass in the bubble.
real(wp), dimension(:, :, :), allocatable mtn_dposdt
 Time derivative of the bubble's position.
real(wp), dimension(:, :, :), allocatable mtn_dveldt
 Time derivative of the bubble's velocity.
integer, private lag_num_ts
 Number of time stages in the time-stepping scheme.
integer nbubs
 Number of bubbles in the local domain.
real(wprmax_glb
real(wprmin_glb
 Maximum and minimum bubbe size in the local domain Projection of the lagrangian particles in the Eulerian framework.
type(scalar_field), dimension(:), allocatable q_beta
integer q_beta_idx
 Size of the q_beta vector field.

Detailed Description

Tracks Lagrangian bubbles and couples their dynamics to the Eulerian flow via volume averaging.

Function/Subroutine Documentation

◆ particle_in_domain()

logical function m_bubbles_el::particle_in_domain ( real(wp), dimension(3), intent(in) pos_part)

The purpose of this procedure is to determine if the global coordinates of the bubbles are present in the current MPI processor (including ghost cells).

Parameters
pos_partSpatial coordinates of the bubble

Definition at line 3272 of file m_bubbles_EL.fpp.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ particle_in_domain_physical()

logical function m_bubbles_el::particle_in_domain_physical ( real(wp), dimension(3), intent(in) pos_part)

The purpose of this procedure is to determine if the lagrangian bubble is located in the physical domain. The ghost cells are not part of the physical domain.

Parameters
pos_partSpatial coordinates of the bubble

Definition at line 3324 of file m_bubbles_EL.fpp.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_add_bubbles()

impure subroutine m_bubbles_el::s_add_bubbles ( real(wp), dimension(8), intent(in) inputbubble,
type(scalar_field), dimension(sys_size), intent(in) q_cons_vf,
integer, intent(in) bub_id )

The purpose of this procedure is to obtain the information of the bubbles when starting fresh.

Parameters
inputBubbleBubble information
q_cons_vfConservative variables
bub_idLocal id of the bubble

Definition at line 1473 of file m_bubbles_EL.fpp.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_calculate_lag_bubble_stats()

subroutine m_bubbles_el::s_calculate_lag_bubble_stats

This procedure calculates the maximum and minimum radius of each bubble.

Definition at line 3837 of file m_bubbles_EL.fpp.f90.

Here is the caller graph for this function:

◆ s_compute_bubble_el_dynamics()

subroutine m_bubbles_el::s_compute_bubble_el_dynamics ( type(scalar_field), dimension(sys_size), intent(inout) q_prim_vf,
integer, intent(in) stage )

Contains the bubble dynamics subroutines.

Parameters
q_prim_vfPrimitive variables
stageCurrent stage in the time-stepper algorithm

Definition at line 1752 of file m_bubbles_EL.fpp.f90.

Here is the call graph for this function:

◆ s_compute_bubbles_el_source()

subroutine m_bubbles_el::s_compute_bubbles_el_source ( type(scalar_field), dimension(sys_size), intent(inout) q_cons_vf,
type(scalar_field), dimension(sys_size), intent(inout) q_prim_vf,
type(scalar_field), dimension(sys_size), intent(inout) rhs_vf )

The purpose of this subroutine is to obtain the bubble source terms based on Maeda and Colonius (2018) and add them to the RHS scalar field.

Parameters
q_cons_vfConservative variables
q_prim_vfConservative variables
rhs_vfTime derivative of the conservative variables

Definition at line 1999 of file m_bubbles_EL.fpp.f90.

Here is the call graph for this function:

◆ s_compute_cson_from_pinf()

subroutine m_bubbles_el::s_compute_cson_from_pinf ( type(scalar_field), dimension(sys_size), intent(in) q_prim_vf,
real(wp), intent(in) pinf,
integer, dimension(3), intent(in) cell,
real(wp), intent(in) rhol,
real(wp), intent(in) gamma,
real(wp), intent(in) pi_inf,
real(wp), intent(out) cson )

This procedure computes the speed of sound from a given driving pressure.

Parameters
q_prim_vfPrimitive variables
pinfDriving pressure
cellBubble cell
rholLiquid density
gammaLiquid specific heat ratio
pi_infLiquid stiffness
csonCalculated speed of sound

Definition at line 2298 of file m_bubbles_EL.fpp.f90.

Here is the caller graph for this function:

◆ s_finalize_lagrangian_solver()

impure subroutine m_bubbles_el::s_finalize_lagrangian_solver

The purpose of this subroutine is to deallocate variables.

Definition at line 4002 of file m_bubbles_EL.fpp.f90.

Here is the caller graph for this function:

◆ s_get_pinf()

subroutine m_bubbles_el::s_get_pinf ( integer, intent(in) bub_id,
type(scalar_field), dimension(sys_size), intent(in) q_prim_vf,
integer, intent(in) ptype,
real(wp), intent(out) f_pinfl,
integer, dimension(3), intent(out) cell,
real(wp), intent(out), optional preterm1,
real(wp), intent(out), optional term2,
real(wp), intent(out), optional romega )

The purpose of this procedure is obtain the bubble driving pressure p_inf.

Parameters
bub_idParticle identifier
q_prim_vfPrimitive variables
ptype1: p at infinity, 2: averaged P at the bubble location
f_pinflDriving pressure
cellBubble cell
preterm1Pre-computed term 1
term2Computed term 2
RomegaControl volume radius

Definition at line 2493 of file m_bubbles_EL.fpp.f90.

Here is the caller graph for this function:

◆ s_gradient_dir()

subroutine m_bubbles_el::s_gradient_dir ( real(stp), dimension(idwbuff(1)%beg:, idwbuff(2)%beg:, idwbuff(3)%beg:), intent(inout) q,
real(stp), dimension(idwbuff(1)%beg:, idwbuff(2)%beg:, idwbuff(3)%beg:), intent(inout) dq,
integer, intent(in) dir )

The purpose of this procedure is to calculate the gradient of a scalar field along the x, y and z directions following a second-order central difference considering uneven widths.

Parameters
qInput scalar field
dqOutput gradient of q
dirGradient spatial direction

Definition at line 3343 of file m_bubbles_EL.fpp.f90.

Here is the caller graph for this function:

◆ s_initialize_bubbles_el_module()

impure subroutine m_bubbles_el::s_initialize_bubbles_el_module ( type(scalar_field), dimension(sys_size), intent(inout) q_cons_vf)

Initializes the lagrangian subgrid bubble solver.

Parameters
q_cons_vfInitial conservative variables

Definition at line 438 of file m_bubbles_EL.fpp.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_locate_cell()

subroutine m_bubbles_el::s_locate_cell ( real(wp), dimension(3), intent(in) pos,
integer, dimension(3), intent(inout) cell,
real(wp), dimension(3), intent(out) scoord )

This subroutine returns the computational coordinate of the cell for the given position.

Parameters
posInput coordinates
cellComputational coordinate of the cell
scoordCalculated particle coordinates

Definition at line 3160 of file m_bubbles_EL.fpp.f90.

Here is the caller graph for this function:

◆ s_read_input_bubbles()

impure subroutine m_bubbles_el::s_read_input_bubbles ( type(scalar_field), dimension(sys_size), intent(inout) q_cons_vf)

The purpose of this procedure is to obtain the initial bubbles' information.

Parameters
q_cons_vfConservative variables

Definition at line 1344 of file m_bubbles_EL.fpp.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_remove_lag_bubble()

impure subroutine m_bubbles_el::s_remove_lag_bubble ( integer, intent(in) bub_id)

The purpose of this subroutine is to remove one specific particle if dt is too small.

Parameters
bub_idParticle id

Definition at line 3946 of file m_bubbles_EL.fpp.f90.

◆ s_restart_bubbles()

impure subroutine m_bubbles_el::s_restart_bubbles ( integer, intent(inout) bub_id,
integer, intent(inout) save_count )

The purpose of this procedure is to obtain the information of the bubbles from a restart point.

Parameters
bub_idLocal ID of the particle
save_countFile identifier

Definition at line 1584 of file m_bubbles_EL.fpp.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_smear_voidfraction()

subroutine m_bubbles_el::s_smear_voidfraction

The purpose of this subroutine is to smear the effect of the bubbles in the Eulerian framework.

Definition at line 2369 of file m_bubbles_EL.fpp.f90.

Here is the caller graph for this function:

◆ s_transfer_data_to_tmp()

impure subroutine m_bubbles_el::s_transfer_data_to_tmp

This subroutine transfer data into the temporal variables.

Definition at line 3212 of file m_bubbles_EL.fpp.f90.

Here is the caller graph for this function:

◆ s_update_lagrange_tdv_rk()

impure subroutine m_bubbles_el::s_update_lagrange_tdv_rk ( integer, intent(in) stage)

This subroutine updates the Lagrange variables using the tvd RK time steppers. The time derivative of the bubble variables must be stored at every stage to avoid precision errors.

Parameters
stageCurrent tvd RK stage

Definition at line 2778 of file m_bubbles_EL.fpp.f90.

Here is the call graph for this function:

◆ s_write_lag_bubble_stats()

impure subroutine m_bubbles_el::s_write_lag_bubble_stats

Subroutine that writes the maximum and minimum radius of each bubble.

Definition at line 3892 of file m_bubbles_EL.fpp.f90.

Here is the caller graph for this function:

◆ s_write_lag_particles()

impure subroutine m_bubbles_el::s_write_lag_particles ( real(wp), intent(in) qtime)

Subroutine that writes on each time step the changes of the lagrangian bubbles.

Parameters
qtimeCurrent time

Definition at line 3515 of file m_bubbles_EL.fpp.f90.

Here is the caller graph for this function:

◆ s_write_restart_lag_bubbles()

impure subroutine m_bubbles_el::s_write_restart_lag_bubbles ( integer, intent(in) t_step)

Subroutine that writes the restarting files for the particles in the lagrangian solver.

Parameters
t_stepCurrent time step

Definition at line 3685 of file m_bubbles_EL.fpp.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_write_void_evol()

impure subroutine m_bubbles_el::s_write_void_evol ( real(wp), intent(in) qtime)

Subroutine that writes some useful statistics related to the volume fraction of the particles (void fraction) in the computatioational domain on each time step.

Parameters
qtimeCurrent time

Definition at line 3573 of file m_bubbles_EL.fpp.f90.

Here is the caller graph for this function:

Variable Documentation

◆ bub_dphidt

real(wp), dimension(:), allocatable m_bubbles_el::bub_dphidt

subgrid velocity potential (Maeda & Colonius, 2018)

Definition at line 338 of file m_bubbles_EL.fpp.f90.

◆ bub_r0

real(wp), dimension(:), allocatable m_bubbles_el::bub_r0

Initial bubble radius.

Definition at line 320 of file m_bubbles_EL.fpp.f90.

◆ gas_betac

real(wp), dimension(:), allocatable m_bubbles_el::gas_betac

massflux model (Preston et al., 2007)

Definition at line 337 of file m_bubbles_EL.fpp.f90.

◆ gas_betat

real(wp), dimension(:), allocatable m_bubbles_el::gas_betat

heatflux model (Preston et al., 2007)

Definition at line 336 of file m_bubbles_EL.fpp.f90.

◆ gas_dmvdt

real(wp), dimension(:, :), allocatable m_bubbles_el::gas_dmvdt

Time derivative of the vapor mass in the bubble.

Definition at line 387 of file m_bubbles_EL.fpp.f90.

◆ gas_dpdt

real(wp), dimension(:, :), allocatable m_bubbles_el::gas_dpdt

Time derivative of gas pressure.

Definition at line 386 of file m_bubbles_EL.fpp.f90.

◆ gas_mg

real(wp), dimension(:), allocatable m_bubbles_el::gas_mg

Bubble's gas mass.

Definition at line 335 of file m_bubbles_EL.fpp.f90.

◆ gas_mv

real(wp), dimension(:, :), allocatable m_bubbles_el::gas_mv

Vapor mass in the bubble.

Definition at line 353 of file m_bubbles_EL.fpp.f90.

◆ gas_p

real(wp), dimension(:, :), allocatable m_bubbles_el::gas_p

Pressure in the bubble.

Definition at line 352 of file m_bubbles_EL.fpp.f90.

◆ intfc_draddt

real(wp), dimension(:, :), allocatable m_bubbles_el::intfc_draddt

Time derivative of bubble's radius.

Definition at line 384 of file m_bubbles_EL.fpp.f90.

◆ intfc_dveldt

real(wp), dimension(:, :), allocatable m_bubbles_el::intfc_dveldt

Time derivative of bubble's interface velocity.

Definition at line 385 of file m_bubbles_EL.fpp.f90.

◆ intfc_rad

real(wp), dimension(:, :), allocatable m_bubbles_el::intfc_rad

Bubble radius.

Definition at line 354 of file m_bubbles_EL.fpp.f90.

◆ intfc_vel

real(wp), dimension(:, :), allocatable m_bubbles_el::intfc_vel

Velocity of the bubble interface.

Definition at line 355 of file m_bubbles_EL.fpp.f90.

◆ lag_id

integer, dimension(:, :), allocatable m_bubbles_el::lag_id

Global and local IDs.

Definition at line 319 of file m_bubbles_EL.fpp.f90.

◆ lag_num_ts

integer, private m_bubbles_el::lag_num_ts
private

Number of time stages in the time-stepping scheme.

Definition at line 402 of file m_bubbles_EL.fpp.f90.

◆ mtn_dposdt

real(wp), dimension(:, :, :), allocatable m_bubbles_el::mtn_dposdt

Time derivative of the bubble's position.

Definition at line 388 of file m_bubbles_EL.fpp.f90.

◆ mtn_dveldt

real(wp), dimension(:, :, :), allocatable m_bubbles_el::mtn_dveldt

Time derivative of the bubble's velocity.

Definition at line 389 of file m_bubbles_EL.fpp.f90.

◆ mtn_pos

real(wp), dimension(:, :, :), allocatable m_bubbles_el::mtn_pos

Bubble's position.

Definition at line 368 of file m_bubbles_EL.fpp.f90.

◆ mtn_posprev

real(wp), dimension(:, :, :), allocatable m_bubbles_el::mtn_posprev

Bubble's previous position.

Definition at line 369 of file m_bubbles_EL.fpp.f90.

◆ mtn_s

real(wp), dimension(:, :, :), allocatable m_bubbles_el::mtn_s

Bubble's computational cell position in real format.

Definition at line 371 of file m_bubbles_EL.fpp.f90.

◆ mtn_vel

real(wp), dimension(:, :, :), allocatable m_bubbles_el::mtn_vel

Bubble's velocity.

Definition at line 370 of file m_bubbles_EL.fpp.f90.

◆ nbubs

integer m_bubbles_el::nbubs

Number of bubbles in the local domain.

Definition at line 416 of file m_bubbles_EL.fpp.f90.

◆ q_beta

type(scalar_field), dimension(:), allocatable m_bubbles_el::q_beta

Definition at line 419 of file m_bubbles_EL.fpp.f90.

◆ q_beta_idx

integer m_bubbles_el::q_beta_idx

Size of the q_beta vector field.

Definition at line 420 of file m_bubbles_EL.fpp.f90.

◆ rmax_glb

real(wp) m_bubbles_el::rmax_glb

Definition at line 417 of file m_bubbles_EL.fpp.f90.

◆ rmax_stats

real(wp), dimension(:), allocatable m_bubbles_el::rmax_stats

Maximum radius.

Definition at line 321 of file m_bubbles_EL.fpp.f90.

◆ rmin_glb

real(wp) m_bubbles_el::rmin_glb

Maximum and minimum bubbe size in the local domain Projection of the lagrangian particles in the Eulerian framework.

Definition at line 417 of file m_bubbles_EL.fpp.f90.

◆ rmin_stats

real(wp), dimension(:), allocatable m_bubbles_el::rmin_stats

Minimum radius.

Definition at line 322 of file m_bubbles_EL.fpp.f90.