3D In-Out Buffer zone

edited April 14 in DualSPHysics v4.4
Hello all,

I'm trying to create buffer regions for inlet and outlet of a 3D pipe. First of all, is v4.4 capable of doing that?

I modified the cases in examples/inout, read the pdf in doc/others and looked at wiki page.
In CaseBox4Inlet3D, buffer layers are simply rectangles since size in one axis is specified as zero. But, when I try that to create cylinder with zero thickness(circle) I get the following error



If I create a cylinder and make it a fluid (mkfluid=x), and use

zone3d comment="Input zone for 3-D simulations"
particles mkfluid="x" direction="right"
zone3d

I get the following error


When I try to create 3D buffer zone like in CaseShapesInlet3D, although I am pretty sure that I'm using right coordinates, it tells me that the buffer layer is outside the domain limits.





I thought maybe it was the radius of the buffer zone, so I tried it with a smaller radius then I get the following error



I am really confused. Any help is appreciated.

Thank you!

Comments

  • Use the mask of to create only the cylinder base with particles mkfluid=1 and use also mkfluid=1 in the Inlet configuration to define the inlet points.

    For example:


    The result is:


  • @jmdalonso could you also explain what "convert fluid" does?

    Kind regards
  • Thank you @jmdalonso.

    I'm running series of simulations using "mask". I will let you know once I get the first set of results.
  • Is it not possible to create inlet/outlet layers in such a configuration?



    I'm still getting an error message.







  • edited June 25

    Hello all!

    Is DSPH capable of creating only one face of an external geometry and defining it as inlet/outlet layers?

    Basically I'd like to do something similar to  <boxfill>left</boxfill>.


        

  • @circles if I am understanding you correctly, I think you can easily do with by adjusting the size command. For example <size x="2" y="0" z="1 /> would only give you a 2m long and 1m tall wall in x direction of a box.

  • Loading an external geometry with GenCase (STL, PLY or VTK) allows us to create particles at the faces of that external geometries since those formats only contain that information..... The external geometry can be a box or any complex geometry so there is no way to select the faces you want... I meant that one external geometriy can contain 100s of triangles....

    So I do not understand your question

  • Since the domain is not rectangular or it is not an open flow, I could not figure it out. I tried using mask command for the base cylinder as @jmdalonso suggested, but it still did not work.

    @Alex I'm working on a flow inside a pipe, there are 2 valves inside the pipe. I am using fill algorithm to fill the external geometry(.stl). I want to define the inlet as a velocity inlet.

    • When I try to do so by creating a inlet buffer layer I get "fluid particles were excluded since they are too close to inout particles." error.
    • If I try to create a piston at the inlet instead of a fluid layer, the fill algorithm does not work. So, I end up with solid particles with different mk's.
    • Lastly, I tried to create fluid particles at the inlet and impose external acceleration on those. But, again the fill algorithm did not work.


  • I've decided to get it to work in 2D first. The model consists of 3 main parts.

    i) inlet - pipe with a D of 19mm.

    ii) outlet - same as inlet

    iii) core - relatively complicated part(not a concern at this point)

    For the inlet and outlet, I'm using cylinders ("mask" activated), and it actually works when dp>=0.0005m


    If I increase the resolution, I get the following error

    Any help/idea/approach is appreciated!

  • ** Correction

    It only works for dp=0.0005m anything other than this, it gives the "particles too close to inout particles." error.

  • Hello circles

    At the end of your file, DualSPHysics has started utilizing a command called "SimulationDomain" or something to that effect, where you can say "default-2%" etc. Have you ensured to use this command at both inlet and outlet? And then also move your inlet/outlet layer a little farther away.

    Kind regards

  • When you get errors like those, you should look at the VTK file produced and see where the particles have been created.

    Without the XML file it is not clear what you have done, so I would recommend posting it here.


    Also, we are working on an XML guide for inlet/outlet buffer areas and other features of v4.4.

    In the meantime, please have a look at this presentation for more details about the different tags:

    https://dual.sphysics.org/4thusersworkshop/data/_uploaded/PDF_Talks_4thWorkshop/Tafuni_Lisbon2018.pdf

  • edited July 7

    Hello,

    I have been trying to understand CfgInOut_*.vtk lately.

    CfgInOut_DomainReal shows the buffer layers as far as I understand. The problem is that when I play with the particle spacing, buffer layer shifts from where I want it to stay.

    Here is the part of the .xml where I create in/out buffer particles


    Now, let's see what happens to buffer region at the inlet/outlet when I play with dp

    • I will start with dp=5e-4 (only working case though it fails and Windows says "DualSPHsyics4.4_win64.exe" stopped working)

    As you can see, the buffer region is symmetric wrt z=0 line. And the first layer is on x=-0.18 line. (just like what I tried to achieve in .xml)


    • dp=4e-4

    Center of the inlet cylinder is now at (x,z)=(-0.18,0.0002). So, I get "particles too close to inout particles." error because of the particles circled in red.


    • If I try with a lower resolution, dp=6e-4


    Although compared to(dp=5e-4) the inlet buffer is outside the domain limits, it does not give an error because of the inlet buffer.

    I get the "particles too close to inout particles." message because of the particles in outlet buffer.


  • @taffo @Alex

    I've been trying to understand the source code, specifically InOut implementation.

    JSphCpuSingle_InOut.cpp is where DSPH checks for proximity of inout particles to other particles. There are few things I'd like to ask.

    • First of all, I'm not quite sure what "disterror" does. It is defined as Dp*0.8, I played with the definition and especially with 0.8. I used 0.1 and even 10 but did not really see a change at least in the output or .vtk.
    • DSPH gives the error I've been getting when (n>nfluid) and (nfluid+nbound+nfluidinout>0) where n=nfluid+nbound+nfluidinout. Initially, nfluid=nbound=nfluidinout=0. And they are equal to 0 throughout the simulation as long as CODE_IsNormal(cod)=0. My question is why am I getting normal particles depending on the particle spacing? Or why do particles change behavior depending on particle spacing when I'm using same geometry and same coordinates to create particles?

    Thank you!

  • Hello again,

    Could someone please help me with the source code for in/out? I still haven't figured it out.

Sign In or Register to comment.