trixi-framework / Trixi.jl

Trixi.jl: Adaptive high-order numerical simulations of conservation laws in Julia
https://trixi-framework.github.io/Trixi.jl
MIT License
505 stars 98 forks source link

Boundary integration of viscous forces #1893

Closed DanielDoehring closed 3 months ago

DanielDoehring commented 3 months ago

Building upon #1812 this PR adds the viscous drag and lift coefficients due to shear stress.

For the viscous NACA0012 test (changed elixir) we match the values given in https://doi.org/10.1016/j.amc.2017.07.020

for the viscous drag coefficient very well:

Reference: 1.275e−01, Trixi: 1.24758705e-01

For viscous lift: Reference: −3.945e−03 Trixi: -5.66376473e-03

@Arpit-Babbar please have a look!

github-actions[bot] commented 3 months ago

Review checklist

This 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 :heart: by the Trixi.jl community.

DanielDoehring commented 3 months ago

Hm, Aqua.jl errors with

Unbound type parameters detected:
[1] analyze(quantity::Union{typeof(enstrophy), AnalysisSurfaceIntegral{Semidiscretization, Variable}}, du, u, t, semi::SemidiscretizationHyperbolicParabolic) where {Semidiscretization, Variable<:VariableViscous} 
@ Trixi ~/work/Trixi.jl/Trixi.jl/src/callbacks_step/analysis.jl:685
Unbound type parameters: Test Failed at /home/runner/.julia/packages/Aqua/9p8ck/src/unbound_args.jl:28
  Expression: isempty(unbounds)
   Evaluated: isempty(Method[analyze(quantity::Union{typeof(enstrophy), AnalysisSurfaceIntegral{Semidiscretization, Variable}}, du, u, t, semi::SemidiscretizationHyperbolicParabolic) where {Semidiscretization, Variable<:VariableViscous} 
@ Trixi ~/work/Trixi.jl/Trixi.jl/src/callbacks_step/analysis.jl:685])

See

https://docs.juliahub.com/Aqua/Hav67/0.8.4/unbound_args/#Unbound-Type-Parameters

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 96.30%. Comparing base (b4fb1db) to head (36e8f4e).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1893 +/- ## ========================================== + Coverage 89.52% 96.30% +6.78% ========================================== Files 448 448 Lines 35995 36079 +84 ========================================== + Hits 32223 34745 +2522 + Misses 3772 1334 -2438 ``` | [Flag](https://app.codecov.io/gh/trixi-framework/Trixi.jl/pull/1893/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trixi-framework) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/trixi-framework/Trixi.jl/pull/1893/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trixi-framework) | `96.30% <100.00%> (+6.78%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trixi-framework#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

DanielDoehring commented 3 months ago

I added CI tests. Ready to go from my side, the open comments are meant to be explanatory for the reviewers.

DanielDoehring commented 3 months ago

Hm, I do not understand why the testcase does not do the timestepping: https://github.com/trixi-framework/Trixi.jl/actions/runs/8569475328/job/23485450223?pr=1893#step:8:7498 :thinking:

Locally this runs perfectly fine, but in the CI not a single timestep is taken

Arpit-Babbar commented 3 months ago

Hm, I do not understand why the testcase does not do the timestepping: https://github.com/trixi-framework/Trixi.jl/actions/runs/8569475328/job/23485450223?pr=1893#step:8:7498 :thinking:

Locally this runs perfectly fine, but in the CI not a single timestep is taken

Could it be the same issue as this - https://github.com/trixi-framework/Trixi.jl/pull/1812#pullrequestreview-1947432043

The solution is given by Joshua below.

DanielDoehring commented 3 months ago

Could it be the same issue as this - #1812 (review)

The solution is given by Joshua below.

Ah yeah good idea, let's see what happens!