Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transport Velocity Formulation for EDAC #221

Closed
wants to merge 38 commits into from

Conversation

LasNikas
Copy link
Collaborator

@LasNikas LasNikas commented Sep 9, 2023

The Transport Velocity Formulation (TVF) was first introduced by Adami for the standard WCSPH. Ramachandran applied the TVF for the EDAC method. He suggested to use the standard EDAC for external flow problems and the EDAC TVF for internal flow problems.
Basically the transport velocity is obtained from the momentum velocity at each time step using
image
The challenge here was to swap the integrator $\tilde{u}$ to $u$. Modifying the u vector is only allowed with a callback or a step_limiter!. So, I basically switch v at each time step like

v[ndims(system) + i, particle] = v[i, particle]

To verify this method, I added a few examples.

Channel flow through periodic array of cylinder (Adami 2013)

I'm not really sure if I'm using the right color map. But what's interesting is that the particle arrangement of TP implementation is way better than the one from Adami or Ramachandran.

TP:

image

Adami:

image

Ramachandran:

image

Taylor Green vortex (Ramachandran 2019)

The solid lines (red and lila) are TP's errors. Note, that the error of TP's standard edac scheme is (conspicuously) smaller than the error of the Ramachandran paper.
L1_comparison_quintic

Lid-driven cavity (Adami 2013)

The following plots show the steady velocity field on the horizontal and vertical center line.
Note, I extracted the Ghia data from this figure. So, it is quite inaccurate and not really comparable.
image

Reynolds number 100

horizontal_re_100
vertical_re_100

Reynolds number 1000

horizontal_re_1000
vertical_re_1000

@codecov
Copy link

codecov bot commented Sep 11, 2023

Codecov Report

Attention: 111 lines in your changes are missing coverage. Please review.

Comparison is base (f081bb3) 73.02% compared to head (fc2ad8e) 65.69%.

❗ Current head fc2ad8e differs from pull request most recent head 15ceaeb. Consider uploading reports for the commit 15ceaeb to get more accurate results

Files Patch % Lines
...rc/schemes/fluid/entropically_damped_sph/system.jl 24.35% 59 Missing ⚠️
src/schemes/fluid/entropically_damped_sph/rhs.jl 0.00% 32 Missing ⚠️
src/schemes/fluid/transport_velocity.jl 0.00% 20 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #221      +/-   ##
==========================================
- Coverage   73.02%   65.69%   -7.33%     
==========================================
  Files          58       53       -5     
  Lines        3466     3134     -332     
==========================================
- Hits         2531     2059     -472     
- Misses        935     1075     +140     
Flag Coverage Δ
unit 65.69% <14.61%> (-7.33%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@LasNikas LasNikas marked this pull request as ready for review September 11, 2023 09:09
@svchb
Copy link
Collaborator

svchb commented Sep 28, 2023

I think we should add these types of validation simulation setups including the plots to maybe a separate folder so that these can be reused. Using trixi_include to use the example code in these setups. Might also be a good start for tutorials.

@LasNikas LasNikas added this to the 0.2 milestone Nov 2, 2023
@sloede sloede closed this Mar 5, 2024
efaulhaber pushed a commit that referenced this pull request Oct 30, 2024
* add average pressure

* add transport velocity

* add tvf in rhs

* add update callback

* use `step_limiter!` instead of using a callback

* add taylor green vortex example

* add lid driven cavity example

* add periodic array of cylinder example

* add tests

* add Random package

* reexport `seed!`

* remove obsolet `system_index`

* skip CI

* add callback

* rename edac cache

* move functions to `transport_velocity.jl`

* prepare for wcsph

* calculate volume term on the fly

* adapt example files

* time dependent initial velocity function

* time dependent pressure function

* remove velocity function

* multi dimensional functions

* apply formatter

* fix for open boundaries

* add `UpdateCallback`

* fix typo

* prepare for merge `update-callback`

* fix bug

* fix example

* fix tests

* fix update bug

* apply formatter

* fix test

* minor changes

* add tests

* add docs

* fix tpos

* add configuration check

* add setter for tvf

* fix callback used check

* adapt examples

* minor changes

* clean up

* add tgv validation example

* add ldc validation

* modify validation

* increase `maxiters`

* remove double velocity initialization

* add random displacement

* implement suggestions

* update `NEWS.md`

* remove check for viscosity

* fix tests

* add short tilde description in docs

* remove discarded example from tests

* implement suggestions

* apply formatter

* implement suggestions

* add comment

* fix test
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.

3 participants