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, bc_type)
 Initializes the lagrangian subgrid bubble solver.
impure subroutine s_read_input_bubbles (q_cons_vf, bc_type)
 Read initial bubble data from input files.
impure subroutine s_add_bubbles (inputbubble, q_cons_vf, bub_id)
 Add a new bubble from input data for a fresh start.
impure subroutine s_restart_bubbles (bub_id, save_count)
 Restore bubble data from a restart file.
subroutine s_compute_bubble_el_dynamics (q_prim_vf, bc_type, stage)
 Contains the bubble dynamics subroutines.
subroutine s_compute_bubbles_el_source (q_cons_vf, q_prim_vf, rhs_vf)
 Compute the Lagrangian bubble source terms and add them to the RHS.
subroutine s_smear_voidfraction (bc_type)
 Smear the bubble effects onto the Eulerian grid.
subroutine s_get_pinf (bub_id, q_prim_vf, ptype, f_pinfl, cell, preterm1, term2, romega)
 Compute the bubble driving pressure p_inf.
impure subroutine s_update_lagrange_tdv_rk (q_prim_vf, bc_type, stage)
 Update Lagrangian bubble variables using TVD Runge-Kutta time stepping.
impure subroutine s_enforce_el_bubbles_boundary_conditions (q_prim_vf)
subroutine s_locate_cell (pos, cell, scoord)
 Locate the cell index for a given physical position.
impure subroutine s_transfer_data_to_tmp ()
 Transfer data into the temporal variables.
logical function particle_in_domain (pos_part)
 Determine if a bubble position lies within the current MPI subdomain including ghost cells.
logical function particle_in_domain_physical (pos_part)
 Determine if a Lagrangian bubble is within the physical domain excluding ghost cells.
subroutine s_gradient_dir (q, dq, dir)
 Compute the gradient of a scalar field using second-order central differences on a non-uniform grid.
impure subroutine s_write_lag_particles (qtime)
 Write Lagrangian bubble state data at each time step.
impure subroutine s_open_lag_bubble_evol ()
 Open the file to write the evolution of the lagrangian bubbles on each time step.
impure subroutine s_write_lag_bubble_evol (qtime)
 Write on each time step the changes of the lagrangian bubbles.
impure subroutine s_close_lag_bubble_evol
subroutine s_open_void_evol
impure subroutine s_write_void_evol (qtime)
 Write some useful statistics related to the volume fraction of the particles (void fraction).
subroutine s_close_void_evol
impure subroutine s_write_restart_lag_bubbles (t_step)
 Write restart files for the Lagrangian bubble solver.
subroutine s_calculate_lag_bubble_stats ()
 Compute the maximum and minimum radius of each bubble.
impure subroutine s_open_lag_bubble_stats ()
impure subroutine s_write_lag_bubble_stats ()
 Write the maximum and minimum radius of each bubble.
subroutine s_close_lag_bubble_stats
impure subroutine s_copy_lag_bubble (dest, src)
 Copy a lag bubble from a src index to a destination index.
impure subroutine s_finalize_lagrangian_solver ()

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.
real(wp) rmax_glb
real(wp) rmin_glb
 Maximum and minimum bubbe size in the local domain.
type(scalar_field), dimension(:), allocatable q_beta
 Projection of the lagrangian particles in the Eulerian framework.
type(scalar_field), dimension(:), allocatable kahan_comp
 Kahan compensation for q_beta accumulation.
integer q_beta_idx
 Size of the q_beta vector field.
integer, parameter lag_evol_id = 11
integer, parameter lag_stats_id = 12
integer, parameter lag_void_id = 13
integer, dimension(:), allocatable keep_bubble
integer, dimension(:,:), allocatable wrap_bubble_loc
integer, dimension(:,:), allocatable wrap_bubble_dir

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)

Determine if a bubble position lies within the current MPI subdomain including ghost cells.

Definition at line 4207 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)

Determine if a Lagrangian bubble is within the physical domain excluding ghost cells.

Definition at line 4260 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 )

Add a new bubble from input data for a fresh start.

Definition at line 2226 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

Compute the maximum and minimum radius of each bubble.

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

Here is the caller graph for this function:

◆ s_close_lag_bubble_evol()

impure subroutine m_bubbles_el::s_close_lag_bubble_evol

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

Here is the caller graph for this function:

◆ s_close_lag_bubble_stats()

subroutine m_bubbles_el::s_close_lag_bubble_stats

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

Here is the caller graph for this function:

◆ s_close_void_evol()

subroutine m_bubbles_el::s_close_void_evol

Definition at line 4608 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,
type(integer_field), dimension(1:num_dims,1:2), intent(in) bc_type,
integer, intent(in) stage )

Contains the bubble dynamics subroutines.

Definition at line 2486 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 )

Compute the Lagrangian bubble source terms and add them to the RHS.

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

Here is the call graph for this function:

◆ s_copy_lag_bubble()

