multiphase Namespace Reference

AMR-Wind API: amr_wind::multiphase Namespace Reference
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
amr_wind::multiphase Namespace Reference

Functions

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void eulerian_implicit (const int i, const int j, const int k, const int dir, const amrex::Real dtdx, const amrex::Real velL, const amrex::Real velR, amrex::Array4< amrex::Real const > const &volfrac, amrex::Array4< amrex::Real > const &vofL, amrex::Array4< amrex::Real > const &vofR)
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void balance_eulerian_fluxes (const int i, const int j, const int k, const int dir, const amrex::Real dxi, const amrex::Real velL, const amrex::Real velR, amrex::Array4< amrex::Real > const &volfrac, amrex::Array4< amrex::Real const > const &fluxF, amrex::Array4< amrex::Real const > const &fluxC)
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void fluxes_bc_save (const int i, const int j, const int k, const int dir, const amrex::Real disp, amrex::Array4< amrex::Real > const &f_f, amrex::Array4< amrex::Real > const &vofL, amrex::Array4< amrex::Real > const &vofR, amrex::Array4< amrex::Real > const &advalpha_f, amrex::GpuArray< BC, AMREX_SPACEDIM *2 > BCs, const int domlo, const int domhi)
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void c_mask (const int i, const int j, const int k, amrex::Array4< amrex::Real > const &volfrac, amrex::Array4< amrex::Real > const &volfrac_masked)
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void remove_vof_debris (const int i, const int j, const int k, amrex::Array4< amrex::Real > const &volfrac)
 
void split_advection_step (int isweep, int iorder, int nlevels, Field &dof_field, amrex::Vector< amrex::Array< amrex::MultiFab *, AMREX_SPACEDIM > > const &fluxes, ScratchField &fluxC, amrex::Vector< amrex::Array< amrex::MultiFab *, AMREX_SPACEDIM > > const &advas, Field const &u_mac, Field const &v_mac, Field const &w_mac, amrex::GpuArray< BC, AMREX_SPACEDIM *2 > BCs, amrex::Vector< amrex::Geometry > geom, amrex::Real dt, bool rm_debris)
 
void split_compute_fluxes (const int lev, amrex::Box const &bx, const int isweep, amrex::Array4< amrex::Real const > const &volfrac, amrex::Array4< amrex::Real const > const &umac, amrex::Array4< amrex::Real const > const &vmac, amrex::Array4< amrex::Real const > const &wmac, amrex::Array4< amrex::Real > const &aax, amrex::Array4< amrex::Real > const &aay, amrex::Array4< amrex::Real > const &aaz, amrex::Array4< amrex::Real > const &fx, amrex::Array4< amrex::Real > const &fy, amrex::Array4< amrex::Real > const &fz, amrex::GpuArray< BC, AMREX_SPACEDIM *2 > BCs, amrex::Real *p, amrex::Vector< amrex::Geometry > geom, const amrex::Real dt)
 
void split_compute_sum (int lev, amrex::Box const &bx, int isweep, amrex::Array4< amrex::Real > const &volfrac, amrex::Array4< amrex::Real const > const &fluxC, amrex::Array4< amrex::Real const > const &umac, amrex::Array4< amrex::Real const > const &vmac, amrex::Array4< amrex::Real const > const &wmac, amrex::Array4< amrex::Real const > const &fx, amrex::Array4< amrex::Real const > const &fy, amrex::Array4< amrex::Real const > const &fz, amrex::Vector< amrex::Geometry > geom, amrex::Real dt)
 
void cmask_loop (amrex::Box const &bx, amrex::Array4< amrex::Real > const &volfrac, amrex::Array4< amrex::Real > const &fluxC)
 
void debris_loop (amrex::Box const &bx, amrex::Array4< amrex::Real > const &volfrac)
 
void sweep_fluxes (const int dir, amrex::Box const &bx, const amrex::Real dtdx, amrex::Array4< amrex::Real const > const &vel_mac, amrex::Array4< amrex::Real const > const &volfrac, amrex::Array4< amrex::Real > const &vofL, amrex::Array4< amrex::Real > const &vofR)
 
