Seeking help regarding interpolated velocity inlet

Hi!

I am trying to use the inlet/oulet functions, and would like to make a three dimensional inlet condition that is interpolated from a dataset. In the xml_format help for inOut, this is written:

<imposevelocity mode="3" comment="Imposed velocity 0:fixed value, 1:variable value, 2:Extrapolated velocity, 3:Interpolated velocity (default=0)">

<gridveldata file="wave_h02t2d1r1o2Velxz.csv" comment="CSV file with velocity data in different times and positions" />

<gridresetvelz value="true" comment="Reset Z velocity after interaction (default=false)" />

<_gridposzero x="0" z="0" comment="Defines position of grid (default=0)" />

</imposevelocity>

I haven't been able to locate this csv template, so I'm having trouble creating my own. I think I have found the source code for this in "JSphInOutGridData.cpp" but my coding skills are to bad to decipher this. I hope this is enough information, and that somebody is able to help me :).

Best Regards

Comments

  • If you have a sketch of what you want to happen, so one can understand it visually, it might help someone helping you.

    Kind regards

  • I essentially want to make a velocityprofile inside a pipe (I know it's not the best case for SPH, but I would like to try it nonetheless ;). I have found that you can define a parabolic velcity profile but as far as i can tell it is only for 2D cases? Please correct me if it is possible to create a 3D equation for this. That is one method. The other is using spreadsheet data and then interpolating between the points to create the surface. As far as I can tell this is possible in the aforementioned code.

    Hope this helps.

  • edited March 2020

    The good news is that what you seek to do is possible, both ways you describe. As you mentioned in the "help" folder regarding InOut

    It can actually be done in three different ways. I advise you to start with the one at the top, since it should actually do exactly what you want. I am bit unsure what "z", "z2" and "z3" actually are, but maybe you can explain that in a bit. Please do share your findings.

    If you want to use an external csv the file format seems to be:


    If you get an error, about "atleast two values" etc. then this is because there is an error in the csv file for some reason. The easiest way to fix this is to go "examples\inletoutlet\04_Waves2D" and copy their "waves.csv" file and use that as input.

    EDIT: Actually not sure if the parabolic profile can be used in 3D, maybe you do have to use external csv.


    Kind regards

  • Imposing a velocity profile that is a 3D paraboloid it's not possible at the moment but we will include this option in version 5.0 of DualSPHysics that will be released later this year.

    For the moment what you can do is imposing a 3D velocity profile that has non-zero velocity close to lateral walls (but zero velocity at the bottom) and allocate some space in your domain to let the velocity profile to fully develop.

    We know this is not ideal, but it's the only possibility in the present version of the code.

    I hope this helps

    Best Regards

    Renato

Sign In or Register to comment.