flow 1.4.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
test_vof_blocks_debris_mpi.cpp File Reference
#include <mpi.h>
#include <algorithm>
#include <array>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <Kokkos_Core.hpp>
#include <vector>
#include "flow_ibm.hpp"
#include "peclet/core/common/types.hpp"
#include "peclet/core/decomp/block_decomposer.hpp"

Go to the source code of this file.

Typedefs

using IbmSolver

Functions

static double sphereFrac (double cx, int x, int y, int z)
static std::vector< double > colour (int m)
static void configure (IbmSolver &s, int ox, int oy, int oz, int lnx, int lny, int lnz)
static std::vector< double > pairColour (int m)
static void configurePair (IbmSolver &s, int lnx, int lny, int lnz, bool bound)
static double sphereFrac3 (const double *c, double r, int x, int y, int z)
static std::array< int, 6 > wallBox (int m)
static std::vector< double > wallColour (int m)
static double wallPsi (int x, int y)
 psi on the z-edge (x, y): zero on both walls, periodic in x with an EXACT wrap (x mod NX).
static void configureWall (IbmSolver &s, int ox, int oy, int lnx, int lny, int lnz)
static std::vector< double > gatherGlobal (const std::vector< double > &local, int ox, int oy, int oz, int lnx, int lny, int lnz, int rank, int size)
static std::vector< double > ledger (IbmSolver &s)
int main (int argc, char **argv)

Variables

static constexpr int NX = 48
static constexpr int NY = 32
static constexpr int NZ = 32
static constexpr std::size_t GCELLS = (std::size_t)NX * NY * NZ
static constexpr double R = 5.0
static constexpr double SIGMA = 320.0
static constexpr double AX = 16.3
static constexpr double BX = 32.3
static constexpr double CY = 16.2
static constexpr double CZ = 16.1
static constexpr int SX = 21
static constexpr int SY0 = 15
static constexpr int SZ = 16
static constexpr double SPECK [3] = {1e-5, 1e-2, 3e-3}
static constexpr double GAMMA = 0.25
static constexpr double DT = 0.05
static const std::array< int, 6 > BOX [2] = {{7, 7, 7, 26, 26, 26}, {18, 7, 7, 41, 26, 26}}
static constexpr double PAX = 18.3
static constexpr double PBX = 26.3
static constexpr double RHO_L = 1.0
static constexpr double RHO_G = 0.1
static const std::array< int, 6 > PBOX [2] = {{9, 7, 7, 28, 26, 26}, {17, 7, 7, 36, 26, 26}}
static constexpr double WR [2] = {5.0, 9.0}
static constexpr double WC [2][3] = {{40.3, 22.2, 16.1}, {20.3, 3.2, 16.1}}
static constexpr double WA = 0.5
static constexpr double WDT = 0.5
static constexpr int WSTEPS = 40
static constexpr int NF = 7

Typedef Documentation

◆ IbmSolver

Definition at line 5663 of file flow_ibm.hpp.

Function Documentation

◆ sphereFrac()

double sphereFrac ( double cx,
int x,
int y,
int z )
static

Definition at line 50 of file test_vof_blocks_debris_mpi.cpp.

References CY, CZ, and R.

Referenced by colour(), gateSolverMetric(), and pairColour().

◆ colour()

std::vector< double > colour ( int m)
static

◆ configure()

void configure ( IbmSolver & s,
int ox,
int oy,
int oz,
int lnx,
int lny,
int lnz )
static

Definition at line 77 of file test_vof_blocks_debris_mpi.cpp.

References BOX, colour(), CY, GAMMA, and SIGMA.

Referenced by main().

◆ pairColour()

std::vector< double > pairColour ( int m)
static

Definition at line 108 of file test_vof_blocks_debris_mpi.cpp.

References PAX, PBOX, PBX, and sphereFrac().

Referenced by configurePair().

◆ configurePair()

void configurePair ( IbmSolver & s,
int lnx,
int lny,
int lnz,
bool bound )
static

Definition at line 117 of file test_vof_blocks_debris_mpi.cpp.

References peclet::flow::LinearMix, pairColour(), PBOX, RHO_G, RHO_L, and SIGMA.

Referenced by main().

◆ sphereFrac3()

double sphereFrac3 ( const double * c,
double r,
int x,
int y,
int z )
static

Definition at line 137 of file test_vof_blocks_debris_mpi.cpp.

Referenced by wallColour().

◆ wallBox()

std::array< int, 6 > wallBox ( int m)
static

Definition at line 149 of file test_vof_blocks_debris_mpi.cpp.

References NY, WC, and WR.

Referenced by configureWall(), main(), and wallColour().

◆ wallColour()

std::vector< double > wallColour ( int m)
static

Definition at line 159 of file test_vof_blocks_debris_mpi.cpp.

References sphereFrac3(), wallBox(), WC, and WR.

Referenced by configureWall(), and main().

◆ wallPsi()

double wallPsi ( int x,
int y )
static

psi on the z-edge (x, y): zero on both walls, periodic in x with an EXACT wrap (x mod NX).

Definition at line 169 of file test_vof_blocks_debris_mpi.cpp.

References NX, NY, and WA.

Referenced by configureWall(), and main().

◆ configureWall()

void configureWall ( IbmSolver & s,
int ox,
int oy,
int lnx,
int lny,
int lnz )
static