void sweep_balance (const int dir, const amrex::Real dt, const amrex::Real dxi, amrex::Box const &bx, amrex::Array4< amrex::Real const > const &vel_mac, amrex::Array4< amrex::Real > const &volfrac, amrex::Array4< amrex::Real const > const &fluxF, amrex::Array4< amrex::Real const > const &fluxC)
 
static void replace_masked_vof (const int nlevels, amr_wind::IntField &f_iblank, amr_wind::Field &f_vof, amr_wind::Field &f_vof_new)
 
static void hybrid_fluxes (const FieldRepo &repo, const int ncomp, const amrex::Gpu::DeviceVector< int > &iconserv, ScratchField &flux_x, ScratchField &flux_y, ScratchField &flux_z, const Field &dof_field, const Field &dof_nph, const Field &src_term, const Field &rho_o, const Field &rho_nph, const Field &u_mac, const Field &v_mac, const Field &w_mac, amrex::Vector< amrex::BCRec > const &velbc, amrex::BCRec const *velbc_d, amrex::Vector< amrex::BCRec > const &rhobc, amrex::BCRec const *rhobc_d, const amrex::Real dt, godunov::scheme mflux_scheme, bool allow_inflow_on_outflow, bool use_forces_in_trans)
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void youngs_finite_difference_normal (const int i, const int j, const int k, amrex::Array4< amrex::Real const > const &volfrac, amrex::Real &mx, amrex::Real &my, amrex::Real &mz) noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void youngs_finite_difference_normal_neumann (const int i, const int j, const int k, const int ibdy, const int jbdy, const int kbdy, amrex::Array4< amrex::Real const > const &volfrac, amrex::Real &mx, amrex::Real &my, amrex::Real &mz) noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mixed_youngs_central_normal (const int i, const int j, const int k, amrex::Array4< amrex::Real const > const &volfrac, amrex::Real &mx, amrex::Real &my, amrex::Real &mz) noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real volume_intercept (const amrex::Real b1, const amrex::Real b2, const amrex::Real b3, const amrex::Real volF) noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real cut_volume (const amrex::Real m1, const amrex::Real m2, const amrex::Real m3, const amrex::Real alpha, const amrex::Real r0, const amrex::Real dr0) noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void fit_plane (const int i, const int j, const int k, amrex::Array4< amrex::Real const > const &volfrac, amrex::Real &mx, amrex::Real &my, amrex::Real &mz, amrex::Real &alpha)
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool interface_band (const int i, const int j, const int k, amrex::Array4< amrex::Real const > const &volfrac, const int n_band=1) noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real levelset_to_vof (const int i, const int j, const int k, const amrex::Real eps, amrex::Array4< amrex::Real const > const &phi) noexcept
 

Function Documentation

◆ balance_eulerian_fluxes()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amr_wind::multiphase::balance_eulerian_fluxes ( const int i,
const int j,
const int k,
const int dir,
const amrex::Real dxi,
const amrex::Real velL,
const amrex::Real velR,
amrex::Array4< amrex::Real > const & volfrac,
amrex::Array4< amrex::Real const > const & fluxF,
amrex::Array4< amrex::Real const > const & fluxC )

◆ c_mask()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amr_wind::multiphase::c_mask ( const int i,
const int j,
const int k,
amrex::Array4< amrex::Real > const & volfrac,
amrex::Array4< amrex::Real > const & volfrac_masked )

◆ cmask_loop()

void amr_wind::multiphase::cmask_loop ( amrex::Box const & bx,
amrex::Array4< amrex::Real > const & volfrac,
amrex::Array4< amrex::Real > const & fluxC )

◆ cut_volume()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real amr_wind::multiphase::cut_volume ( const amrex::Real m1,
const amrex::Real m2,
const amrex::Real m3,
const amrex::Real alpha,
const amrex::Real r0,
const amrex::Real dr0 )
noexcept

