Xiangyu-Hu / SPHinXsys

SPHinXsys provides C++ APIs for engineering simulation and optimization. It aims at complex systems driven by fluid, structure, multi-body dynamics and beyond. The multi-physics library is based on a unique and unified computational framework by which strong coupling has been achieved for all involved physics.
https://xiangyu-hu.github.io/SPHinXsys/
Apache License 2.0
321 stars 237 forks source link

Exclusive shape and static confinement boundary condition #316

Open yyc84 opened 1 year ago

yyc84 commented 1 year ago

I finished the exclusive shape part and test successfully; I can get reversed level-set value of a geometry. I add two test cases for this,

  1. One case is the dam break with an exclusive triangle inside, with a normal wall, which means I have two different level-set fields, the triangle one with the reversed value, this case works well.
  2. The other case is a flow-around cylinder, with free stream boundary condition, the cylinder is an exclusive shape with reversed level-set vale. The exclusive shape function works well, but since I don't have FSI algorithm on static confinement boundary conditions, the flow after the cylinder will not flow back, check the picture below.
yyc84 commented 1 year ago

dambreak_with_exclusive_triangle case 1

yyc84 commented 1 year ago

flow_around_cylinder_exclusive_levelset_01 case 2

Xiangyu-Hu commented 1 year ago

It seems that the your handling of the transport velocity formulation for static confinement is not correct.

yyc84 commented 1 year ago

static_confinement_flow_around_cylinder-01 I think I found the problem, with the static_confinement, at the first moment, the particles around the cylinder is defined as surface particles, so it will not apply the transport velocity correction. static_confinement_flow_around_cylinder-02 after run some time, the inner particles are also defined as surface particles

yyc84 commented 1 year ago

I changed the code to implement transport velocity to all the particles around the cylinder, but it still did not work. static_confinement_flow_around_cylinder-03

Xiangyu-Hu commented 1 year ago

@yyc84 you need a right way to indicate the right surface particles so that the particle around the cylinder will not be identified as surface particle.

Xiangyu-Hu commented 1 year ago

the code is here. https://github.com/Xiangyu-Hu/SPHinXsys/blob/383f8b931e7dae1a3873914d6fb0901ad212d972/src/shared/particle_dynamics/fluid_dynamics/fluid_surface_inner.h#L68-L85

yyc84 commented 1 year ago

image I have implemented this time-space method to detect the surface particle; it seems this is not caused by it

yyc84 commented 1 year ago

I think I also need to add the "SpatialTemporalFreeSurfaceIdentificationStaticConfinement" to the static confinement boundary condition, to complete the function with wall part

Xiangyu-Hu commented 2 months ago

@yyc84 what has happened now for this issue?