mDBC with an stl geometry

Hello all,

Is it possible to implement mDBC with an stl geometry ? I have an issue adding several layers and defining the normals for my geometry.

I want to implement mDBC because floating bodies in my case are falling between the boundary particles and the fluid particles (see screenshot) so I want to avoid this gap. Otherwise, is there any other solutions to avoid this problem ?

Best regards,

Clement B.

Comments

  • Have you tried starting from one box and getting one stl to work? Then scaling up slowly, perhaps that could weed out some issues.

    In my experience mDBC and stl can be combined, but it can be a bit difficult, so have to be patient and always plot the normals in Paraview etc.

    Kind regards

  • Thanks for your answer, as suggested I will try with one box in stl and see how I can implement that.

    However my final geometry contain a curve, do you think implementing curved boundary particles layers with their normals is possible ?

    Best regards


  • Hello, yes, but you should play around with the smoothing length parameter in normal generations section and increase it from 2.0 to something higher.

    Kind regards

  • Hello again,

    The normals are working! However, I can't use the "layers vdp" command in the "drawfilestl" section so I am not able to create the boundary particles layers, how can I implement that ?

    Thanks in advance,

    Regards

    Clement

  • This is unfortunately an area where the options in DualSPHysics are limited. Your best bet is to draw the stl faces directly and have a few different version which all have been shrunk approximately.

    Let me know if you find a better way for layers, of course you can always use fillbox to fill the stl.

    Kind regards

  • Right now your best option can be to use two STL files:

    1) one with the actual geometry that you will use to define the Case_hpd_Actual.vtk that will compute normals

    2) second one that can be created with faces at half dp or less inside the previous one (I think you can use SOLIDIFY transformation of Blender to do that) and this second one will be use to create the particles

    So you have to check if there are normal vectores between the particles generated with 2) that starts from the particles and ends at the position defined in 1)


    Regards

    Alex

  • Hey @Alex ,is your last answer here still the most recent solution to this problem? I'm having the same problem implementing mDBC into my testcase at the moment

  • Managed to solve it by the way, basically the same way Alex described it. You have to create two stl's for each of your boundatries where you scale one of them down a little bit and then follow the mDBC example 04-dambreak

  • Hi @Zwulch,

    I would like to ask, how you solved the additional layers of particles manually constructed in the 04-dambreak case? I tried the trick with two STL. I'm able to obtain normals, but only one layer of boundary particles.

    I start with the import of smaller stl and reset the draw as in case of 04-dambreak example:

    <mainlist>
    <setshapemode>actual | bound</setshapemode>
    <setmkbound mk="0"/>
    <setdrawmode mode="face"/>
    <drawfilestl file="smallerSTL.stl" objname="smallerSTL">
    <drawscale x="0.001"y="0.001" z="0.001" />
    </drawfilestl>
    <shapeout file="hdp" />
    <resetdraw />
    
    

    Then I import the stl with original size:

    <setmkbound mk="0" />
    <setdrawmode mode="full (I have tried face aswell)" />
    <drawfilestl file="originalSTL.stl" objname="originalSTL">
    <drawscale x="0.001" y="0.001" z="0.001" />
    </drawfilestl>
    

    Then add some fluid, etc (simplified as much as possible, just to test this)..

    setmkfluid mk="0"/>
    <setdrawmode mode="solid"/>
    <fillbox x="0" y="0.5" z="0.05" objname="FillBox">
    <modefill>void</modefill>
    <point x="-0.15" y="0.0" z="-0.1" />
    <size x="0.3" y="1.0" z="0.2" />
    </fillbox>
    <shapeout file="" />
    </mainlist>
    

    And then I just call the hdp file to generate normals.

    <normals>
    <distanceh value="2.0" comment="Maximum distance (H*distanceh) to compute normals data (default=2)" />
    <geometryfile file="[CaseName]_hdp_Actual.vtk" comment="File with boundary geometry (VTK format)" />
    <svshapes value="1" comment="Saves VTK with geometry in triangles and quads with its normals for debug (default=0)" />
    </normals>
    

    Normals are ok. Case__Actual.vtk and CaseDamBreak3D_hdp_Actual.vtk seems to be also fine (the gap is at it should be). But additional layers of boundary particles are missing. I thought that is done automatically as in DBC case, as the structure of boundary particles should be the same.

    Could I ask you for a small hint?

Sign In or Register to comment.