Floating Body Limit Displacement

edited September 2014 in Old versions
Hi, I would like to know if it is possible to limit the horizontal displacements of a floating object, and if so where in the code should I look to make the necessary changes. My interest is to model the interaction of waves with "moored" object.

Regards,

Mauricio Wesson

Comments

  • You only have to modify the function "RunFloating", there you can also add external forces if you want.

    Regards

    Alex
  • edited October 2014
    i have changed the code to limit the horizontal displacement. i just rough make the horizontal velocity and horizontal displacement be zero. the changes are all in function "RunFloating"

    Regards

    Legend Stone
  • Hi legendstone,

    could you please tell me, which values exactly in the program code you set 0 to limit the displacement?
    for instance if you want to lock the direction x?
    Do you do it where the runfloating function recomputes the values?

    i tried a couple of times to change the followings:
    fvel.x,
    pos->x,
    center.x,
    but it did not work properly...

    all summed up, what i want to achieve is to lock the displacement only in direction x. What i do not want is to lock the rest.

    tanks a lot!
    ktommy2
  • In 'JSphCpuSingle::RunFloating' , my change is below:

    if(Simulate2D){ face.y=0; fomegavel.x=0; fomegavel.z=0; fvel.y=0; }


    //----------------modify--from--legend--vertical-slope--->>>
    face.x=0;
    fomegavel.y=0;
    fvel.x=0;
    //<<<--------------------modify--from--legend--vertical-slope----

    center.x+=dt2*fvel.x;
  • Thanks a lot!
  • Hi,

    i implemented your modification, but i still get some displacement in the X direction (the locked one).

    im trying to build a simulation with a floating body in a pool with a wave generator. The waves are advancing in the x direction, but i want to fix the position along the x axis of the floating body, while it should be able perform a movement in the vertical direction and also rotate around its center of mass.

    Got any ideas?

    thx
    Tomi
Sign In or Register to comment.