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.

Debug Trace

Notice
Cannot assign an empty string to a string offset

#0 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1203): gdn_ErrorHandler(2, 'Cannot assign a...', '/var/www/forums...', 1203, Array)
#1 /var/www/forums-dual-sphysics-org/library/core/class.format.php(958): Gdn_Format::formatMentionsCallback('')
#2 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1292): Gdn_Format::tagContent('@NWRichmond Tha...', 'Gdn_Format::for...')
#3 /var/www/forums-dual-sphysics-org/library/Vanilla/Formatting/Html/HtmlEnhancer.php(59): Gdn_Format::mentions('@NWRichmond Tha...')
#4 /var/www/forums-dual-sphysics-org/library/Vanilla/Formatting/Formats/HtmlFormat.php(74): Vanilla\Formatting\Html\HtmlEnhancer->enhance('@NWRichmond Tha...')
#5 /var/www/forums-dual-sphysics-org/library/Vanilla/Formatting/FormatService.php(34): Vanilla\Formatting\Formats\HtmlFormat->renderHtml('@NWRichmond Tha...')
#6 /var/www/forums-dual-sphysics-org/library/core/class.format.php(769): Vanilla\Formatting\FormatService->renderHTML('@NWRichmond Tha...', 'html')
#7 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1479): Gdn_Format::html('@NWRichmond Tha...')
#8 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(24): Gdn_Format::to('@NWRichmond Tha...', 'Html')
#9 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(170): formatBody(Object(stdClass))
#10 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/comments.php(19): writeComment(Object(stdClass), Object(DiscussionController), Object(Gdn_Session), 3)
#11 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/index.php(53): include('/var/www/forums...')
#12 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(778): include('/var/www/forums...')
#13 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(1382): Gdn_Controller->fetchView('', false, false)
#14 /var/www/forums-dual-sphysics-org/library/core/class.pluggable.php(217): Gdn_Controller->xRender()
#15 /var/www/forums-dual-sphysics-org/applications/vanilla/controllers/class.discussioncontroller.php(310): Gdn_Pluggable->__call('render', Array)
#16 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(862): DiscussionController->index('1548', 'how-to-calculat...', '')
#17 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(279): Gdn_Dispatcher->dispatchController(Object(Gdn_Request), Array)
#18 /var/www/forums-dual-sphysics-org/index.php(29): Gdn_Dispatcher->dispatch()
#19 {main}