Inlet velocity profile
› Forums › OpenLB › General Topics › Inlet velocity profile
- This topic has 6 replies, 2 voices, and was last updated 7 years, 7 months ago by tartopomm.
-
AuthorPosts
-
July 14, 2018 at 9:07 pm #1985tartopommMember
Hello
I am using openLB for my thesis but I am completely new to it and to C++ , so I’m struggling with a pretty simple problem. I hope you could help me out with this.
In the cylinder2D example, I would like to add a constant inlet velocity profile (possibly increasing with time) instead of a Poiseuille profile. What changes should I do in the cylinder2D.cpp file ?
I’ve read some topics with similar questions but I didn’t manage to implement it.
Thank you for your help!
July 15, 2018 at 9:30 am #2876mathiasKeymasterDear tartopomm,
you can use a const analytical functor. They are used in the some example to fix the outflow pressure. Please, also have a look in our documentation on functors. Last but not least, consider to come to our next spring school which will help you to get started!
Best
MathiasJuly 17, 2018 at 1:11 am #2886tartopommMemberThank you for your answer, I managed to get what I wanted!
Then, I would have another question: I would like to have a slip condition on the top and on the bottom of my domain, so I added this line where the boundary conditions are defined (velocity and pressure):sBoundaryCondition.addSlipBoundary( superGeometry, 2)
But is it enough or should I add something else? because when I ran the simulation, it didn’t change much.
thank you!
July 17, 2018 at 9:06 am #2887mathiasKeymasterBefore you set
sBoundaryCondition.addSlipBoundary( superGeometry, 2)
you need to set a “doNothing” dynamics there.
Best
MathiasJuly 19, 2018 at 4:36 pm #2890tartopommMemberSo I added that line just before setting the slip boundary:
sLattice.defineDynamics( superGeometry, 2, instances::getNoDynamics<T, DESCRIPTOR>() )
but again, it didn’t change anything, did I miss something?
Thank you for your time!
July 19, 2018 at 4:41 pm #2891mathiasKeymasterPlease,explain exactly what iyou think is going wrong. What version of OpenLB are you using? Is it the latest. We have tested the method serveral times.
Best
MathiasJuly 21, 2018 at 6:58 pm #2898tartopommMemberI meant there was still a no-slip boundary condition on the top and on the bottom of the domain. I was using openlb 1.1.
i downloaded openlb 1.2 yesterday and indeed it worked perfectly well with your comments. thank you!
But how come it went wrong with openlb1.1 ?
-
AuthorPosts
- You must be logged in to reply to this topic.
