flow 1.4.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
peclet::flow::bindings Namespace Reference

Classes

struct  BoundSolver
struct  BoundAccelerator
struct  Diagnostics
 The developer tier: a view onto one Solver<Grid> (no state of its own). More...

Functions

template<class S>
nb::ndarray< nb::numpy, double > field_out (S &s, std::vector< double > &&v)
std::vector< double > grid_in (nb::ndarray< double, nb::f_contig > a)
int enum_index (const std::string &v, const std::vector< std::string > &names, const char *who, const char *what)
int face_index (const std::string &f, const char *who)
template<class S>
auto field3d_out (S &s, peclet::flow::CCField f)
template<class Grid>
auto traction_force_torque_array (peclet::flow::Solver< Grid > &s)
 The reconstructed-traction loads as the (4, n_instances, 3) array that both of its Python names return: diagnostics.hydro_force_torque_traction() (canonical) and the deprecated hydro_force_torque().
template<class Grid, class C>
void bindSolverSetup (C &cls)
 Solver (and its collocated twin): the diagnostics tier, constructors, domain read-outs, density and viscosity.
template<class Grid, class C>
void bindSolverControls (C &cls)
 Solver (and its collocated twin): time step, body force, advection, decomposition and the pressure / velocity solver controls.
template<class Grid, class C>
void bindSolverState (C &cls)
 Solver (and its collocated twin): state, stepping, velocity and field read-outs.
template<class Grid, class C>
void bindSolverPorousMpi (C &cls)
 Solver (and its collocated twin): ghost width, porous continuity, divergence read-outs and MPI.
template<class Grid, class C>
void bindDiagnosticsPorousMpi (C &cls)
 SolverDiagnostics (and its collocated twin): pressure under-relaxation, porous options, rebalance and broadcast.
template<class Grid, class C>
void bindSolverGeometry (C &cls)
 Solver (and its collocated twin): domain BCs, pressure geometry, scenes, instances, hydrodynamic loads and the solid.
template<class Grid, class C>
void bindDiagnosticsGeometry (C &cls)
 SolverDiagnostics (and its collocated twin): cut-cell and moving-instance instruments, zero-copy field views and the ghost exchange.
template<class Grid, class C>
void bindSolverPhaseChange (C &cls)
 Solver (and its collocated twin): phase change.
template<class Grid, class C>
void bindDiagnosticsPhaseChange (C &cls)
 SolverDiagnostics (and its collocated twin): phase-change options, ledgers and budgets.
template<class Grid, class C>
void bindSolverScalar (C &cls)
 Solver (and its collocated twin): scalar transport.
template<class Grid, class C>
void bindDiagnosticsScalar (C &cls)
 SolverDiagnostics (and its collocated twin): scalar geometry, census, budget and facets.
template<class Grid, class C>
void bindSolverSharpViscous (C &cls)
 Solver (and its collocated twin): sharp viscous interface setter and read-out.
template<class Grid, class C>
void bindDiagnosticsSharpViscous (C &cls)
 SolverDiagnostics (and its collocated twin): sharp viscous interface census and fit.
template<class Grid, class C>
void bindDiagnosticsSolverOptions (C &cls)
 SolverDiagnostics (and its collocated twin): face interpolation, pressure projection and advection switches, outer iterations, velocity solver.
template<class Grid, class C>
void bindDiagnosticsPressure (C &cls)
 SolverDiagnostics (and its collocated twin): momentum and pressure-solver options, pressure instruments, step timers.
template<class Grid, class C>
void bindSolverVof (C &cls)
 Solver (and its collocated twin): VoF colour field, advection, contact angle and wall slip.
template<class Grid, class C>
void bindDiagnosticsVof (C &cls)
 SolverDiagnostics (and its collocated twin): VoF step controls, geometry, contact angle, timing and worklists.
template<class S>
nb::ndarray< nb::numpy, double > vofBlockColourArray (S &s, long id)
template<class S>
nb::ndarray< nb::numpy, double > vofBlockKappaArray (S &s, long id)
template<class Grid, class C>
void bindSolverVofBlocks (C &cls)
 Solver (and its collocated twin): VoF blocks, open boundaries, curvature and surface tension.
