Geometry configuration

edited March 2014 in Old versions
Hi All,

I have a question about the generation of simple geometries. The problem is that when I draw a sloped line (like a beach) the line is not straight but is made up of small steps that cause some problems in fluid particle. I try to import the same geometry in stl but the problem still. My question is if there is a way to have a sloping straight line without steps.

Thank you very much

Ric

Comments

  • Hi Ric,

    That's a consequence of using GenCase to generate the particle distribution, so you won't be able to get around it. As you increase your resolution the influence of those "steps" should become negligible (depending on your application, obviously).

    You should check out this thread:
    http://dual.sphysics.org/index.php/forums1/#/discussion/comment/183

    since it goes into a bit more detail.

    John
  • I have found a way around this problem,

    as long as you keep track of the object you want to be inclined via the mk option, you could draw it as a horizontal or vertical line (or plane), and then during the simulation you rotate it about an axis to obtain the desired inclination. This solves the small steps issue for straight surfaces only, for curved ones there's no much you can do.

    Taffo
  • Thank you for answer! I will do as you suggested :)

    Ric
  • And you always have the option to create the initial position of the particles with a different code or your own code. GenCase just create particles at the positions you want and with velocity and initial density and save this info in a *.bi2 file. Following the format of that .bi2 file you can create your own initial geometry.

    Regards

    Alex
  • edited June 2014
    Hey guys!
    First of all I like to say nice work with the DualSPHysics code! It’s awesome! I´m new to DualSPHysics but I like to do what Alex said in the post above, to create my own .bi2 file. What is the structure of the file? Is it,

    X Y Z U V W rho

    in 3d and,

    X Z U W rho

    in 2d? Generating matrices or lists/arrays with this structure in e.g. MatLab or Python is easy but how to save in the .bi2 format? Any ideas? I guess you need to do some changes to the “generated” .xml file as well regarding the "particles" and "constants" sections!?

    Cheers

    / Patrick
  • The files JPartData of the DualSPHysics project:
    void LoadFileBi2(unsigned part,const std::string &file);
    void SaveFileBi2(bool full=false,std::string file="")const;
    and the new project ToVTK contains all the info you need !!!

    Regards

    Alex
Sign In or Register to comment.