Skip to content

Inlet velocity profile

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1985
    tartopomm
    Member

    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!

    #2876
    mathias
    Keymaster

    Dear 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
    Mathias

    #2886
    tartopomm
    Member

    Thank 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!

    #2887
    mathias
    Keymaster

    Before you set

    sBoundaryCondition.addSlipBoundary( superGeometry, 2)

    you need to set a “doNothing” dynamics there.

    Best
    Mathias

    #2890
    tartopomm
    Member

    So 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!

    #2891
    mathias
    Keymaster

    Please,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
    Mathias

    #2898
    tartopomm
    Member

    I 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 ?

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