DualSPHysics in Linux

edited March 2016 in Old versions
Hi,

I've been trying to run a few tests with DSPH in Linux OS (Ubuntu 14.04 LTS) and the results are far from being satisfactory. I wonder if the implemented changes are correct or if the code is not being built properly.

I believe the changes have been applied correctly, so if there is no change in density, there may be a problem with rebuilding the files and using the correct executable?

My changes account for:

Visco at JSphCpu.cpp at Laminar+SPS

Rhop0 and OverRhop0 at JSphCpu.cpp at EoS

Rhop[p] at JSphCpuSingle.cpp at ConfigDomain()

Thanks!

Kind regards, ida a.

Comments

  • Can you give more details about the changes, please.
    Can you explain better which is the problem?
  • edited March 2016
    Hi Alex,

    I've adapted the 2D dam break case and used two immiscible fluids. The fluids have different physical properties. I'm changing the source code so that I'm able to simulate the interaction of both fluids.

    Regarding the changes, here goes some more detailed information:

    Rhop[p] @JSphCpuSingle.cpp - ConfigDomain()
    if(p>=Npb && p < Npb+19900) Rhop[p]=780.f;
    else if(p > = Npb+19900) Rhop[p]=1000.f;

    Rhop0 and OverRhop0 @JSphCpu.cpp - PreInteraction_Forces
    if(p > = Npb && p < Npb + 19900){
    Rhop0=780.f;
    OverRhop0=1/Rhop0;
    }
    else if( p > = Npb + 19900){
    Rhop0=1000.f;
    OverRhop0=1/Rhop0;
    }

    Visco @JSphCpu.cpp - Laminar+SPS viscosity
    if(Idp[p] > = Npb && Idp[p] < Npb+19900) Visco=0.0015f;
    if(Idp[p] > = Npb + 19900) Visco=0.0010f;

    - - -

    Thank you. ida a.
  • to simulate two fluid of different densities (depending on that ratio) you need to modify more aspects of the formulation such as continuity equations, etc...

    on the other hand, Rhop0 is a constant value, not an array! so your changes are senseless... you should create the array Rhop0[p] !!!

    Regards
  • Hi Alex,
    I'm aware that Rhop0 it's not an array, but it still needs to have 2 different values depending on the fluid phase.
    The changes for Rhop0 and OverRhop0 are implemented before the EoS, as pressure need to be updated according to the new density values. I thought this would be enough.
  • edited March 2016
    Ah ok, you check first the Id of the particle in order to use one value or the other. So sorry I did not notice that....
    End of this week or next one we are going to release the code, please try your changes in the new and then email us if you still have problems so we will try to help you and test what you have tried.

    Regards
  • I was able to detect the problem about this. I was not compiling the executables correctly. Thanks anyway for the feedback.
Sign In or Register to comment.