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

Utilities shared by the Euler-Lagrange bubble and solid-particle solvers: cell location, domain and cell-volume helpers, boundary handling, RK stages and Fornberg gradients. Their file I/O is in m_data_output (writes) and m_start_up (reads). More...

Functions/Subroutines

subroutine, public s_get_lag_restart_point (save_count, qtime)
 Save index and time the run starts from: zero on a fresh start, the restart point otherwise.
impure subroutine, public s_set_lag_comm_coords ()
 Physical coordinates for triggering MPI communication of a Lagrangian entity.
impure subroutine, public s_count_lag_entities_glb (n_loc, n_glb, path)
 Sum the local count n_loc over the ranks into n_glb and abort if no entity lies in the domain.
subroutine, public s_get_cell (s_cell, get_cell)
 Convert computational (real) cell coordinates to integer cell indices.
logical function, public f_lag_entity_in_physical_domain (pos_part)
 True if pos lies in this rank's physical domain (ghost cells excluded).
logical function, public f_lag_entity_in_wall (cell)
 True if cell is a ghost cell beyond one of this rank's wall or symmetry boundaries.
impure subroutine, public s_initialize_lag_gradient (n_weights)
 Allocate the Fornberg first-derivative weights for an n_weights-point stencil and compute them on this rank's grid.
impure subroutine, public s_finalize_lag_gradient ()
 Deallocate the Fornberg first-derivative weights.
subroutine, public s_lag_gradient_dir (q, dq, dir)
 Derivative of a cell-centered field along dir with the precomputed Fornberg finite-difference weights.
impure subroutine s_compute_fornberg_fd_weights (npts)
 Fornberg first-derivative weights at every cell center in each direction, computed once on the host and copied to the device.
subroutine s_fornberg_weights (x0, stencil, npts, m_order, coeffs)
 Fornberg (1988) finite-difference weights at x0 on the given stencil, for derivatives up to m_order.
real(wp) function, public f_lag_rk_stage (u_cur, u_n, rhs, coef)
 One TVD RK stage in the Shu-Osher form of m_time_steppers, from stage value u_cur, step start u_n and stage RHS rhs.
subroutine, public s_apply_lag_entity_domain_bc (dir, pos, pos_prev, offset, keep, wrap_loc)
 Apply this rank's domain boundary in direction dir to one Lagrangian entity at stage position pos (pos_prev before the stage): clamp it offset inside a wall, flag a periodic crossing in wrap_loc (-1 beg, 1 end, else 0), or clear keep once it leaves the domain.
logical function f_is_lag_entity_wall (bc)
 True for the boundary types a Lagrangian entity cannot cross.
impure subroutine, public s_wrap_lag_entities_periodic (n_loc, wrap_loc, pos, pos_prev)
 Shift the entities flagged by s_apply_lag_entity_domain_bc across the periodic domain, both time levels (host data).
subroutine, public s_get_char_vol (cellx, celly, cellz, charwidth, charvol)
 Volume of cell (cellx, celly, cellz); in planar 2D the cell has depth charwidth.

Variables

type(scalar_field), dimension(:), allocatable weights_x_grad
 Fornberg first-derivative weights at each cell center along x, y and z, one field per stencil point.
type(scalar_field), dimension(:), allocatable weights_y_grad
type(scalar_field), dimension(:), allocatable weights_z_grad
integer nweights_grad
 Number of stencil points.
real(wp), parameter void_stat_min = 5.e-11_wp
 Lagrangian volume fraction above which a cell counts in the cloud statistics.

Detailed Description

Utilities shared by the Euler-Lagrange bubble and solid-particle solvers: cell location, domain and cell-volume helpers, boundary handling, RK stages and Fornberg gradients. Their file I/O is in m_data_output (writes) and m_start_up (reads).

Function/Subroutine Documentation

◆ f_is_lag_entity_wall()

logical function m_euler_lagrange::f_is_lag_entity_wall ( integer, intent(in) bc)
private

True for the boundary types a Lagrangian entity cannot cross.

Definition at line 1353 of file m_euler_lagrange.fpp.f90.

Here is the caller graph for this function:

◆ f_lag_entity_in_physical_domain()

logical function, public m_euler_lagrange::f_lag_entity_in_physical_domain ( real(wp), dimension(3), intent(in) pos_part)

True if pos lies in this rank's physical domain (ghost cells excluded).

Definition at line 542 of file m_euler_lagrange.fpp.f90.

Here is the caller graph for this function:

◆ f_lag_entity_in_wall()

logical function, public m_euler_lagrange::f_lag_entity_in_wall ( integer, dimension(3), intent(in) cell)

True if cell is a ghost cell beyond one of this rank's wall or symmetry boundaries.

Definition at line 572 of file m_euler_lagrange.fpp.f90.

Here is the call graph for this function:

◆ f_lag_rk_stage()

real(wp) function, public m_euler_lagrange::f_lag_rk_stage ( real(wp), intent(in) u_cur,
real(wp), intent(in) u_n,
real(wp), intent(in) rhs,
real(wp), dimension(4), intent(in) coef )

One TVD RK stage in the Shu-Osher form of m_time_steppers, from stage value u_cur, step start u_n and stage RHS rhs.

Definition at line 1250 of file m_euler_lagrange.fpp.f90.

◆ s_apply_lag_entity_domain_bc()

subroutine, public m_euler_lagrange::s_apply_lag_entity_domain_bc ( integer, intent(in) dir,
real(wp), intent(inout) pos,
real(wp), intent(in) pos_prev,
real(wp), intent(in) offset,
integer, intent(inout) keep,
integer, intent(out) wrap_loc )

