Skip to content

Venturi3d example

Viewing 15 posts - 1 through 15 (of 32 total)
  • Author
    Posts
  • #1959
    behnamandi
    Participant

    Dear Openlb developers.

    first of all, thanks for all the effort you put into openlb and making it available.

    I’m a newbie to coding and I have just started using openlb and trying to do a few modifications to the venturi3d example.

    what I did was simplifying the geometry to a pipe and placed a small cuboid as an obstacle inside the pipe.
    // Definition of the geometry of the venturi
    Vector<T,3> C0( 0,50,0 );
    Vector<T,3> C1( 5,50,0 );
    Vector<T,3> C2( 150,50,0 );
    Vector<T,3> C3( 155,50,0 );
    Vector<T,3> C4( 75,30,0 );

    T radius2 = 20 ; // radius of the widest part
    T xlength = 20 ;
    T ylength = 30;
    T zlength = 5 ;

    IndicatorCylinder3D<T> inflow( C0, C1, radius2 );
    IndicatorCylinder3D<T> cyl1( C1, C2, radius2 );
    IndicatorCuboid3D<T> cuboid1( xlength, ylength, zlength, C4);
    IndicatorCylinder3D<T> outflow0( C2, C3, radius2);

    IndicatorIdentity3D<T> venturi( cyl1 – cuboid1 );

    first question. is there a better way of combining the cylinder and the cuboid together. I tried cyl1+cuboid1 and this resulted into fluid going through the box even when I added “superGeometry.rename( 1,2,1,cuboid1 );” which i though might solve the problem.and when i make the cuboid long in X direction and thin in z direction, it removes material from the pipe which was strange. (maybe because of the clean function?)

    second question. I dont quite understand this function “superGeometry.rename( 2,1,1,1,1 );” I read the source code comments. I know 2,1 means changing material number from 2 to 1. but what does 1,1,1, offset mean? Initially i thought it would mean it changes the material number around the pipe by an offset of 1 in all directions, but when i changed to 2,2,2 to see what happens, the error i get is unknown material number.

    Thanks in advance for the answers.,

    Regards,

    Behnam

    #2780
    behnamandi
    Participant

    this is currently what i have https://ibb.co/bD4rRw

    #2781
    Marc
    Participant

    Dear Behnam,
    with all indicators in our code you are able to define boolean arithmeitc, which means that you can combine indicators (+) or intersect them (-). I think your idea is to intersect the cylinder by a cuboid.
    The offset means that you deal by the renaming process with a certain offset in an cartesian coordinate. if you just use rename 2,1 all your cells with 2 will disappear. The offset gives you the possibility to create a layer in the directions that you want.

    Best,
    Marc

    #2835
    LaurentDelaon
    Participant

    hi
    can i rotate an indicator during simulation?

    regards laurent

    #2836
    robin.trunk
    Keymaster

    Dear Laurent,

    there are objects called SmoothIndicator…XD (e.g. SmoothIndicatorCircle2D), which can be rotated. Either you adapt this the other indicator objects to this rotation (1) or you use this SmoothIndicators in combination with a porous media model (2).
    1) This approach requires changing the material numbers and reinitialisation of the cells which are not covered by the solid anymore.
    2) This approach is the way the moving valve works, to get started with porous media, there is an example “porousPoiseuille2d”

    Best
    Robin

    #2840
    LaurentDelaon
    Participant

    Hi Robin,
    why do I use a porous Model ??
    My disk is in iron the fuild is air…They are no porosity….

    Laurent.

    #2843
    robin.trunk
    Keymaster

    Hi Laurent,

    the point of view in this case is that solid is simply represented by a porosity of 0 and fluid by a porosity of 1. In the phase tranistion region there are values in between 0 and 1, to allow for a smooth transition and thereby increase stability. For more information see
    https://www.sciencedirect.com/science/article/pii/S167420011730041X?via%3Dihub

    Another appraoch could be the paritally saturated cells method (PSM), described e.g. in the book “The Lattice Boltzmann Method – Principles and Paractice” by Krüger et al. This however is currently not implemented in OpenLB.

    Best
    Robin

    #2848
    LaurentDelaon
    Participant

    Hi Robin,
    ok the porous will reduce your transitory state wich is maybe not good, and so the global stationnary state is less affected.
    seem work like a relaxation constraint…

    thank’s

    #2858
    LaurentDelaon
    Participant

    hi Robin
    in venturi3D:

    what is the sigbifiance of :
    superGeometry.rename( 0,2,venturi ); //ok set 0 to 2 for material limit
    superGeometry.rename( 2,1,1,1,1 ); // set 2 to 1??? with offset??

    #2859
    LaurentDelaon
    Participant

    with stl file how do I realise indicator of object in stl file ?

    I cannot attach my stl files with the message…

    #2860
    albert.mink
    Moderator
    Quote:
    Quote from LaurentDelaon on July 2, 2018, 18:51
    with stl file how do I realise indicator of object in stl file ?

    I cannot attach my stl files with the message…

    For geometry creation with STL files, see example/cylinder3d.

    #2861
    LaurentDelaon
    Participant

    How can I combine indicatorlayer like indicatorcylinder with +,-,*?

    #2862
    albert.mink
    Moderator

    I do not get the idea behind it.

    I had a brief look on the IndicatorLayer3D implementation and it returns true for a given lattice point, if this point is inside a layer. The latter is defined by an indicator passed by the constructor to IndicatorLayer3D.

    If you want a Layer around an indicator, then pass your what-ever-indicator to the constructor of the IndicatorLayer3D. Saying that, first construct your indicators via +,-,* and then use IndicatorLayer3D.

    #2863
    LaurentDelaon
    Participant

    I don’t understand…
    what exactly is an indicator ?

    #2865
    mathias
    Keymaster

    See Chapter 10 of the OpenLB documentation http://www.openlb.net/wp-content/uploads/2018/04/olb_ug-1.2r0.pdf. To get started easily you may consider coming to our next Spring School.

    Best
    Mathias

Viewing 15 posts - 1 through 15 (of 32 total)
  • You must be logged in to reply to this topic.