-
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
Generalize surface normal calc #539
base: main
Are you sure you want to change the base?
Generalize surface normal calc #539
Conversation
Conflicts: src/schemes/fluid/weakly_compressible_sph/system.jl
…e_surface_normal_calc
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
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.
First review iteration, mostly focused on data structures.
- `correction`: Correction method of the adjacent fluid system (see [Corrections](@ref corrections)). | ||
- `viscosity`: Slip (default) or no-slip condition. See description below for further | ||
information. | ||
- `reference_particle_spacing`: The reference particle spacing used for weighting values at the boundary. |
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 this to the signature above.
- This is completely unclear to me. Isn't this only used for surface tension? Then why is the surface tension not mentioned here?
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.
Its a general value that has nothing todo with surface tension beside being only used there at this time.
surface_tension :: SRFT | ||
surface_normal_method :: SRFN |
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.
Wouldn't it make sense to store the normal method inside the surface tension to avoid cluttering the struct?
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.
While the surface normals are only used for surface tension, at this time, they are never actually called from the actual surface tension model. The surface normal calculation steps are always called from the systems.
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 it is just a struct defining the method, right? There is no per-particle data stored that depends on the system, right? Then I don't see a reason why we couldn't store the normal method in the surface tension. Seems more intuitive to me:
surface_tension = SurfaceTensionWhatever(surface_normal_method=ColorWhateverNormals())
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.
The surface normal calculations can be used in other things than the surface tension.
- Tracking of the interface
- Heatflux between phases
- Free surface boundary conditions
Moving it to surface tension just makes it seem like it somehow depends on anything in surface tension but it actually doesn't. Also you need to actually declare surface normal methods for the solids/boundaries as well but they don't have a surface tension. Declaring normal methods for solids/boundaries is part of #666 since they are needed for the wetting model. These are than also different for elastic solids and rigid solids.
number_density :: Int64 | ||
color :: Int64 |
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 do these need to be here? They are only used when using surface tension, no? Then they would be better off in the cache.
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.
They are currently only needed when a surface normal method is used.
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.
The problem is though that these values are needed for all systems but not all systems have a surface normal or surface tension model activated.
…vchb/TrixiParticles.jlOpen into generalize_surface_normal_calc
Depends on #599
extracted from #584