Apply this rank's domain boundary in direction dir to one Lagrangian entity at stage position pos (pos_prev before the stage): clamp it offset inside a wall, flag a periodic crossing in wrap_loc (-1 beg, 1 end, else 0), or clear keep once it leaves the domain.

Definition at line 1280 of file m_euler_lagrange.fpp.f90.

Here is the call graph for this function:

◆ s_compute_fornberg_fd_weights()

impure subroutine m_euler_lagrange::s_compute_fornberg_fd_weights ( integer, intent(in) npts)
private

Fornberg first-derivative weights at every cell center in each direction, computed once on the host and copied to the device.

Definition at line 1112 of file m_euler_lagrange.fpp.f90.

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

◆ s_count_lag_entities_glb()

impure subroutine, public m_euler_lagrange::s_count_lag_entities_glb ( integer, intent(in) n_loc,
integer, intent(out) n_glb,
character(len=*), intent(in) path )

Sum the local count n_loc over the ranks into n_glb and abort if no entity lies in the domain.

Definition at line 475 of file m_euler_lagrange.fpp.f90.

Here is the call graph for this function:

◆ s_finalize_lag_gradient()

impure subroutine, public m_euler_lagrange::s_finalize_lag_gradient

Deallocate the Fornberg first-derivative weights.

Definition at line 862 of file m_euler_lagrange.fpp.f90.

◆ s_fornberg_weights()

subroutine m_euler_lagrange::s_fornberg_weights ( real(wp), intent(in) x0,
real(wp), dimension(npts), intent(in) stencil,
integer, intent(in) npts,
integer, intent(in) m_order,
real(wp), dimension(npts,0:m_order), intent(out) coeffs )
private

Fornberg (1988) finite-difference weights at x0 on the given stencil, for derivatives up to m_order.

Definition at line 1189 of file m_euler_lagrange.fpp.f90.

Here is the caller graph for this function:

◆ s_get_cell()

subroutine, public m_euler_lagrange::s_get_cell ( real(wp), dimension(3), intent(in) s_cell,
integer, dimension(3), intent(out) get_cell )

Convert computational (real) cell coordinates to integer cell indices.

Definition at line 491 of file m_euler_lagrange.fpp.f90.

Here is the caller graph for this function:

◆ s_get_char_vol()

subroutine, public m_euler_lagrange::s_get_char_vol ( integer, intent(in) cellx,
integer, intent(in) celly,
integer, intent(in) cellz,
real(wp), intent(in) charwidth,
real(wp), intent(out) charvol )

Volume of cell (cellx, celly, cellz); in planar 2D the cell has depth charwidth.

Definition at line 1400 of file m_euler_lagrange.fpp.f90.

Here is the caller graph for this function:

◆ s_get_lag_restart_point()

subroutine, public m_euler_lagrange::s_get_lag_restart_point ( integer, intent(out) save_count,
real(wp), intent(out) qtime )

Save index and time the run starts from: zero on a fresh start, the restart point otherwise.

Definition at line 407 of file m_euler_lagrange.fpp.f90.

Here is the caller graph for this function:

◆ s_initialize_lag_gradient()

impure subroutine, public m_euler_lagrange::s_initialize_lag_gradient ( integer, intent(in) n_weights)

Allocate the Fornberg first-derivative weights for an n_weights-point stencil and compute them on this rank's grid.

Definition at line 584 of file m_euler_lagrange.fpp.f90.

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

◆ s_lag_gradient_dir()

subroutine, public m_euler_lagrange::s_lag_gradient_dir ( real(stp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:), intent(in) q,
real(stp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:), intent(out) dq,
integer, intent(in) dir )

Derivative of a cell-centered field along dir with the precomputed Fornberg finite-difference weights.

Definition at line 936 of file m_euler_lagrange.fpp.f90.

◆ s_set_lag_comm_coords()

impure subroutine, public m_euler_lagrange::s_set_lag_comm_coords

Physical coordinates for triggering MPI communication of a Lagrangian entity.

Definition at line 423 of file m_euler_lagrange.fpp.f90.

Here is the caller graph for this function:

◆ s_wrap_lag_entities_periodic()

impure subroutine, public m_euler_lagrange::s_wrap_lag_entities_periodic ( integer, intent(in) n_loc,
integer, dimension(:,:), intent(in) wrap_loc,
real(wp), dimension(:,:,:), intent(inout) pos,
real(wp), dimension(:,:,:), intent(inout) pos_prev )

Shift the entities flagged by s_apply_lag_entity_domain_bc across the periodic domain, both time levels (host data).

Definition at line 1379 of file m_euler_lagrange.fpp.f90.

Variable Documentation

◆ nweights_grad

integer m_euler_lagrange::nweights_grad
private

Number of stencil points.

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

◆ void_stat_min

real(wp), parameter m_euler_lagrange::void_stat_min = 5.e-11_wp
private

Lagrangian volume fraction above which a cell counts in the cloud statistics.

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

◆ weights_x_grad

type(scalar_field), dimension(:), allocatable m_euler_lagrange::weights_x_grad
private

Fornberg first-derivative weights at each cell center along x, y and z, one field per stencil point.

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

◆ weights_y_grad

type(scalar_field), dimension(:), allocatable m_euler_lagrange::weights_y_grad
private

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

◆ weights_z_grad

type(scalar_field), dimension(:), allocatable m_euler_lagrange::weights_z_grad
private

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