Instability and strange rotating behavior with laminar+SPS viscosity treatment

edited September 2016 in DualSPHysics_v4.0
Hi developers and community,

I am actually trying to reproduce the Drafting Kissing Tumbling testcase with DualSPHysics. To start with the problem, I was trying to simulate the FloatingSphereVal2D testcase. This works very good now, after the support helped me to correctly interpret the results.

I then wanted to set up another geometry as a first step to the DKT-Case. It was working good with the artificial viscosity and some tuning of the smoothing distance, dp and alpha. However, to ensure reproducibility I need to use the second viscosity treatment model (laminar+SPS). With that, there are 2 mayor problems occurring to me:

1. Instability: I need to decrease CFL-number and both initial and minimum time step to get the case actually running. I think I still miss something that needs to be tuned in order to perform a stable simulation. But I couldn't figure out that yet. Are there any suggestions?

2. Strange Rotation behavior: The rigid sphere does not start to sink but starts to rotate rapidly, which is not as intended.

XML-file: https://drive.google.com/file/d/0BzcDoyczMzy8SnUwM0xySXdaaDg
Animation: https://drive.google.com/file/d/0BzcDoyczMzy8a21mY0JMaXZoOUU

Update 29.09.16: It is runing stable at the moment with CFL=0.05 as we found out in Thread "http://www.dual.sphysics.org/index.php/forums1/#/discussion/791/pipe-flow-with-floating-particles-error-after-dp-decrease". Lets see how physical the solution will be. (Coefdtmin needs to be lowered as well in some cases!)

