Venturi3d example
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Venturi3d example
- This topic has 31 replies, 7 voices, and was last updated 6 years ago by LaurentDelaon.
-
AuthorPosts
-
January 26, 2018 at 2:19 pm #1959behnamandiParticipant
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
January 26, 2018 at 2:33 pm #2780behnamandiParticipantthis is currently what i have https://ibb.co/bD4rRw
January 28, 2018 at 7:48 pm #2781MarcParticipantDear 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,
MarcJune 14, 2018 at 7:59 pm #2835LaurentDelaonParticipanthi
can i rotate an indicator during simulation?regards laurent
June 15, 2018 at 11:57 am #2836robin.trunkKeymasterDear 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
RobinJune 17, 2018 at 10:57 pm #2840LaurentDelaonParticipantHi Robin,
why do I use a porous Model ??
My disk is in iron the fuild is air…They are no porosity….Laurent.
June 18, 2018 at 10:53 am #2843robin.trunkKeymasterHi 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%3DihubAnother 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
RobinJune 18, 2018 at 6:48 pm #2848LaurentDelaonParticipantHi 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
July 2, 2018 at 6:44 pm #2858LaurentDelaonParticipanthi 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??July 2, 2018 at 6:51 pm #2859LaurentDelaonParticipantwith stl file how do I realise indicator of object in stl file ?
I cannot attach my stl files with the message…
July 3, 2018 at 9:35 am #2860albert.minkModeratorQuote: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.
July 3, 2018 at 6:15 pm #2861LaurentDelaonParticipantHow can I combine indicatorlayer like indicatorcylinder with +,-,*?
July 4, 2018 at 8:52 am #2862albert.minkModeratorI 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.
July 4, 2018 at 6:30 pm #2863LaurentDelaonParticipantI don’t understand…
what exactly is an indicator ?July 5, 2018 at 4:37 pm #2865mathiasKeymasterSee 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 -
AuthorPosts
- You must be logged in to reply to this topic.