template<class Grid, class C>
void bindDiagnosticsVofBlocks (C &cls)
 SolverDiagnostics (and its collocated twin): VoF census, block container, outflow density correction, curvature and CSF instruments.
template<class Grid, class C>
void bindSolverVofMomentum (C &cls)
 Solver (and its collocated twin): VoF momentum and property closures, cell force and drag.
template<class Grid, class C>
void bindDiagnosticsVofForces (C &cls)
 SolverDiagnostics (and its collocated twin): CSF mode, interface width, curvature clips, face density and the VoF momentum scheme.
template<class Grid, class C>
void bindDiagnosticsVofMomentum (C &cls)
 SolverDiagnostics (and its collocated twin): VoF momentum options and read-outs, property and density modes.

Variables

const std::vector< std::string > kFaces {"-x", "+x", "-y", "+y", "-z", "+z"}
const std::vector< std::string > kAxes {"x", "y", "z"}
const std::vector< std::string > kBcTypes {"periodic", "wall", "inflow", "outflow", "slip"}
const std::vector< std::string > kScalarBcTypes {"periodic", "neumann", "dirichlet"}
const std::vector< std::string > kAdvSchemes {"sou", "koren"}
const std::vector< std::string > kScalarSchemes {"fou", "koren", "sou"}
const std::vector< std::string > kScalarWallTypes {"neumann", "dirichlet", "robin"}
const std::vector< std::string > kFluidOnly {"off", "filter", "star"}
const std::vector< std::string > kCsfModes {"face", "cell"}
const std::vector< std::string > kPivots
const std::vector< std::string > kAreaModes
const std::vector< std::string > kBlockAssign {"round-robin", "lpt", "orb"}

Function Documentation

◆ field_out()

template<class S>
nb::ndarray< nb::numpy, double > peclet::flow::bindings::field_out ( S & s,
std::vector< double > && v )
inline

◆ grid_in()

std::vector< double > peclet::flow::bindings::grid_in ( nb::ndarray< double, nb::f_contig > a)
inline

◆ enum_index()

int peclet::flow::bindings::enum_index ( const std::string & v,
const std::vector< std::string > & names,
const char * who,
const char * what )
inline

◆ face_index()

int peclet::flow::bindings::face_index ( const std::string & f,
const char * who )
inline

Definition at line 90 of file flow_bindings_common.hpp.

References enum_index(), and kFaces.

Referenced by bindSolverGeometry(), bindSolverScalar(), and bindSolverVofBlocks().

◆ field3d_out()

template<class S>
auto peclet::flow::bindings::field3d_out ( S & s,
peclet::flow::CCField f )
inline

Definition at line 120 of file flow_bindings_common.hpp.

Referenced by bindDiagnosticsGeometry().

◆ traction_force_torque_array()

template<class Grid>
auto peclet::flow::bindings::traction_force_torque_array ( peclet::flow::Solver< Grid > & s)
inline

The reconstructed-traction loads as the (4, n_instances, 3) array that both of its Python names return: diagnostics.hydro_force_torque_traction() (canonical) and the deprecated hydro_force_torque().

One helper, so the two stay bit-identical.

Definition at line 155 of file flow_bindings_common.hpp.

Referenced by bindDiagnosticsGeometry(), and bindSolverGeometry().

◆ bindSolverSetup()

template<class Grid, class C>
void peclet::flow::bindings::bindSolverSetup ( C & cls)
inline

Solver (and its collocated twin): the diagnostics tier, constructors, domain read-outs, density and viscosity.

Definition at line 18 of file flow_bindings_core.hpp.

Referenced by bind_solver().

◆ bindSolverControls()

template<class Grid, class C>
void peclet::flow::bindings::bindSolverControls ( C & cls)
inline

Solver (and its collocated twin): time step, body force, advection, decomposition and the pressure / velocity solver controls.

