WIP: Additional analysis for multi-component Euler systems.#2414
WIP: Additional analysis for multi-component Euler systems.#2414
Conversation
Review checklistThis checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging. Purpose and scope
Code quality
Documentation
Testing
Performance
Verification
Created with ❤️ by the Trixi.jl community. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2414 +/- ##
==========================================
- Coverage 96.36% 87.08% -9.27%
==========================================
Files 527 527
Lines 42559 42629 +70
==========================================
- Hits 41008 37123 -3885
- Misses 1551 5506 +3955
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| @inline function enstrophy(u, equations::CompressibleNavierStokesDiffusion2D; gradients) | ||
| # Enstrophy is 0.5 rho ω⋅ω where ω = ∇ × v | ||
|
|
||
| omega = vorticity(u, gradients, equations) | ||
| return 0.5f0 * u[1] * omega^2 | ||
| end | ||
|
|
||
| @inline function vorticity(u, gradients, equations::CompressibleNavierStokesDiffusion2D) | ||
| @inline function vorticity(u, equations::CompressibleNavierStokesDiffusion2D; gradients) |
There was a problem hiding this comment.
Why different signature compared to old and added functions?
src/callbacks_step/analysis_dg2d.jl
Outdated
| u_local = get_node_vars(u, equations, dg, i, j, element) | ||
| return func(u_local, equations) | ||
| end | ||
| @autoinfiltrate |
There was a problem hiding this comment.
What does that do/why is this needed?
src/callbacks_step/analysis_dg2d.jl
Outdated
| return func(u_local, equations) | ||
| end | ||
| @autoinfiltrate | ||
| if length(m.sig.parameters) == 2 |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Attempt of using existing infrastructure for parabolic terms to compute derivatives.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…-framework/Trixi.jl into sc/analysis_multi_euler_2d
| normalize = normalize) do u, i, j, element, | ||
| equations, dg | ||
| u_local = get_node_vars(u, equations, dg, i, j, element) | ||
| gradients_local = Vector([gradients_x[:, i, j, element], gradients_y[:, i, j, element]]) |
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| gradients_local = Vector([gradients_x[:, i, j, element], gradients_y[:, i, j, element]]) | |
| gradients_local = Vector([ | |
| gradients_x[:, i, j, element], | |
| gradients_y[:, i, j, element] | |
| ]) |
|
|
||
| # Compute the surface flux terms. | ||
| surface_flux_values = similar(u) | ||
| Trixi.calc_surface_integral!(surface_flux_values, u, mesh, equations, dg.surface_integral, dg, cache) |
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| Trixi.calc_surface_integral!(surface_flux_values, u, mesh, equations, dg.surface_integral, dg, cache) | |
| Trixi.calc_surface_integral!(surface_flux_values, u, mesh, equations, | |
| dg.surface_integral, dg, cache) |
| # # Contract D in the ξ̂ (first spatial) direction | ||
| # gradients[v, :, :, elem] .= D * u[v, :, :, elem] | ||
| # # Average over element. |
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| # # Contract D in the ξ̂ (first spatial) direction | |
| # gradients[v, :, :, elem] .= D * u[v, :, :, elem] | |
| # # Average over element. | |
| # # Contract D in the ξ̂ (first spatial) direction | |
| # gradients[v, :, :, elem] .= D * u[v, :, :, elem] | |
| # # Average over element. |
| # gradients[v, :, :, elem] .= D * u[v, :, :, elem] | ||
| # # Average over element. | ||
|
|
||
| average = sum(gradients[v, :, :, elem]/Np^2) |
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| average = sum(gradients[v, :, :, elem]/Np^2) | |
| average = sum(gradients[v, :, :, elem] / Np^2) |
| # # Contract D in the ξ̂ (first spatial) direction | ||
| # gradients[v, :, :, elem] .= u[v, :, :, elem] * D' |
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| # # Contract D in the ξ̂ (first spatial) direction | |
| # gradients[v, :, :, elem] .= u[v, :, :, elem] * D' | |
| # # Contract D in the ξ̂ (first spatial) direction | |
| # gradients[v, :, :, elem] .= u[v, :, :, elem] * D' |
| # gradients[v, :, :, elem] .= u[v, :, :, elem] * D' | ||
|
|
||
| # Average over element. | ||
| average = sum(gradients[v, :, :, elem]/Np^2) |
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| average = sum(gradients[v, :, :, elem]/Np^2) | |
| average = sum(gradients[v, :, :, elem] / Np^2) |
| enstrophy, vorticity | ||
| export entropy, energy_total, energy_kinetic, energy_internal, energy_magnetic, | ||
| cross_helicity, | ||
| enstrophy, magnetic_field, divergence_cleaning_field, enstrophy_multi_euler, vorticity |
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| enstrophy, magnetic_field, divergence_cleaning_field, enstrophy_multi_euler, vorticity | |
| enstrophy, magnetic_field, divergence_cleaning_field, enstrophy_multi_euler, | |
| vorticity |
| end | ||
|
|
||
| @inline function enstrophy_multi_euler(u, gradients, | ||
| equations::CompressibleEulerMulticomponentEquations2D) |
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| equations::CompressibleEulerMulticomponentEquations2D) | |
| equations::CompressibleEulerMulticomponentEquations2D) |
and normal_direction::AbstractVector.
This adds analysis options, like enstrophy for the multicomponent Euler scheme.