Skip to content

Create new boundary condition

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1990
    Eric
    Participant

    Dear OpenLB team,

    I am now trying to apply a boundary condition as shown below:
    [img]https://ibb.co/n382mK[/img]

    the top and bottom boundary are characterized by u=u_inf and dv/dy=0. My question is that if there’s Neumann type boundary already implemented in OpenLB? I searched the function library and the only Neumann bc I found is convection boundary, which is however not suitable for this case.

    Does that mean I need to create a new boundary class by myself? I am not an expert in C++ so I am a little bit confused on the program structure when assigning a boundary condition. Correct me if I was wrong: the user define a boundary condition via “addXXXBoundary” then the program goes into BoundaryConditionInstantiator2D and then PostProcessorGenerator2D, where the boundary condition algorithm is constructed.

    Do I need to create a new addXXboundary function and new boundaryprocessor to create a Neumann type boundary as shown before? Looking forward to hearing from you.

    Best regards,
    Eric

    #2904
    mathias
    Keymaster

    Dear Eric,

    addPressureBoundary does the job – you an have a look at the cylinderXd eyamples.

    Best
    Mathias

    #2905
    Eric
    Participant

    Dear Mathias,

    Thanks for your prompt reply!

    Sorry I didn’t make myself clear. The top and bottom boundary has Ux predescribed (dirichlet bc) and dUy/dy=0 (neumann bc) so I guess it is actually a mxied boundary condition. By pressure boudary condition I guess the velocity gradient at all directions is 0 (exactly neumann type bc). Is there any method not to force dUx/dy=0?

    Best regards,
    Eric

    #2906
    mathias
    Keymaster

    No, there isnt one. Best Mathias

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