Definition at line 175 of file test_vof_blocks_debris_mpi.cpp.

References SIGMA, wallBox(), wallColour(), and wallPsi().

Referenced by main().

◆ gatherGlobal()

std::vector< double > gatherGlobal ( const std::vector< double > & local,
int ox,
int oy,
int oz,
int lnx,
int lny,
int lnz,
int rank,
int size )
static

Definition at line 205 of file test_vof_blocks_debris_mpi.cpp.

References GCELLS, NX, and NY.

Referenced by main().

◆ ledger()

std::vector< double > ledger ( IbmSolver & s)
static

Definition at line 244 of file test_vof_blocks_debris_mpi.cpp.

Referenced by main().

◆ main()

Variable Documentation

◆ NX

int NX = 48
staticconstexpr

Definition at line 42 of file test_vof_blocks_debris_mpi.cpp.

◆ NY

int NY = 32
static

Definition at line 42 of file test_vof_blocks_debris_mpi.cpp.

◆ NZ

int NZ = 32
static

Definition at line 42 of file test_vof_blocks_debris_mpi.cpp.

◆ GCELLS

std::size_t GCELLS = (std::size_t)NX * NY * NZ
staticconstexpr

Definition at line 43 of file test_vof_blocks_debris_mpi.cpp.

◆ R

double R = 5.0
staticconstexpr

Definition at line 44 of file test_vof_blocks_debris_mpi.cpp.

◆ SIGMA

double SIGMA = 320.0
static

◆ AX

double AX = 16.3
static

Definition at line 44 of file test_vof_blocks_debris_mpi.cpp.

Referenced by colour().

◆ BX

double BX = 32.3
static

Definition at line 44 of file test_vof_blocks_debris_mpi.cpp.

Referenced by colour().

◆ CY

double CY = 16.2
static

◆ CZ

double CZ = 16.1
static

Definition at line 44 of file test_vof_blocks_debris_mpi.cpp.

Referenced by bubbleAt(), bubbleAt(), configure(), configure(), and sphereFrac().

◆ SX

int SX = 21
staticconstexpr

Definition at line 45 of file test_vof_blocks_debris_mpi.cpp.

Referenced by colour().

◆ SY0

int SY0 = 15
static

Definition at line 45 of file test_vof_blocks_debris_mpi.cpp.

Referenced by colour().

◆ SZ

int SZ = 16
static

Definition at line 45 of file test_vof_blocks_debris_mpi.cpp.

Referenced by colour().

◆ SPECK

double SPECK[3] = {1e-5, 1e-2, 3e-3}
staticconstexpr

Definition at line 46 of file test_vof_blocks_debris_mpi.cpp.

Referenced by colour(), and main().

◆ GAMMA

double GAMMA = 0.25
staticconstexpr

Definition at line 47 of file test_vof_blocks_debris_mpi.cpp.

Referenced by configure().

◆ DT

double DT = 0.05
static

Definition at line 47 of file test_vof_blocks_debris_mpi.cpp.

◆ BOX

const std::array<int, 6> BOX[2] = {{7, 7, 7, 26, 26, 26}, {18, 7, 7, 41, 26, 26}}
static

Definition at line 48 of file test_vof_blocks_debris_mpi.cpp.

Referenced by colour(), configure(), and main().

◆ PAX

double PAX = 18.3
staticconstexpr

Definition at line 106 of file test_vof_blocks_debris_mpi.cpp.

Referenced by pairColour().

◆ PBX

double PBX = 26.3
static

Definition at line 106 of file test_vof_blocks_debris_mpi.cpp.

Referenced by pairColour().

◆ RHO_L

double RHO_L = 1.0
static

Definition at line 106 of file test_vof_blocks_debris_mpi.cpp.

Referenced by configure(), configure(), configure(), configurePair(), and main().

◆ RHO_G

double RHO_G = 0.1
static

Definition at line 106 of file test_vof_blocks_debris_mpi.cpp.

Referenced by configure(), configure(), configure(), configurePair(), and main().

◆ PBOX

const std::array<int, 6> PBOX[2] = {{9, 7, 7, 28, 26, 26}, {17, 7, 7, 36, 26, 26}}
static

Definition at line 107 of file test_vof_blocks_debris_mpi.cpp.

Referenced by configurePair(), and pairColour().

◆ WR

double WR[2] = {5.0, 9.0}
staticconstexpr

Definition at line 134 of file test_vof_blocks_debris_mpi.cpp.

Referenced by wallBox(), and wallColour().

◆ WC

double WC[2][3] = {{40.3, 22.2, 16.1}, {20.3, 3.2, 16.1}}
static

Definition at line 134 of file test_vof_blocks_debris_mpi.cpp.

Referenced by wallBox(), and wallColour().

◆ WA

double WA = 0.5
staticconstexpr

Definition at line 135 of file test_vof_blocks_debris_mpi.cpp.

Referenced by wallPsi().

◆ WDT

double WDT = 0.5
static

Definition at line 135 of file test_vof_blocks_debris_mpi.cpp.

Referenced by main().

◆ WSTEPS

int WSTEPS = 40
staticconstexpr

Definition at line 136 of file test_vof_blocks_debris_mpi.cpp.

Referenced by main().

◆ NF

int NF = 7
staticconstexpr

Definition at line 243 of file test_vof_blocks_debris_mpi.cpp.

Referenced by main().