Definition at line 156 of file flow_bindings_core.hpp.

References enum_index(), kAdvSchemes, and kAxes.

Referenced by bind_solver().

◆ bindSolverState()

template<class Grid, class C>
void peclet::flow::bindings::bindSolverState ( C & cls)
inline

Solver (and its collocated twin): state, stepping, velocity and field read-outs.

Definition at line 417 of file flow_bindings_core.hpp.

References field_out(), and grid_in().

Referenced by bind_solver().

◆ bindSolverPorousMpi()

template<class Grid, class C>
void peclet::flow::bindings::bindSolverPorousMpi ( C & cls)
inline

Solver (and its collocated twin): ghost width, porous continuity, divergence read-outs and MPI.

Definition at line 548 of file flow_bindings_core.hpp.

Referenced by bind_solver().

◆ bindDiagnosticsPorousMpi()

template<class Grid, class C>
void peclet::flow::bindings::bindDiagnosticsPorousMpi ( C & cls)
inline

SolverDiagnostics (and its collocated twin): pressure under-relaxation, porous options, rebalance and broadcast.

Definition at line 663 of file flow_bindings_core.hpp.

Referenced by bind_diagnostics().

◆ bindSolverGeometry()

template<class Grid, class C>
void peclet::flow::bindings::bindSolverGeometry ( C & cls)
inline

Solver (and its collocated twin): domain BCs, pressure geometry, scenes, instances, hydrodynamic loads and the solid.

Definition at line 18 of file flow_bindings_geometry.hpp.

References enum_index(), face_index(), grid_in(), kBcTypes, and traction_force_torque_array().

Referenced by bind_solver().

◆ bindDiagnosticsGeometry()

template<class Grid, class C>
void peclet::flow::bindings::bindDiagnosticsGeometry ( C & cls)
inline

SolverDiagnostics (and its collocated twin): cut-cell and moving-instance instruments, zero-copy field views and the ghost exchange.

Definition at line 222 of file flow_bindings_geometry.hpp.

References field3d_out(), and traction_force_torque_array().

Referenced by bind_diagnostics().

◆ bindSolverPhaseChange()

template<class Grid, class C>
void peclet::flow::bindings::bindSolverPhaseChange ( C & cls)
inline

Solver (and its collocated twin): phase change.

Definition at line 16 of file flow_bindings_phase_change.hpp.

References grid_in().

Referenced by bind_solver().

◆ bindDiagnosticsPhaseChange()

template<class Grid, class C>
void peclet::flow::bindings::bindDiagnosticsPhaseChange ( C & cls)
inline

SolverDiagnostics (and its collocated twin): phase-change options, ledgers and budgets.

Definition at line 174 of file flow_bindings_phase_change.hpp.

References enum_index(), and kAreaModes.

Referenced by bind_diagnostics().

◆ bindSolverScalar()

template<class Grid, class C>
void peclet::flow::bindings::bindSolverScalar ( C & cls)
inline

Solver (and its collocated twin): scalar transport.

Definition at line 16 of file flow_bindings_scalar.hpp.

References enum_index(), face_index(), field_out(), grid_in(), kScalarBcTypes, kScalarSchemes, kScalarWallTypes, source(), and value().

Referenced by bind_solver().

◆ bindDiagnosticsScalar()

template<class Grid, class C>
void peclet::flow::bindings::bindDiagnosticsScalar ( C & cls)
inline

SolverDiagnostics (and its collocated twin): scalar geometry, census, budget and facets.

Definition at line 195 of file flow_bindings_scalar.hpp.

References field_out().

Referenced by bind_diagnostics().

◆ bindSolverSharpViscous()

template<class Grid, class C>
void peclet::flow::bindings::bindSolverSharpViscous ( C & cls)
inline

Solver (and its collocated twin): sharp viscous interface setter and read-out.

Definition at line 17 of file flow_bindings_sharp_viscous.hpp.

Referenced by bind_solver().

◆ bindDiagnosticsSharpViscous()

