Skip to content

feat(cfd): mean viscous dissipation rate#438

Merged
nochallenge merged 1 commit into
masterfrom
feat/cfd-mean-dissipation-rate
Jun 8, 2026
Merged

feat(cfd): mean viscous dissipation rate#438
nochallenge merged 1 commit into
masterfrom
feat/cfd-mean-dissipation-rate

Conversation

@nochallenge

Copy link
Copy Markdown
Owner

What

Adds FlowSolution::mean_dissipation_rate(kinematic_viscosity) — the rate at which the flow irreversibly converts kinetic energy to heat by viscosity:

// eps = nu * <|S|^2> = nu * (rms_strain_rate)^2   (m^2/s^3, per unit mass)

Why

The quantity that closes the turbulent energy budget (the Kolmogorov cascade rate) — the CFD lane's first genuine energy diagnostic. Since |S|^2 = 2 S_ij S_ij, eps = 2*nu*<S_ij S_ij>. It is the strain-squared companion to rms_strain_rate (#428), threading it directly. A pure rotation strains nothing and dissipates nothing; only deformation dissipates.

Test

mean_dissipation_rate_is_viscosity_times_strain_squared (5x5 unit grid):

  • (a) worked — pure shear u(y)=gamma*y, |S|=gamma, nu=0.1 -> eps=nu*gamma^2=0.4;
  • (b) threads rms_vorticity (feat(cad): Sneed-Folk maximum-projection sphericity #406) (non-tautological) — for a pure shear |S|=|omega|, so eps = nu*rms_vorticity^2;
  • (c) solid-body rotation -> no strain -> no dissipation (even though it spins);
  • (d) proportional to nu, and zero at nu=0.

Pure method on FlowSolution, no lib.rs change. valenx-cfd-native 129 lib tests (was 128); cargo clippy -p valenx-cfd-native --all-targets -- -D warnings clean. Research-grade turbulence energy-budget diagnostic.

Add FlowSolution::mean_dissipation_rate(kinematic_viscosity), the rate at
which the flow irreversibly converts kinetic energy to heat by viscosity:

  eps = nu * <|S|^2> = nu * (rms_strain_rate)^2   (m^2/s^3, per unit mass)

the quantity that closes the turbulent energy budget (the Kolmogorov
cascade rate). Since |S|^2 = 2 S_ij S_ij, eps = 2*nu*<S_ij S_ij>. It is
the strain-squared companion to rms_strain_rate (#428), threading it
directly. A pure rotation strains nothing and dissipates nothing; only
deformation dissipates.

Analytic test mean_dissipation_rate_is_viscosity_times_strain_squared:
(a) worked: pure shear u(y)=gamma*y, |S|=gamma, nu=0.1 -> eps=nu*gamma^2=0.4;
(b) threads rms_vorticity (#406) (non-tautological): for a pure shear
    |S|=|omega|, so eps = nu*rms_vorticity^2;
(c) solid-body rotation -> no strain -> no dissipation (even though it spins);
(d) proportional to nu, and zero at nu=0.

Pure method on FlowSolution, no lib.rs change. cfd-native 129 lib tests
(was 128), cargo clippy --all-targets -D warnings clean.
@nochallenge nochallenge merged commit 05a526b into master Jun 8, 2026
@nochallenge nochallenge deleted the feat/cfd-mean-dissipation-rate branch June 8, 2026 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant