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

Boundary Pressure Calculation for FSI #498

Open
wants to merge 70 commits into
base: main
Choose a base branch
from

Conversation

svchb
Copy link
Collaborator

@svchb svchb commented Apr 18, 2024

  • add optional offset
  • use Bernoulli Equation to obtain dynamic pressure contribution

With the new BernoulliPressureExtrapolation on the right side
image

Depends on #599

@svchb svchb requested review from efaulhaber and LasNikas and removed request for efaulhaber April 18, 2024 08:31
Copy link

codecov bot commented Apr 18, 2024

Codecov Report

Attention: Patch coverage is 41.66667% with 21 lines in your changes missing coverage. Please review.

Project coverage is 69.22%. Comparing base (6f3894c) to head (5e478e4).

Files with missing lines Patch % Lines
...chemes/boundary/dummy_particles/dummy_particles.jl 38.23% 21 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #498      +/-   ##
==========================================
- Coverage   69.37%   69.22%   -0.16%     
==========================================
  Files          85       85              
  Lines        5124     5141      +17     
==========================================
+ Hits         3555     3559       +4     
- Misses       1569     1582      +13     
Flag Coverage Δ
unit 69.22% <41.66%> (-0.16%) ⬇️

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.

@svchb svchb mentioned this pull request May 27, 2024
Comment on lines 483 to 493
pressure[particle] += (pressure_offset
+
particle_pressure(v_neighbor_system, neighbor_system,
neighbor)
+
dynamic_pressure(boundary_density_calculator, density_neighbor,
v, v_neighbor_system, particle, neighbor,
system, neighbor_system)
+
dot(resulting_acceleration,
density_neighbor * pos_diff)) * kernel_weight
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pressure[particle] += (pressure_offset
+
particle_pressure(v_neighbor_system, neighbor_system,
neighbor)
+
dynamic_pressure(boundary_density_calculator, density_neighbor,
v, v_neighbor_system, particle, neighbor,
system, neighbor_system)
+
dot(resulting_acceleration,
density_neighbor * pos_diff)) * kernel_weight
# Bernoulli's principle
stagnation_pressure = pressure_offset +
particle_pressure(v_neighbor_system, neighbor_system, neighbor) +
dynamic_pressure(boundary_density_calculator, density_neighbor,
v, v_neighbor_system, particle, neighbor,
system, neighbor_system)
hydraulic_head = dot(resulting_acceleration, density_neighbor * pos_diff)
pressure[particle] += (stagnation_pressure + hydraulic_head) * kernel_weight

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this is now used by both the adami and bernoulli pressure condition? Is this not just confusing?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm it's the same principle. I was wondering if this might increase readability.

docs/src/systems/boundary.md Outdated Show resolved Hide resolved
src/schemes/boundary/dummy_particles/dummy_particles.jl Outdated Show resolved Hide resolved
src/schemes/boundary/dummy_particles/dummy_particles.jl Outdated Show resolved Hide resolved
src/schemes/boundary/dummy_particles/dummy_particles.jl Outdated Show resolved Hide resolved
src/schemes/boundary/dummy_particles/dummy_particles.jl Outdated Show resolved Hide resolved
src/schemes/boundary/dummy_particles/dummy_particles.jl Outdated Show resolved Hide resolved
src/schemes/boundary/dummy_particles/dummy_particles.jl Outdated Show resolved Hide resolved
src/schemes/boundary/dummy_particles/dummy_particles.jl Outdated Show resolved Hide resolved
src/schemes/boundary/dummy_particles/dummy_particles.jl Outdated Show resolved Hide resolved
@svchb svchb requested a review from LasNikas September 27, 2024 11:09
#### 2. [`BernoulliPressureExtrapolation`](@ref)
Identical to [`AdamiPressureExtrapolation`](@ref), but it adds the dynamic pressure component of the Bernoulli equation:
```math
\frac{1}{2} \, \rho_{\text{neighbor}} \left( \frac{ (\mathbf{v}_f - \mathbf{v}_{\text{neighbor}}) \cdot (\mathbf{x}_f - \mathbf{x}_{\text{neighbor}}) }{ \left\| \mathbf{x}_f - \mathbf{x}_{\text{neighbor}} \right\| } \right)^2 \times \text{factor}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. This now doesn't include the sign of the velocity difference. This seems wrong. The pressure should only increase when fluid and solid are moving towards each other, not away from each other, no?
  2. I don't find it very clear where this term is added exactly. Is it just added to the pressure of the Adami method? Is this even a pressure physically?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. what are you talking about? That is the equation:
    ql_e67553e12348838d187ae5fc26861c0b_l3

  2. It has the units of a pressure. Is this a physical pressure no.

```math
\frac{1}{2} \, \rho_{\text{neighbor}} \left( \frac{ (\mathbf{v}_f - \mathbf{v}_{\text{neighbor}}) \cdot (\mathbf{x}_f - \mathbf{x}_{\text{neighbor}}) }{ \left\| \mathbf{x}_f - \mathbf{x}_{\text{neighbor}} \right\| } \right)^2 \times \text{factor}
```
where ``v_f`` is the velocity of the fluid and ``v_\text{body}`` is the velocity of the body.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update this with the new symbols used in the equation.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only unclear because this is only called for a moving body so relative_velocity is v_body-v_fluid_neighbor which is the relative velocity of the fluid to the body movement.

normal_velocity = dot(relative_velocity, pos_diff) / distance

return boundary_density_calculator.factor * density_neighbor *
dot(normal_velocity, normal_velocity) / 2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not what you wrote in the docs, or am I missing something?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above this is identical to the equation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants