-
Notifications
You must be signed in to change notification settings - Fork 10
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
da17b41
to
b82e338
Compare
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 |
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.
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 |
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.
But this is now used by both the adami and bernoulli pressure condition? Is this not just confusing?
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.
Hm it's the same principle. I was wondering if this might increase readability.
Co-authored-by: Erik Faulhaber <[email protected]>
…mi_pressure_changes
#### 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} |
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.
- 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?
- 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?
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.
```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. |
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.
Please update this with the new symbols used in the equation.
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.
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 |
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.
This is not what you wrote in the docs, or am I missing something?
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.
see above this is identical to the equation
With the new BernoulliPressureExtrapolation on the right side
Depends on #599