41 template <EulerModel model = NS>
54 pPhysics[0] =
float_mod(pPhysics[0] - t, 10);
55 pPhysics[1] =
float_mod(pPhysics[1] - t, 10);
56 real r = std::sqrt(
sqr(pPhysics(0) - xyc) +
sqr(pPhysics(1) - xyc));
57 real dT = -(gamma - 1) / (8 * gamma *
sqr(
pi)) *
sqr(chi) * std::exp(1 -
sqr(
r));
58 real dux = chi / 2 /
pi * std::exp((1 -
sqr(
r)) / 2) * -(pPhysics(1) - xyc);
59 real duy = chi / 2 /
pi * std::exp((1 -
sqr(
r)) / 2) * +(pPhysics(0) - xyc);
64 real rho = std::pow(T /
S, 1 / (gamma - 1));
67 real E = 0.5 * (
sqr(ux) +
sqr(uy)) * rho + p / (gamma - 1);
92 template <EulerModel model = NS>
105 pPhysics[0] =
float_mod(pPhysics[0] - t + 10, 30) - 10;
106 pPhysics[1] =
float_mod(pPhysics[1] - t + 10, 30) - 10;
107 real r = std::sqrt(
sqr(pPhysics(0) - xyc) +
sqr(pPhysics(1) - xyc));
108 real dT = -(gamma - 1) / (8 * gamma *
sqr(
pi)) *
sqr(chi) * std::exp(1 -
sqr(
r));
109 real dux = chi / 2 /
pi * std::exp((1 -
sqr(
r)) / 2) * -(pPhysics(1) - xyc);
110 real duy = chi / 2 /
pi * std::exp((1 -
sqr(
r)) / 2) * +(pPhysics(0) - xyc);
115 real rho = std::pow(T /
S, 1 / (gamma - 1));
118 real E = 0.5 * (
sqr(ux) +
sqr(uy)) * rho + p / (gamma - 1);
147 template <EulerModel model = NS>
162 real r = std::sqrt(
sqr(pPhysics(0) - xyc) +
sqr(pPhysics(1) - xyc));
163 real dT = -(gamma - 1) / (8 * gamma *
sqr(
pi)) *
sqr(chi) * std::exp(1 -
sqr(
r));
164 real dux = chi / 2 /
pi * std::exp((1 -
sqr(
r)) / 2) * -(pPhysics(1) - xyc);
165 real duy = chi / 2 /
pi * std::exp((1 -
sqr(
r)) / 2) * +(pPhysics(0) - xyc);
170 real rho = std::pow(T /
S, 1 / (gamma - 1));
173 real E = 0.5 * (
sqr(ux) +
sqr(uy)) * rho + p / (gamma - 1);
Core finite-volume evaluator for compressible Navier-Stokes / Euler equations.
Core finite-volume evaluator for compressible Navier-Stokes / Euler equations.
EulerEvaluatorSettings< model > settings
Physics and numerics settings for this evaluator.
auto IsentropicVortexCent(EulerEvaluator< model > &eval, const Geom::tPoint &x, real t, int cnVars)
Stationary isentropic vortex centered at the origin with zero background flow.
auto IsentropicVortex30(EulerEvaluator< model > &eval, const Geom::tPoint &x, real t, int cnVars)
Analytic isentropic vortex on a [-10,20] x [-10,20] periodic domain (period 30).
auto IsentropicVortex10(EulerEvaluator< model > &eval, const Geom::tPoint &x, real t, int cnVars, real chi)
Analytic isentropic vortex on a [0,10] x [0,10] periodic domain.
DNDS_CONSTANT const real pi
π in double precision (matches DNDS_E_PI macro).
constexpr T sqr(const T &a)
a * a, constexpr. Works for all arithmetic types.
double real
Canonical floating-point scalar used throughout DNDSR (double precision).
real float_mod(real a, real b)
Floating-point modulo matching Python's % (result has sign of b).
Eigen::Matrix wrapper that hides begin/end from fmt.