Computes the "CUT VOLUME" V0 given r0, dr0 and m_1*x_1 + m_2*x_2 + m_3*x_3 = alpha (1) move origin to r0 along r ; (2) reflect parallelepiped; (3) limit alpha (0<= al0 <=0.5); (4) order coefficients: b1<b2<b3; (5) calculate volume (NOTE: it is assumed:s0=t0=0; ds0=dt0=1.)

◆ debris_loop()

void amr_wind::multiphase::debris_loop ( amrex::Box const & bx,
amrex::Array4< amrex::Real > const & volfrac )

◆ eulerian_implicit()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amr_wind::multiphase::eulerian_implicit ( const int i,
const int j,
const int k,
const int dir,
const amrex::Real dtdx,
const amrex::Real velL,
const amrex::Real velR,
amrex::Array4< amrex::Real const > const & volfrac,
amrex::Array4< amrex::Real > const & vofL,
amrex::Array4< amrex::Real > const & vofR )

◆ fit_plane()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amr_wind::multiphase::fit_plane ( const int i,
const int j,
const int k,
amrex::Array4< amrex::Real const > const & volfrac,
amrex::Real & mx,
amrex::Real & my,
amrex::Real & mz,
amrex::Real & alpha )

◆ fluxes_bc_save()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amr_wind::multiphase::fluxes_bc_save ( const int i,
const int j,
const int k,
const int dir,
const amrex::Real disp,
amrex::Array4< amrex::Real > const & f_f,
amrex::Array4< amrex::Real > const & vofL,
amrex::Array4< amrex::Real > const & vofR,
amrex::Array4< amrex::Real > const & advalpha_f,
amrex::GpuArray< BC, AMREX_SPACEDIM *2 > BCs,
const int domlo,
const int domhi )

◆ hybrid_fluxes()

static void amr_wind::multiphase::hybrid_fluxes ( const FieldRepo & repo,
const int ncomp,
const amrex::Gpu::DeviceVector< int > & iconserv,
ScratchField & flux_x,
ScratchField & flux_y,
ScratchField & flux_z,
const Field & dof_field,
const Field & dof_nph,
const Field & src_term,
const Field & rho_o,
const Field & rho_nph,
const Field & u_mac,
const Field & v_mac,
const Field & w_mac,
amrex::Vector< amrex::BCRec > const & velbc,
amrex::BCRec const * velbc_d,
amrex::Vector< amrex::BCRec > const & rhobc,
amrex::BCRec const * rhobc_d,
const amrex::Real dt,
godunov::scheme mflux_scheme,
bool allow_inflow_on_outflow,
bool use_forces_in_trans )
static

◆ interface_band()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amr_wind::multiphase::interface_band ( const int i,
const int j,
const int k,
amrex::Array4< amrex::Real const > const & volfrac,
const int n_band = 1 )
noexcept

◆ levelset_to_vof()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real amr_wind::multiphase::levelset_to_vof ( const int i,
const int j,
const int k,
const amrex::Real eps,
amrex::Array4< amrex::Real const > const & phi )
noexcept

◆ mixed_youngs_central_normal()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amr_wind::multiphase::mixed_youngs_central_normal ( const int i,
const int j,
const int k,
amrex::Array4< amrex::Real const > const & volfrac,
amrex::Real & mx,
amrex::Real & my,
amrex::Real & mz )
noexcept

◆ remove_vof_debris()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amr_wind::multiphase::remove_vof_debris ( const int i,
const int j,
const int k,
amrex::Array4< amrex::Real > const & volfrac )

◆ replace_masked_vof()

static void amr_wind::multiphase::replace_masked_vof ( const int nlevels,
amr_wind::IntField & f_iblank,
amr_wind::Field & f_vof,
amr_wind::Field & f_vof_new )
static

◆ split_advection_step()