impure subroutine m_bubbles_el::s_copy_lag_bubble ( integer, intent(in) dest,
integer, intent(in) src )

Copy a lag bubble from a src index to a destination index.

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

Here is the caller graph for this function:

◆ s_enforce_el_bubbles_boundary_conditions()

impure subroutine m_bubbles_el::s_enforce_el_bubbles_boundary_conditions ( type(scalar_field), dimension(sys_size), intent(in) q_prim_vf)

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

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

◆ s_finalize_lagrangian_solver()

impure subroutine m_bubbles_el::s_finalize_lagrangian_solver

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

Here is the call 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 )

Compute the bubble driving pressure p_inf.

Getting p_cell in terms of only the current cell by interpolation

Obtain bilinear interpolation coefficients, based on the current location of the bubble.

Perform bilinear interpolation

Obtain biquadratic interpolation coefficients, based on the current location of the bubble.

Perform biquadratic interpolation

Obtaining the cell volume

Update values

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

Here is the call graph for this function:
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 )

Compute the gradient of a scalar field using second-order central differences on a non-uniform grid.

Definition at line 4276 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,
type(integer_field), dimension(1:num_dims,1:2), intent(in) bc_type )

Initializes the lagrangian subgrid bubble solver.

Definition at line 531 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 )

Locate the cell index for a given physical position.

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

Here is the caller graph for this function:

◆ s_open_lag_bubble_evol()

impure subroutine m_bubbles_el::s_open_lag_bubble_evol

Open the file to write the evolution of the lagrangian bubbles on each time step.

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

Here is the caller graph for this function:

◆ s_open_lag_bubble_stats()

impure subroutine m_bubbles_el::s_open_lag_bubble_stats

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

Here is the caller graph for this function:

◆ s_open_void_evol()

subroutine m_bubbles_el::s_open_void_evol

Definition at line 4506 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,
type(integer_field), dimension(1:num_dims,1:2), intent(in) bc_type )

Read initial bubble data from input files.

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

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

◆ s_restart_bubbles()

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

Restore bubble data from a restart file.

Definition at line 2328 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 ( type(integer_field), dimension(1:num_dims,1:2), intent(in) bc_type)

Smear the bubble effects onto the Eulerian grid.

Definition at line 2973 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

Transfer data into the temporal variables.

Definition at line 4155 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 ( type(scalar_field), dimension(sys_size), intent(in) q_prim_vf,
type(integer_field), dimension(1:num_dims,1:2), intent(in) bc_type,
integer, intent(in) stage )

Update Lagrangian bubble variables using TVD Runge-Kutta time stepping.

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

Here is the call graph for this function:

◆ s_write_lag_bubble_evol()

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

Write on each time step the changes of the lagrangian bubbles.

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

Here is the caller graph for this function:

◆ s_write_lag_bubble_stats()

impure subroutine m_bubbles_el::s_write_lag_bubble_stats

Write the maximum and minimum radius of each bubble.

Definition at line 4831 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)

Write Lagrangian bubble state data at each time step.

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

◆ s_write_restart_lag_bubbles()

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

Write restart files for the Lagrangian bubble solver.

Definition at line 4615 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)

Write some useful statistics related to the volume fraction of the particles (void fraction).

Definition at line 4525 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 397 of file m_bubbles_EL.fpp.f90.

◆ bub_r0

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

Initial bubble radius.

Definition at line 378 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 396 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 395 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 449 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 448 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 394 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 413 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 412 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 446 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 447 of file m_bubbles_EL.fpp.f90.

◆ intfc_rad

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

Bubble radius.

Definition at line 414 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 415 of file m_bubbles_EL.fpp.f90.

◆ kahan_comp

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

Kahan compensation for q_beta accumulation.

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

◆ keep_bubble

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

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

◆ lag_evol_id

integer, parameter m_bubbles_el::lag_evol_id = 11

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

◆ lag_id

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

Global and local IDs.

Definition at line 377 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 465 of file m_bubbles_EL.fpp.f90.

◆ lag_stats_id

integer, parameter m_bubbles_el::lag_stats_id = 12

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

◆ lag_void_id

integer, parameter m_bubbles_el::lag_void_id = 13

Definition at line 500 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 450 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 451 of file m_bubbles_EL.fpp.f90.

◆ mtn_pos

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

Bubble's position.

Definition at line 429 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 430 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 432 of file m_bubbles_EL.fpp.f90.

◆ mtn_vel

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

Bubble's velocity.

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

◆ q_beta

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

Projection of the lagrangian particles in the Eulerian framework.

Definition at line 481 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 483 of file m_bubbles_EL.fpp.f90.

◆ rmax_glb

real(wp) m_bubbles_el::rmax_glb

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

◆ rmax_stats

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

Maximum radius.

Definition at line 379 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.

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

◆ rmin_stats

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

Minimum radius.

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

◆ wrap_bubble_dir

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

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

◆ wrap_bubble_loc

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

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