Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
NodeUpdateDerivsMonofluidTVA.cpp File Reference
Include dependency graph for NodeUpdateDerivsMonofluidTVA.cpp:

Go to the source code of this file.

Classes

struct  KernelUpdateDerivsMonofluidTVA< Tvec, SPHKernel, pair_gate >
 TVA ds_j/dt kernel (eq. 51, Hutchison 2018), optionally with the pair gate. More...

Functions

template<class Tscal>
Tscal monofluid_tva_pair_gate (Tscal s_a, Tscal s_b, Tscal g_ab)
 Symmetrized per-pair (upwind) gate of the smooth positivity limiter.

Detailed Description

Function Documentation

◆ monofluid_tva_pair_gate()

template<class Tscal>
Tscal monofluid_tva_pair_gate ( Tscal s_a,
Tscal s_b,
Tscal g_ab )
inline

Symmetrized per-pair (upwind) gate of the smooth positivity limiter.

The flux term of the pair gives ds_a/dt += -(m s_b / 2 rho_b) g_ab and ds_b/dt += +(m s_a / 2 rho_a) g_ab, so for positive s_j it carries s_j from a to b when g_ab > 0 and from b to a when g_ab < 0. The pair is switched off when its upwind (donor) particle has s_j < 0: a particle without dust cannot give dust away.

Both members of the pair take bitwise the same decision (g_ba = -g_ab exactly), except at g_ab = +-0 where the flux term is +-0 whatever the gate, so the dust mass flux stays exactly antisymmetric.

Definition at line 37 of file NodeUpdateDerivsMonofluidTVA.cpp.