void amr_wind::multiphase::split_advection_step ( int isweep,
int iorder,
int nlevels,
Field & dof_field,
amrex::Vector< amrex::Array< amrex::MultiFab *, AMREX_SPACEDIM > > const & fluxes,
ScratchField & fluxC,
amrex::Vector< amrex::Array< amrex::MultiFab *, AMREX_SPACEDIM > > const & advas,
Field const & u_mac,
Field const & v_mac,
Field const & w_mac,
amrex::GpuArray< BC, AMREX_SPACEDIM *2 > BCs,
amrex::Vector< amrex::Geometry > geom,
amrex::Real dt,
bool rm_debris )

◆ split_compute_fluxes()

void amr_wind::multiphase::split_compute_fluxes ( const int lev,
amrex::Box const & bx,
const int isweep,
amrex::Array4< amrex::Real const > const & volfrac,
amrex::Array4< amrex::Real const > const & umac,
amrex::Array4< amrex::Real const > const & vmac,
amrex::Array4< amrex::Real const > const & wmac,
amrex::Array4< amrex::Real > const & aax,
amrex::Array4< amrex::Real > const & aay,
amrex::Array4< amrex::Real > const & aaz,
amrex::Array4< amrex::Real > const & fx,
amrex::Array4< amrex::Real > const & fy,
amrex::Array4< amrex::Real > const & fz,
amrex::GpuArray< BC, AMREX_SPACEDIM *2 > BCs,
amrex::Real * p,
amrex::Vector< amrex::Geometry > geom,
const amrex::Real dt )

◆ split_compute_sum()

void amr_wind::multiphase::split_compute_sum ( int lev,
amrex::Box const & bx,
int isweep,
amrex::Array4< amrex::Real > const & volfrac,
amrex::Array4< amrex::Real const > const & fluxC,
amrex::Array4< amrex::Real const > const & umac,
amrex::Array4< amrex::Real const > const & vmac,
amrex::Array4< amrex::Real const > const & wmac,
amrex::Array4< amrex::Real const > const & fx,
amrex::Array4< amrex::Real const > const & fy,
amrex::Array4< amrex::Real const > const & fz,
amrex::Vector< amrex::Geometry > geom,
amrex::Real dt )

◆ sweep_balance()

void amr_wind::multiphase::sweep_balance ( const int dir,
const amrex::Real dt,
const amrex::Real dxi,
amrex::Box const & bx,
amrex::Array4< amrex::Real const > const & vel_mac,
amrex::Array4< amrex::Real > const & volfrac,
amrex::Array4< amrex::Real const > const & fluxF,
amrex::Array4< amrex::Real const > const & fluxC )

◆ sweep_fluxes()

void amr_wind::multiphase::sweep_fluxes ( const int dir,
amrex::Box const & bx,
const amrex::Real dtdx,
amrex::Array4< amrex::Real const > const & vel_mac,
amrex::Array4< amrex::Real const > const & volfrac,
amrex::Array4< amrex::Real > const & vofL,
amrex::Array4< amrex::Real > const & vofR )

◆ volume_intercept()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real amr_wind::multiphase::volume_intercept ( const amrex::Real b1,
const amrex::Real b2,
const amrex::Real b3,
const amrex::Real volF )
noexcept

◆ youngs_finite_difference_normal()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amr_wind::multiphase::youngs_finite_difference_normal ( const int i,
const int j,
const int k,
amrex::Array4< amrex::Real const > const & volfrac,
amrex::Real & mx,
amrex::Real & my,
amrex::Real & mz )
noexcept

Young's finite-difference gradient scheme.

The gradient is computed with a multiplicative factor of -32:

\[ mm = - 32 * \grad (c) \]

Known problems: the index (1,1,1), i.e. the central cell in the block, never occurs: Therefore an isolated droplet will have a normal with all components to zero.

◆ youngs_finite_difference_normal_neumann()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amr_wind::multiphase::youngs_finite_difference_normal_neumann ( const int i,
const int j,
const int k,
const int ibdy,
const int jbdy,
const int kbdy,
amrex::Array4< amrex::Real const > const & volfrac,
amrex::Real & mx,
amrex::Real & my,
amrex::Real & mz )
noexcept