-
Notifications
You must be signed in to change notification settings - Fork 20
Combine PST and TVF into a unified framework #884
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
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
d4f6764
Combine PST and TVF into a unified framework
efaulhaber 6280538
Require update callback for PST
efaulhaber 1f882f6
Fix WCSPH
efaulhaber 8b150bb
Update PST only in callback
efaulhaber fa90ae9
Fix EDAC
efaulhaber 9bdd2d6
Update docs
efaulhaber 13d3268
Fix alle example files
efaulhaber 2a0ae28
Fix tests
efaulhaber b5d1492
Fix periodic channel
efaulhaber 77e20e1
Fix docs
efaulhaber 0209d65
Update news
efaulhaber e8146dc
Fix tests
efaulhaber 844145e
Fix example file
efaulhaber File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -152,8 +152,74 @@ as explained in [Sun2018](@cite Sun2018) on page 29, right above Equation 9. | |
| The ``\delta``-SPH method (WCSPH with density diffusion) together with this formulation | ||
| of PST is commonly referred to as ``\delta^+``-SPH. | ||
|
|
||
| The Particle Shifting Technique can be applied in form | ||
| of the [`ParticleShiftingCallback`](@ref). | ||
| To apply particle shifting, use the keyword argument `shifting_technique` in the constructor | ||
| of a system that supports it. | ||
|
|
||
|
|
||
| ## [Transport Velocity Formulation (TVF)](@id transport_velocity_formulation) | ||
|
|
||
| An alternative formulation is the so-called Transport Velocity Formulation (TVF) | ||
| by [Adami (2013)](@cite Adami2013). | ||
| [Ramachandran (2019)](@cite Ramachandran2019) applied the TVF also for the [EDAC](@ref edac) | ||
| scheme. | ||
|
|
||
| The transport velocity ``\tilde{v}_a`` of particle ``a`` is used to evolve the position | ||
| of the particle ``r_a`` from one time step to the next by | ||
| ```math | ||
| \frac{\mathrm{d} r_a}{\mathrm{d}t} = \tilde{v}_a | ||
| ``` | ||
| and is obtained at every time step ``\Delta t`` from | ||
| ```math | ||
| \tilde{v}_a (t + \Delta t) = v_a (t) + \Delta t \left(\frac{\tilde{\mathrm{d}} v_a}{\mathrm{d}t} - \frac{1}{\rho_a} \nabla p_{\text{background}} \right), | ||
| ``` | ||
| where ``\rho_a`` is the density of particle ``a`` and ``p_{\text{background}}`` | ||
| is a constant background pressure field. | ||
| The tilde in the second term of the right-hand side indicates that the material derivative | ||
| has an advection part. | ||
|
|
||
| The discretized form of the last term is | ||
| ```math | ||
| -\frac{1}{\rho_a} \nabla p_{\text{background}} \approx -\frac{p_{\text{background}}}{m_a} \sum_b \left(V_a^2 + V_b^2 \right) \nabla_a W_{ab}, | ||
| ``` | ||
| where ``V_a``, ``V_b`` denote the volume of particles ``a`` and ``b`` respectively. | ||
| Note that although in the continuous case ``\nabla p_{\text{background}} = 0``, | ||
| the discretization is not 0th-order consistent for **non**-uniform particle distribution, | ||
| which means that there is a non-vanishing contribution only when particles are disordered. | ||
| That also means that ``p_{\text{background}}`` occurs as pre-factor to correct | ||
| the trajectory of a particle resulting in uniform pressure distributions. | ||
| Suggested is a background pressure which is in the order of the reference pressure, | ||
| but it can be chosen arbitrarily large when the time-step criterion is adjusted. | ||
|
|
||
| The inviscid momentum equation with an additional convection term for a particle | ||
| moving with ``\tilde{v}`` is | ||
| ```math | ||
| \frac{\tilde{\mathrm{d}} \left( \rho v \right)}{\mathrm{d}t} = -\nabla p + \nabla \cdot \bm{A}, | ||
| ``` | ||
| where the tensor ``\bm{A} = \rho v\left(\tilde{v}-v\right)^T`` is a consequence | ||
| of the modified advection velocity and can be interpreted as the convection of momentum | ||
| with the relative velocity ``\tilde{v}-v``. | ||
|
|
||
| The discretized form of the momentum equation for a particle ``a`` reads as | ||
| ```math | ||
| \frac{\tilde{\mathrm{d}} v_a}{\mathrm{d}t} = \frac{1}{m_a} \sum_b \left(V_a^2 + V_b^2 \right) \left[ -\tilde{p}_{ab} \nabla_a W_{ab} + \frac{1}{2} \left(\bm{A}_a + \bm{A}_b \right) \cdot \nabla_a W_{ab} \right]. | ||
| ``` | ||
| Here, ``\tilde{p}_{ab}`` is the density-weighted pressure | ||
| ```math | ||
| \tilde{p}_{ab} = \frac{\rho_b p_a + \rho_a p_b}{\rho_a + \rho_b}, | ||
| ``` | ||
| with the density ``\rho_a``, ``\rho_b`` and the pressure ``p_a``, ``p_b`` of particles ``a`` | ||
| and ``b``, respectively. ``\bm{A}_a`` and ``\bm{A}_b`` are the convection tensors | ||
| for particle ``a`` and ``b``, respectively, and are given, e.g., for particle ``a``, | ||
|
Comment on lines
+210
to
+212
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And I added a few commas here. |
||
| as ``\bm{A}_a = \rho v_a\left(\tilde{v}_a-v_a\right)^T``. | ||
|
|
||
| To apply the TVF, use the keyword argument `shifting_technique` in the constructor | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is new. |
||
| of a system that supports it. | ||
|
|
||
| ```@autodocs | ||
| Modules = [TrixiParticles] | ||
| Pages = [joinpath("schemes", "fluid", "shifting_techniques.jl")] | ||
| ``` | ||
|
|
||
|
|
||
| ## [Tensile Instability Control](@id tic) | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that I just copied this section over from EDAC and changed this first paragraph. The rest of the section is unchanged, except for changes like "right hand side" to "right-hand side" and "time-step" to "time step".