Sense of rotation wrong

I am currently simulating a tank with liquid that is rotating about a point along the z-axis. Rotation axis is the z-axis. The corresponding section in the case definition file is:

    <motion>

      <objreal ref="0">

        <begin mov="1" start="0"/> 

        <mvrotfile id="1" duration="228.77" anglesunits="degrees">

          <file name="RotAngle.dat" />

          <axisp1 x="0" y="0" z="-1" />

          <axisp2 x="0" y="0" z="1" />

        </mvrotfile>

      </objreal>

    </motion>


The angles in the RotAngle.dat file are:

#Time;Degrees

0.0 0.0

11.511392 2.390696

32.217249 6.534739

59.545063 11.823674

73.014075 14.378813

90.5928 17.664224

120.440302 23.202155

155.08958 29.671248

170.825545 59.478171

186.427141 89.073719

193.822516 103.116629

201.133278 117.010829

208.489661 131.006592

212.82906 139.273268

228.774335 129.808819


I would now expect the tank to rotate in a mathematical positive sense (counterclockwise - right-hand-rule) from its initial inclination but when visualizing in paraview I observe that it is rotation clockwise.

Can somebody explain to me what went wrong?

Note: The coordinates of the stl file of the tank and the liquid are all positive. As the rotational centre is at the origin (x=0, y=0) it should work as expected.

Comments

  • Looking through your numbers, I come to the same conclusion, that since the axis goes from p1 to p2, from -1 to 1, then according to right hand rule it should rotate counter clock wise. Could it be that your global coordinate system is turning the other way and it uses that instead?

    Really interested in hearing if there is a small issue in DualSPHysics or that something went wrong in your Paraview visualization

    Kind regards

  • Hi,


    I verified the view point and coordinate system in paraview. It has the x axis pointing to the left, the y axis to the top and hence the z axis shoud point out of the plane towards the observer. A positive rotation should therefore be depicted as a counter clockwise rotation I think.

  • Hi,

    Yes, it should probably rotate in the other direction. However, it cannot be changed now because many old and current examples would no longer work properly.

    We will add a comment to clarify this in the documentation.

    Thanks!

  • I am not author of this topic, but would like to say thank you for adding it to the documentation.

    I have one question though; would it be possible to perhaps atleast add a "toggle", so that one can choose whether or not to use the correct way or the previous buggy one? I would really like to avoid a situation in which I can assume that everything follows right hand rule except this.

    I would also argue that one should not expect examples from a few years ago to still function flawlessly and I believe that doing it right now would be more helpful compared to in a few years having to keep reminding people that they have to use a different coordinate system for rotation in DualSPHysics.

    And to be completely honest I am not sure what coordinate system orientation I would have to use if the rotation became more complex (i.e. rotation around all axes at the same time). This is where I prefer right hand rule, which seems to govern everything else in DualSPHysics.

    Just my two cents, coming from the point of view that I care about the software and I want it to succeed as much as possible :-)

    Kind regards

  • First of all, thank you, jmdalonso, for your reply and your effort you put into this. This is highly appreciated! As short term solution to point out this behaviour in the documentation is great

    I would at this point like to join in to Asalih3d for medium term development. It will help for consistent modelling to use one unique convention that ideally is that most commonly used.

Sign In or Register to comment.