Buoyancy Force

edited September 2016 in DualSPHysics_v4.0
Hi

I have modeled a case involving a simple fixed cube, submerged in water.
The force in the z-direction is NEGATIVE!
What is wrong?
Following is the Case_Def:

https://drive.google.com/open?id=0B88w8RZeyGjHY2g4T3pSaEtmNlE
«1

Comments

  • edited September 2016
    If the cube is submerged in water... the force exerted by the fluid onto the solid should be negative, of course!!!! Negative means force in -Z direction

    Regards
  • The force exerted to the solid should be Positive, which is the Buoyancy, acting in the +z direction.
  • edited September 2016
    No. ComputeForces will compute the force experienced by the solid as result of its interaction with the fluid. Also note that in this case you have defined a fixed cube so there is no buoyancy. Now you only have the hydrostatic pressure above the object and this is not going to move...

    In order to compute the buoyancy of the object and to experiment a positive force acting in +Z direction you should have defined the cube as floating box and with density equal or less than water then force will be +Z.

    Alex
  • If you want to test buoyancy, you can define a half-submerged box and with density=500 so that the force exerted by fluid onto the object will be the same as the weight of the submerged part of the box ;)

    You can also try CaseFloatingSphereVal2D and validate numerical results with the ones of reference also used in Canelas et al., 2015
  • I defined the cube as a Floating, with relativeweight=1.3
    The cube did NOT move, BUT

    in this case, the Force in the z direction was POSITIVE!
  • Ok, perfect then.

    Regards
  • Thanks Alex!
    There is a problem.

    In the case of the Floating, the computeforce tool, calculates the Buoyancy Force accurately.
    I extracted the accelerations and masses of the cube, then by summing the m*a(z), the resulting force is not correct.

    I think, the computeforce tool, makes different for floating and non-floating objects.


    Regards
  • "I extracted the accelerations and masses of the cube, then by summing the m*a(z), the resulting force is not correct. "

    But which value of "m" are you using? You should use the one of each floating particle that you can check in the output XML

    Tell me if that is the problem
  • I make series of .csv file, each for one time step. The following code in the batch file:

    %partvtk% -dirin %dirout% -filexml %dirout%/%name%.xml -savecsv %dirout%_mk13/mk13 -onlymk:13 -onlytype:+all -vars:-all,+mk,+mass,+ace

    m is the mass, which is for the floating object, i.e. I used mass of each floating particle.
  • One remark.... you have to use always lattice=1, 1 for fluid and solid
    If not ComputeForces gives wrong results.
  • I have used lattice=1
    The ComputeForces works correct.
    But, by summing the az*mass, the force is NOT correct.
  • I changed relativeweight from 1.3 to 3
    The Force (calculated by the ComputeForces) in the z direction was increased.

    This shows that the force applied to an object by fluid and calculated by ComputeForces, is Not correct.
  • OK, we will check it. You can send the files to us (dualsphysics@gmail.com) and we will run the cases you find those problems.

    The good thing is that for the cases we tested and for the ones we distribute in the package, ComputeForces works ok.

    Thanks
  • I send them by email.
    Thanks
  • In brief, this is the problem for Floating objects.

    By changing the relative density, the exerted force (calculated by ComputeForces tool) applied to the object changes (the density of the object is more than the water that does not move).

    Also the force calculated by summing a*m is different by the force alculated by ComputeForces tool.

    Best Regards
  • By changing the relative density, the exerted force (calculated by ComputeForces tool) applied to the object changes (the density of the object is more than the water that does not move).
    THIS IS OK!

    Also the force calculated by summing a*m is different by the force alculated by ComputeForces tool
    JUST IN CASE YOU ARE DOING STHG STRANGE HERE, HOW DO YOU COMPUTE FORCE ONCE YOU HAVE CSV FILES WITH ACCELERATION?

    I am now running your cases and computing forces to see where the problem comes. Maybe PartVTK is not computing correctly the acceleration of each particle of the floating body
  • Alex!

    Thanks for your quick answers.

    1) The force applied to an object (that does not move) should be independent to its density. Why is this OK?
    2) I extract the mass and accelration of the object at each time step. I have written a simple Matlab code to compute the force (sum(Mass*Acc)) at each time step.

    Regards
  • Hey Alex,

    I got the same question, if a body is inserted a as boundary body, or a moving body, I mean if its movement is not conditioned by the fluid, the forces should be independent of all this right?, like the Force on the wall example on the damm break, in that example I dont see any boundmass defined, but I do see that the fluid and bound have the same mass, where is it defined then?

    Thanks in advance,

    Regards!
  • Mass computation of boundary and fluid particles is explained in the XML guide.
    However computation of mass of floating bodies is obtained starting from relativeweight (or rhopbody or massbody). This is also shown in the XML guide.

    ComputeForces solves the momentum equation, so that, it solves the acceleration value of boundary particles when interacting with neighbouring fluid particles.
    That acceleration is computed using the mass of the boundary and the mass of the fluid. That is why different masses of the floating body (so diffferent masses of the particles of the floating) give rise to different forces

    Regards
  • Hi
    The way that you explained about computing forces applied to a floating body will lead to wrong answers.

    The force calculated MUST be independent of the body mass. By changing the mass, only the gravitational force should be changed. The mass of body for computing the hydraulic forces should remain unchanged.

    I have tested a case which involves some blocks (SPH+DEM). The blocks have much more density than water. The numerical results are not correct compared with experiments.

    This is a bug in your code. When you change the mass of a body, it is clear that the mass of its particle changes. But, this change should not be considered in calculating the hydraulic loads applied to it. The change of mass, should be considered only in gravitational force (w=mg).

    Regards
  • edited September 2016
    What I try to say is what ComputeForces does.
    There is no bug in the code.
    What we should check is ComputeForces or the computation of ACE in PartVTK. But this is a problem of what we are computing during post-processing, not a problem of the SPH solver.

    Regards
  • Thank you Alex!

    Would you mind please tell me how the code computes the motion of a floating object?

    By changing the mass of the object, does the hydraulic forces change (in the SPH solver)?

    Kind Regards
  • Next week we will spend some days checking what you sent and following your issues.
    We will then share it with you so you can help us to solve the problem and we hope we modify the tools with a more physical meaning and correct results

    Thanks

    Alex
  • edited October 2016
    You can check the motion of a floating body in JSphCpuSingle::RunFloating.

    But basically the movement is computed taking into account (a) + (b)
    (a) the summation of the forces of each particle of the floating (these are calculated as interactions with the neighbouring fluid particles)
    PLUS
    (b) its weight: Mass*gravity

    I think that the problem here is that PartVTK and ComputeForces are only computing the part (a) and not (b)

    On the other hand, there is an error in the computation of ACE using PartVTK for floatings since we mimic the implementation in DualSPHysics where we compute forces, not acceleration, so that the ACE values are already forces and there is no need of multiplying buy the value of mass of each floating particle.
    However ComputeForces is ok and give us the result of FORCE directly.

    You can check your resuls, so that, the difference between forces computed with ACE of PartVTK and ComputeForces code is a factor of the mass of each floating particle, right?

    Regards

  • Results from both "ComputeForces" and "ACE from PartVTK", depend on the mass of the object.
    Force calculated by them, are False.
    ----------------------------
    I have doubt in the procedure (a) above. You say that the total force is the summation of force of each particle. I think there is a problem:
    When you increase the mass of the object, the mass of each particle increases. This increase of mass, plays a role in computing the force of the particle. The correct way is that, when you have a floating object, the mass of the each particle must remain the same with the mass of the fluid particle (never change the density of the floating particles).
    After computing the forces from the fluid, the density applies for considering gravity.
    ----------------------------
    I tested a case which involved SPH+DEM. The density of floating object was about 2400 kg/m3. Results were disappointing.
    The cases you mentioned in the tutorial have floating objects with density close to the the density of water.
    ----------------------------

    Kind Regards
  • Dear Amir

    The implementation of floating bodies in our code is correct and has been tested for different cases comparing SPH results with analytical solutions, other CDF models and experimental data.

    We have carried out validation with cases of 600, 900, 1200 and 2540 kg/m^3 as you can find for example in:
    Canelas RB, Domínguez JM, Crespo AJC, Gómez-Gesteira M, Ferreira RML. 2015. A Smooth Particle Hydrodynamics discretization for the modelling of free surface flows and rigid body dynamics. International Journal for Numerical Methods in Fluids, 78: 581-593. doi: 10.1002/fld.4031.

    Once again, we are checking the post-processing tools to check how we are computing force using ComputeForces code and how we are computing ACE in PartVTK.

    If you still have doubst on the procedure of how we compute floating bodies, the best solution will be that you check or code your own implementation.

    Regards

  • Too much thanks!

    I am sure that your code is fantastic and wonderful.

    Please correct the two codes of "ComputeForces" and "ACE from PartVTK" for computing the force exerted to the floating bodies.

    Best Regards
  • edited October 2016
    We have modified the codes so that now:

    PartVTK computes +ace which includes the acceleration as result of interaction with neighbouring fluid particles + Gravity.

    ComputeForces computes only the BUOYANT force exerted onto the floating object, so that, in equilibrium, this force is equal to the WEIGHT of the object. In this case we perform a summation of the accelerations as result of interaction with neighbouring fluid particles and we do not add Gravity.

    We will update the packages soon so you can try this.

    However Amir, you can try first this using:
    https://drive.google.com/file/d/0BwY319ZzjGW9REN5c3ViRjFDdms/view?usp=sharing
    https://drive.google.com/file/d/0BwY319ZzjGW9WWM1U2c4YmN6ZVU/view?usp=sharing
    https://drive.google.com/file/d/0BwY319ZzjGW9bzg0RmZ1UHlObUE/view?usp=sharing

    You can reduce here the number of particles and you can also then play with other cases with different densities
  • Thank Alex
    I will test it.

    Best Regards
  • Thanks Alex,

    I tested the force computation for fixed and moving boundaries against experimental results, and the agreement was quite good, except for some minor oscilations, which I think are normal, but floating bodies were not reviewed.

    In anycase now with the new postprocessors partVTK and ComputeForces, there should be not big differences if they are not floating?, like for example with your force computation in the damm break example.

    Thanks in advance!!
Sign In or Register to comment.