How to improve the resolution of a circle when the particle spacing is constant

edited February 2022 in DualSPHysics v5.0

When the particle spacing is given, a circular particle needs to be drawn, but the graph drawn after a given radius is not symmetrical. Is there any way to specify the number of particles on the outermost side of the circle?

@Asalih3d Can you give me some guidance? Thank you very much!


Comments

  • Hi

    Try playing around with the FreeDrawMode option. It would draw a much better circle. From the XML guide:


    The other option is to use a much smaller Dp to represent the circle better.

    Finally a more complex option exists where if you know how to program a bit, you can develop a code outputting xml tags which lets you draw the circle point for point. Please note you do not have full control using this, but finer control than usual in DualSPHysics.

    https://forums.dual.sphysics.org/discussion/2200/drawpoints-at-exact-location#latest

    Kind regards

  • @Asalih3d Your suggestion is very good, I tried to use  FreeDrawMode option before, It does solve the problem, but it should be limited to 3D. If I want to do a two-dimensional simulation, I can't draw a point with this option, because I can draw a three-dimensional sphere with this option, it is difficult to make the particle point on the sphere fall on the intercept plane. Your second suggestion is also very simple and effective. I don't understand the third option. I have seen the link URL you gave, but I still don't understand it very well. Can you be a little more detailed?

  • I am not sure I understand completely, but FreeDrawMode works both in 2D and 3D. In 2D it is simply a slice of the 3D geometry, but perhaps there is a detail I am not catching.

    Third option is basically to use this:

    But then activate FreeDrawMode before drawing the points, so it draws them more freely and not limited to the cartesian grid. You have to play a bit with it to understand. If you get it to work, you can then make some custom external code to generate the geometry for you.

    Kind regards

  • If you need a circle (2D) you can plot a cylinder (3D) and use FreeDrawMode as well

  • Yes! Indeed, this method is effective, I finally understand why the 2D model example that comes with the program uses a cylinder to create the model.

    Best regards!

Sign In or Register to comment.