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.

Home Page:https://www.sphinxsys.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exclusive shape and static confinement boundary condition

yyc84 opened this issue · comments

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.

dambreak_with_exclusive_triangle
case 1

flow_around_cylinder_exclusive_levelset_01
case 2

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

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

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

@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.

the code is here.

template <class FreeSurfaceIdentification>
class SpatialTemporalFreeSurfaceIdentification : public FreeSurfaceIdentification
{
public:
template <typename... ConstructorArgs>
explicit SpatialTemporalFreeSurfaceIdentification(ConstructorArgs &&...args);
virtual ~SpatialTemporalFreeSurfaceIdentification(){};
inline void interaction(size_t index_i, Real dt = 0.0);
void update(size_t index_i, Real dt = 0.0);
protected:
StdLargeVec<int> previous_surface_indicator_;
bool isNearPreviousFreeSurface(size_t index_i);
};
using SpatialTemporalFreeSurfaceIdentificationInner =
SpatialTemporalFreeSurfaceIdentification<FreeSurfaceIndicationInner>;

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

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