How to calculate the boundary normal in DualSPHysics?

Hello everyone,
I'm curious about how to calculate the boundary normal in DualSPHysics. In my opinion, the boundary normal generally calculated by the particle and its neighbour particle(last or next one). Therefore, the boundary particle ID is generally successive which means one by one in the pre-process. But after I pre-process the initial particle distribution with the Generate.exe, the boundary particle ID is not successive. So, I'm curious about how to solve the normal of the particle. Is there an additional code for searching neighbour particles of the boundary particle after the pre-process?
Thank you very much!
Daye

Comments

  • Any suggestions about how to calculate the boundary particle's normal with the parallel frame?
  • Hi @daye_yang,

    I'd like to help but want to make sure I'm understanding you correctly - are you trying to calculate the Surface Normal for each boundary particle in your domain? Or something else?

    If it's surface normals that you want, I don't think the Particle ID will be particularly helpful. But you can get surface normals quickly using ParaView's GenerateSurfaceNormals filter. For example, here's a VTK file showing a simple channel:


    Next, I apply the GenerateSurfaceNormals filter, then select various components to visualize...






    Or I can look at the values in Spreadsheet View:



    And once the normals are calculated, you have access to them as a stored array and can use them in the Calculator filter:


    I'm not sure how the Particle ID distribution relates to your issue, but when I look at the output of GenCase in ParaView, my SomeGencaseParticles.vtk shows particle ID (the "Idp" field) increasing successively from the origin, building up in the Z-direction, then out in the Y-direction before building out in the X-direction. This holds true for particles associated with a particular MK number. Are you certain that your particles aren't building out successively like this?
  • @NWRichmond Thanks for your post ! I didn't know and imagined that Paraview was capable of doing all this stuff ! Thanks.
Sign In or Register to comment.