template<class Grid, class C>
void peclet::flow::bindings::bindDiagnosticsSharpViscous ( C & cls)
inline

SolverDiagnostics (and its collocated twin): sharp viscous interface census and fit.

Definition at line 45 of file flow_bindings_sharp_viscous.hpp.

References field_out().

Referenced by bind_diagnostics().

◆ bindDiagnosticsSolverOptions()

template<class Grid, class C>
void peclet::flow::bindings::bindDiagnosticsSolverOptions ( C & cls)
inline

SolverDiagnostics (and its collocated twin): face interpolation, pressure projection and advection switches, outer iterations, velocity solver.

Definition at line 18 of file flow_bindings_tuning.hpp.

References enum_index(), peclet::flow::kCaBoth, peclet::flow::kCaMg, peclet::flow::kCaMomentum, and kFluidOnly.

Referenced by bind_diagnostics().

◆ bindDiagnosticsPressure()

template<class Grid, class C>
void peclet::flow::bindings::bindDiagnosticsPressure ( C & cls)
inline

SolverDiagnostics (and its collocated twin): momentum and pressure-solver options, pressure instruments, step timers.

Definition at line 316 of file flow_bindings_tuning.hpp.

Referenced by bind_diagnostics().

◆ bindSolverVof()

template<class Grid, class C>
void peclet::flow::bindings::bindSolverVof ( C & cls)
inline

Solver (and its collocated twin): VoF colour field, advection, contact angle and wall slip.

Definition at line 17 of file flow_bindings_vof.hpp.

References field_out(), and grid_in().

Referenced by bind_solver().

◆ bindDiagnosticsVof()

template<class Grid, class C>
void peclet::flow::bindings::bindDiagnosticsVof ( C & cls)
inline

SolverDiagnostics (and its collocated twin): VoF step controls, geometry, contact angle, timing and worklists.

Definition at line 219 of file flow_bindings_vof.hpp.

References enum_index(), field_out(), and kPivots.

Referenced by bind_diagnostics().

◆ vofBlockColourArray()

template<class S>
nb::ndarray< nb::numpy, double > peclet::flow::bindings::vofBlockColourArray ( S & s,
long id )
inline

Definition at line 18 of file flow_bindings_vof_blocks.hpp.

Referenced by bindSolverVofBlocks().

◆ vofBlockKappaArray()

template<class S>
nb::ndarray< nb::numpy, double > peclet::flow::bindings::vofBlockKappaArray ( S & s,
long id )
inline

Definition at line 37 of file flow_bindings_vof_blocks.hpp.

Referenced by bindDiagnosticsVofBlocks().

◆ bindSolverVofBlocks()

template<class Grid, class C>
void peclet::flow::bindings::bindSolverVofBlocks ( C & cls)
inline

Solver (and its collocated twin): VoF blocks, open boundaries, curvature and surface tension.

Definition at line 56 of file flow_bindings_vof_blocks.hpp.

References enum_index(), face_index(), field_out(), kBlockAssign, value(), and vofBlockColourArray().

Referenced by bind_solver().

◆ bindDiagnosticsVofBlocks()

template<class Grid, class C>
void peclet::flow::bindings::bindDiagnosticsVofBlocks ( C & cls)
inline

SolverDiagnostics (and its collocated twin): VoF census, block container, outflow density correction, curvature and CSF instruments.

Definition at line 358 of file flow_bindings_vof_blocks.hpp.

References field_out(), and vofBlockKappaArray().

Referenced by bind_diagnostics().

◆ bindSolverVofMomentum()

template<class Grid, class C>
void peclet::flow::bindings::bindSolverVofMomentum ( C & cls)
inline

Solver (and its collocated twin): VoF momentum and property closures, cell force and drag.

Definition at line 17 of file flow_bindings_vof_momentum.hpp.

References peclet::flow::ArrheniusMu, peclet::flow::BoussinesqForce, and peclet::flow::LinearMix.

Referenced by bind_solver().

◆ bindDiagnosticsVofForces()

