-
Notifications
You must be signed in to change notification settings - Fork 12
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
Implement Morris surface tension model #584
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 #584 +/- ##
==========================================
- Coverage 70.53% 70.22% -0.31%
==========================================
Files 96 96
Lines 5976 6143 +167
==========================================
+ Hits 4215 4314 +99
- Misses 1761 1829 +68
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Conflicts: src/schemes/fluid/entropically_damped_sph/rhs.jl src/schemes/fluid/entropically_damped_sph/system.jl src/schemes/fluid/weakly_compressible_sph/system.jl test/schemes/fluid/fluid.jl
Conflicts: src/schemes/fluid/entropically_damped_sph/system.jl test/examples/examples.jl
Conflicts: src/schemes/fluid/entropically_damped_sph/system.jl
Conflicts: test/examples/examples.jl
Conflicts: test/examples/examples.jl
|
||
### Features | ||
|
||
- Adds the classic **Continuum Surface Force (CSF)** model based on Morris 2000 (#584), which computes |
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.
Why bold? Nothing else is bold in this file.
|
||
### Artificial (numerical) viscosity | ||
|
||
- Goal: Stabilize the simulation, capture shocks, and prevent unphysical particle interpenetration. |
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.
- What do you mean by unphysical particle interpenetration?
- It should be mentioned that this is mostly used when modeling inviscid flow to stabilize the simulation and not to add physical viscosity. Also that we usually want to add as little artificial viscosity as possible to stabilize the simulation but not to change the physical behavior.
|
||
- Goal: Stabilize the simulation, capture shocks, and prevent unphysical particle interpenetration. | ||
- Method: Adds a dissipative (artificial) term to the momentum equations. | ||
- Typical Use: High-speed flows with strong shocks, astrophysical simulations, or situations where numerical damping is needed for stability. |
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.
Is there any situation where we would use a fluid without any kind of viscosity? If not, the typical use is all simulations where we want to model inviscid flow.
|
||
- Goal: Model the actual viscous stresses of a fluid, aligned with a target Reynolds number or experimentally measured fluid properties. | ||
- Method: Introduces a force consistent with the Navier–Stokes viscous stress term. | ||
- Typical Use: Low-speed, incompressible or weakly compressible flows where matching real fluid behavior is important. |
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.
Artificial viscosity is often used for low-speed weakly compressible flows as well. This is a bit confusing IMO. @LasNikas ?
#### ArtificialViscosityMonaghan | ||
|
||
- Best For: Compressible/high-speed flows, shock capturing, general purpose damping. | ||
- If you need: Stability in challenging flow regimes with potentially large density/pressure variations. | ||
|
||
#### ViscosityMorris | ||
|
||
- Best For: Moderate to low Mach number flows where realistic viscous behavior is desired. | ||
- If you need: Straightforward approach to physical viscosity that still works well in weakly compressible scenarios. | ||
|
||
#### ViscosityAdami | ||
|
||
- Best For: Incompressible or weakly compressible flows requiring accurate shear stress treatment. | ||
- If you need: Good boundary layer representation and accurate laminar flow with minimal compressibility effects. |
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.
Source?
The computed curvature is then used to determine forces acting perpendicular to the interface. | ||
While this method provides accurate surface tension forces, it does not explicitly conserve momentum. | ||
|
||
In the Morris model, surface tension is computed based on local interface curvature ``\kappa`` and the unit surface normal ``\hat{n}``. |
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.
Not sure why the period is put in the next line. Can you maybe slightly reformulate this sentence?
``` | ||
This formulation focuses directly on geometric properties of the interface, making it relatively straightforward to implement when a reliable interface detection | ||
(e.g., a color function) is available. However, accurately estimating ``\kappa`` and ``n`` may require fine resolutions. | ||
--- |
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.
Doesn't render correctly.
@@ -120,32 +187,57 @@ A(r) = \frac{0.007}{h_c^{3.25}} | |||
|
|||
--- | |||
|
|||
### Morris Surface Tension Model | |||
|
|||
The method estimates curvature by combining particle color gradients and smoothing functions to derive surface normals. |
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.
Are color gradients explained somewhere? If so, could you please add a link here?
- ``\hat{n}``: Unit normal vector, | ||
- ``I``: Identity matrix. | ||
|
||
That can be calculated as |
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.
That can be calculated as | |
This divergence can be computed numerically in the SPH framework as |
This model implements the momentum-conserving surface tension approach outlined by | ||
[Morris2000](@cite). It calculates surface tension forces using the gradient of a stress | ||
This model implements the momentum-conserving surface tension approach outlined by Morris | ||
[Morris2000](@cite). It calculates surface tension forces using the divergence of a stress | ||
tensor, ensuring exact conservation of linear momentum. This method is particularly | ||
useful for simulations where momentum conservation is critical, though it may require | ||
numerical adjustments at higher resolutions. |
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 add a link to the surface tension docs section. Also for the other models, which are explained in more details in the docs. This is useful when someone is only looking at the docs within the Julia help.
Depends on #539
Depends on #604
Depends on #605
Depends on #606
Depends on #607
Depends on #608
Depends on #609
Depends on #599
super seeds #523