Comments

  • edited September 2016
    1) Looking to Case.out you can read:

    Maximum depth: 0.06 (fixed)
    Speed of system: 0.15 (fixed)
    Speed of sound: max(coefsound*speedsystem,10*sqrt(g*depth))
    Speed of sound: 7.67203 max(1.5,7.67203)

    so you are specifying hswl (no need) and speedsystem=0.15, however we will finally use a higher speed of sound.

    Then you want to specify your speed of sound, the best option is using:
    speedsound value="XXXX" auto="false"
    where XXXX is the value you want.

    2) Looking to Run.out you can read:
    DtIni=1e-006
    DtMin=1e-007
    since you have imposed those values in the XML

    I guess that default values (DtIni=h/Cs) gives you the error of floating moving so fast and it was excluded, right?

    The best option can be increasing your SPEED OF SOUND

    Please see also my last comment about this in:
    http://www.dual.sphysics.org/index.php/forums1/#/discussion/791/pipe-flow-with-floating-particles-error-after-dp-decrease


  • edited September 2016
    Hey Alex, thanks for your fast response!

    about 1)
    I reallized, that it uses 7.67203 here anyway. I allready set everything to auto="true" again. I will change the speed of sound directly in the future, instead of changing each and every calculation parameters. Thanks for this suggestion.

    about 2)
    Changing those values led to a more stable, but not a more physical solution. However I noticed, that lowering CFL and CoefDtMin instead is more expedient. So maybe DtIni is not the real cause in this case?
    I will try a higher speed of sound value for all the cases and let you know the results.

    About the comment in the pipe-flow thread:
    The error says in my case "particle boundary out> type:Floating cause:Position p:0 id:1689 pos:(0.020011,0.000000,0.021310)" so the cause is not speed here. Particle with id:1689 belongs to the floating object.

    Thanks and best regards
  • edited September 2016
    I played arround with c0 and it didn't change the solution that much.

    I just made a strange mistake which led to a nearly perfect fitting (comparing to results of the literature) curve without rotation and other strange effects: I accidently changed the viscosity to 0. I checked the Run.out file, and it also states that the viscosity is 0. So no default value is used instead, is that right?
  • If you define visco=0 then that value is used! Why do you think that a default value will be used instead of that?
    I am not sure what you meant

    Alex
  • Hello Alex,

    I only wanted to be sure. In my case the solution of this floating body problem does only fit the literature results if viscosity is (basically) switched off. With higher viscosity values, the sedimentation velocity of the cylinder is very slow. However, calculations lead to a proper solution when the artificial viscosity formulation is used (but alpha needs to be tuned a lot).

    I'm still trying to find out if I am applying errors or if the laminar+SPS viscosity formulation leads to wrong results in some cases.
  • Hey Basti,

    a hint from my side. In your xml-file you disabled the shifting algorithm. Enable it, I had a similiar issue and this helped a lot.

    parameter key="Shifting" value="2" comment="Shifting mode 0:None, 1:Ignore bound, 2:Ignore fixed, 3:Full (default=0)"
    parameter key="ShiftCoef" value="-2" comment="Coefficient for shifting computation (default=-2)" />
    parameter key="ShiftTFS" value="0" comment="Threshold to detect free surface. Typically 1.5 for 2D and 2.75 for 3D. Set to 0 for internal flows (default=0)"

    These parameters are taken from the MovingSquare Case.

  • edited October 2016
    Hey RCBE,

    the simulations are running stable and the rotation is gone with decreasing the CFL number and CoefDtMin. However, the sedimentation velocity is way to slow in the solution. Enabling the shifting algorithm doesn't help with this problem, I tested different combinations.

    The only solution was so far to set viscosity to 0. But this can't be the right solution, as I want to specify the physical velocity in my simulations, thats why I had moved from artificial to laminar viscosity formulation. It seems that the damping is way to high in this problem. It was working well in the CASEFLOATING Testcase but is not in this one, with smaller geometric dimensions.
  • edited October 2016
    Dear Basti,

    Please try now with this modified version of the XML file:
    https://drive.google.com/file/d/0BwY319ZzjGW9aENXTVNsQ3duTTA/view?usp=sharing

    And try both viscosity treatments:
    1) laminar+SPS
    "ViscoTreatment" ="2"
    "Visco" ="0.000001"
    2) artificial
    "ViscoTreatment" ="1"
    "Visco" ="0.01"

    Regards
  • Dear Alex,

    thank you very much for helping me figure out the source of the nonphysical solutions. I already tested many different settings before and compared them with the results optained by your changes in the .xml.

    The artificial setting was running stable, without rotations and the solution is near to the literature results. Lowering alpha to 0.005 leads to the best solution in this case for dp=0.0001.
    The laminar+SPS setting gave a nonphysical solution with rotations again. (I decreased CFL and CoefDtMin, to check if the rotation vanishes, but the simulation is still runing).

    Please find attached a quick plot of the results for different dp and visco values. (2) and (4) are the ones using your modified XML file. (I also tested different smoothing distances, c0-values, shifting, stepAlgorithms and Kernels without success)
    https://drive.google.com/open?id=0BzcDoyczMzy8SzBvTWFUX3BmMnM

    Thank you and best regards
  • Solution (3) seems to give the best resutls!

    The advantages of using laminar+SPS is that you are using a physical viscosity equation, however, in practise, the use of artificial viscosity with the correct alpha value always help to perform validations!

    Regards
  • edited October 2016
    Dear Alex,

    Thanks again for your answer. Yes, you are correct, Solution (3) gives the best results (Like mentioned in the first post in this thread) But the big problem here is, that I needed to perform lots of different combinations of h, c0, alpha, CFL... to get this fitting results. It was unpredictable which result would be fitting with the literatures results and what value of alpha is the correct one. (I have found an equation to calculate alpha with physical viscosity, c0 and h, but it didn't agree with the observations I made in DualSPHysics). That solution (3) gives the best results was only a coincidence. And this is only a simple test case. In more complex applications, I would need another set of parameters, especially of alpha, to obtain realistic behaviour. Another problem that I see comes with a dependency of the simulation on a physical viscosity value.

    Because of all that issues my aim was to use the laminar+SPS viscosity model and therefore one parameter less that needs to be tuned (alpha) and also a more phisical simulation (if the fluid behaviour depends on a phisical viscosity value). But the problem here was, that I was not able to obtain a correct solution with laminar viscosity(+The rotation issue and instability, but that was solved with lower time steps).

    To summarise this: I was not able to find a correct alpha value that reflects a physically correct viscosity behaviour of the fluid, except testing arround until it fits with the artificial viscosity parameter alpha.
    So the main question here still remains: How to find out the correct alpha value that reflects a phisical viscosity if the laminar viscosity formulation is not working? I really would like to find out how you are normally solving this issue for your simulations. That would help me alot! :)

    Best Regards
  • For viscosity values, in our experience we found that:

    - For applications in water tanks like wave propagation and interaction with structures we allways use ARTIFICIAL VISCOSITY WTH 0.01 which give us very good validation with different experimental results as shown in:
    http://dual.sphysics.org/index.php/validation/zeebrugge/
    http://dual.sphysics.org/index.php/validation/force-loads/

    - For floating bodies under the interaction with waves, ARTIFICIAL VISCOSITY WTH alpha=0.01 also give us good validation with experiments:
    http://dual.sphysics.org/index.php/validation/wavesfloatings/

    - For dam-break or sloshing problems we found that alpha depends on the resolution, so that, increasing the number of particles we have to increase the alpha value to obtain the same velocity of the tip of the dam. In this cases the interaction fluid-boundary is very important since we are changing from "dry" areas to "wet" areas:
    http://dual.sphysics.org/index.php/validation/validation-1-benchmark-2/
    http://dual.sphysics.org/index.php/validation/sloshingtank/
    This was not a problem in the previous cases (mainly always "wet" cases).

    - Now for your cases!!!! ...
    I am also estimating the best options to simulate sinking and ascent spheres. The problem here is that when you want to use laminar+SPS using 10-6 as kinematic value of water, then other parameters need to be tuned such as SPEED OF SOUND. Now I am checking the effect of the speed of sound to obtain good numerical results applying the Stokes law for spheres in a fluid with different densities.

    Regards

    Alex
  • You can also see the validations we performed comparing with VOF models and with experiments in the paper:

    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.
  • Thank you very much for your detailed description and for all this examples Alex.

    I read this paper and for this specific testcase, it was working well (Thanks again to the DualSPHysics team for helping me here).

    If I find a good solution with laminar+SPS in my testcase I will let you know here!

    Best regards and thanks again Alex!
Sign In or Register to comment.