template<class Grid, class C>
void peclet::flow::bindings::bindDiagnosticsVofForces ( C & cls)
inline

SolverDiagnostics (and its collocated twin): CSF mode, interface width, curvature clips, face density and the VoF momentum scheme.

Definition at line 115 of file flow_bindings_vof_momentum.hpp.

References enum_index(), and kCsfModes.

Referenced by bind_diagnostics().

◆ bindDiagnosticsVofMomentum()

template<class Grid, class C>
void peclet::flow::bindings::bindDiagnosticsVofMomentum ( C & cls)
inline

SolverDiagnostics (and its collocated twin): VoF momentum options and read-outs, property and density modes.

Definition at line 223 of file flow_bindings_vof_momentum.hpp.

References field_out().

Referenced by bind_diagnostics().

Variable Documentation

◆ kFaces

const std::vector<std::string> peclet::flow::bindings::kFaces {"-x", "+x", "-y", "+y", "-z", "+z"}
inline

Definition at line 89 of file flow_bindings_common.hpp.

Referenced by face_index().

◆ kAxes

const std::vector<std::string> peclet::flow::bindings::kAxes {"x", "y", "z"}
inline

Definition at line 93 of file flow_bindings_common.hpp.

Referenced by bindSolverControls().

◆ kBcTypes

const std::vector<std::string> peclet::flow::bindings::kBcTypes {"periodic", "wall", "inflow", "outflow", "slip"}
inline

Definition at line 94 of file flow_bindings_common.hpp.

Referenced by bindSolverGeometry().

◆ kScalarBcTypes

const std::vector<std::string> peclet::flow::bindings::kScalarBcTypes {"periodic", "neumann", "dirichlet"}
inline

Definition at line 95 of file flow_bindings_common.hpp.

Referenced by bindSolverScalar().

◆ kAdvSchemes

const std::vector<std::string> peclet::flow::bindings::kAdvSchemes {"sou", "koren"}
inline

Definition at line 96 of file flow_bindings_common.hpp.

Referenced by bindSolverControls().

◆ kScalarSchemes

const std::vector<std::string> peclet::flow::bindings::kScalarSchemes {"fou", "koren", "sou"}
inline

Definition at line 97 of file flow_bindings_common.hpp.

Referenced by bindSolverScalar().

◆ kScalarWallTypes

const std::vector<std::string> peclet::flow::bindings::kScalarWallTypes {"neumann", "dirichlet", "robin"}
inline

Definition at line 98 of file flow_bindings_common.hpp.

Referenced by bindSolverScalar().

◆ kFluidOnly

const std::vector<std::string> peclet::flow::bindings::kFluidOnly {"off", "filter", "star"}
inline

Definition at line 99 of file flow_bindings_common.hpp.

Referenced by bindDiagnosticsSolverOptions().

◆ kCsfModes

const std::vector<std::string> peclet::flow::bindings::kCsfModes {"face", "cell"}
inline

Definition at line 100 of file flow_bindings_common.hpp.

Referenced by bindDiagnosticsVofForces().

◆ kPivots

const std::vector<std::string> peclet::flow::bindings::kPivots
inline
Initial value:
{"volume", "centroid", "projected-centroid",
"contact-line"}

Definition at line 101 of file flow_bindings_common.hpp.

Referenced by bindDiagnosticsVof().

◆ kAreaModes

const std::vector<std::string> peclet::flow::bindings::kAreaModes
inline
Initial value:
{"plic",
"cascade-metric",
"cascade-normal",
"cascade-footprint",
"sheet-color-centroid",
"sheet-color-split",
"sheet-plic-centroid",
"sheet-plic-split"}

Definition at line 103 of file flow_bindings_common.hpp.

Referenced by bindDiagnosticsPhaseChange().

◆ kBlockAssign

const std::vector<std::string> peclet::flow::bindings::kBlockAssign {"round-robin", "lpt", "orb"}
inline

Definition at line 111 of file flow_bindings_common.hpp.

Referenced by bindSolverVofBlocks().