dragonfly_sim.utils.farfield_utils
Characteristic (Riemann-invariant) far-field state.
Used by CompressibleEulerModel.define_farfield_bc. It returns the inflow switch along with the state, so the caller can upwind any further transported scalars (turbulence variables) with it. Unlike a fixed free-stream state, it lets outgoing acoustic waves leave the domain: exact at normal incidence, partly reflecting at oblique incidence (see core/farfield.py for the transverse correction).
Functions
|
Subsonic far-field state from the Riemann invariants, and the inflow flag. |
Module Contents
- dragonfly_sim.utils.farfield_utils.riemann_farfield_state(U, n, rho_inf, u_inf, p_inf, gamma, R_in=None)
Subsonic far-field state from the Riemann invariants, and the inflow flag.
With n the outward normal, R+ = u.n + 2c/(g-1) comes from the interior and R- = u.n - 2c/(g-1) from the free stream (or R_in when given):
u.n_b = (R+ + R-)/2, c_b = (g-1)(R+ - R-)/4
Entropy p/rho^g and the tangential velocity are taken from the free stream where u.n_b < 0 (inflow) and from the interior otherwise. A uniform free-stream interior reproduces U_inf exactly. Exact for waves at normal incidence; oblique waves are partly reflected.
U is the mean flow (rho, rho u, rho E). Returns (U_b, inflow).