Skip to content

Free-Slip Boundary Condition – Implementation Doubts

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics Free-Slip Boundary Condition – Implementation Doubts

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1832

    Hi Robin,rnrnThank you for your response. I have not been tried to implement the addConvectionBoundary function of the class sOnLatticeBoundaryCondition2D. I have already read your paper Inertial dilute particulate fluid flow simulations with an Euler–Euler lattice Boltzmann method, where you implemented this convection-boundary in order to simulate an outflow condition. It seems that “”advectionDiffusionBoundayPostProcessiorXD.h/hh”” it is only implemented in 3D, right? rnrnIn the case of free-slip, if “”U“”is the velocity vector and “”n“” is the normal vector to the boundary pointing outwards, the grad(U)*n = 0 (0 is the zero vector). Thus, if I am not wrong, the outflow condition of your paper should not be applied for this kind of boundary.rnrnI checked the addSlipBoundary function available in olb::sOnLatticeBoundaryCondition2D< T, Lattice > Class Template Reference. The processSubDomain, located in SlipBoundaryProcessor2D, works as the specular reflection approach explained by myself at the beginning of this post. However, I do not understand why the corner nodes are treated as a bounce-back for the diagonal direction and the vertical and horizontal are switched 90°. For example, for a D2Q9 lattice and the North-West node, the distributions changed are :rn

      f4 = f2rnf5 = f1rnf6 = f8

    rnrnIt should be noted that the lattice arrangement is:rn

    Code:
    rn 1—-8—-7rn|| || ||rn 2—-0—-6rn|| || ||rn 3—-4—-5rn

    rnrnAs pointed out by in Question about Cavity2d Example and How to set a slip boundary posts, it seems that the nodes residing in the overlap region could not be implemented as a Slip-Boundary-Condition. Does someone know how to “”fix”” or overcome this problem?rnrnFinally, the user guide indicates that createInterpBoundaryConditionXD is the default non-local boundary condition based in the work of Skordos (1993). It seems that “”StraightFdBoundaryProcessor2D“” and “”PlaneFdBoundaryProcessor3D“” correspond to the post-processing classes for 2D and 3D, respectively. Does someone know how theses classes are accessed by the createInterpBoundaryConditionXD object ? Because from the sOnLatticeBoundaryConditionXD class only the velocity/pressure/slip/convection boundary functions are available. rnrnBest regards,rnAlejandrorn

    #2366
    robin.trunk
    Keymaster

    Hi Alejandro,rnrn1) To write a new boundary like BounceBack, you can have a look at the dynamics.hh file in the src folder. I think implementing the boundary this way is mainly a copy and paste work of the BounceBack class and changing the collide function.rnrn2) I implemented a convection boundary for AdvectionDiffusion problems,that computes the missing f_i by extrapolation, for more information you can have a look at section 3.3 ofrnhttp://www.sciencedirect.com/science/article/pii/S1877750316300345rnI think there is also a ConvectionBoundary for the fluid that might be worth checking.rnrnBest regardsrnRobin

    #2367

    Hi Robin,rnrnThank you for your response. I am trying to “”copy-paste”” the Bounce-Back template in the code to change just the “”collide”” function. From the specular reflection’s concept I am having some difficulties to create a code that it is independent of the location of the surface and the existence of corners/edges in 2D/3D. However, I will tested this approach in the 2dcylinder example.rnrnI read the user guide of OpenLB and I found that in section 2.2 (define and use boundary conditions) the createInterpBoundaryConditionXD allows to implement the non-local boundaries. The velocity gradient is evaluated with this “”option””. If I well understood, the non-local boundary implements a post-process step (just after the streaming step). I seems that the Class Template olb::BlockLattice3D<T,Lattice> has the function addPostProcessor (PostProcessorGenerator3D<T,Lattice> const &ppGen). The PostProcessorGenerator3D<T,Lattice> class has been implemented in Class Template olb::PlaneFdBoundaryProcessorGenerator3D<T,Lattice,direction,orientation>. However, I do not figure out how to define the post-process routine. In this routine I would like to implement the functions found in olb::fd Namespace.rnrnThe direction and orientation parameters in PlaneFdBoundaryProcessorGenerator3D are for the plane of interest ? Theses parameters are scalars or vector ? The normal vector of the surface is inwards or outwards of it ? rnrnI will check your paper in these days.rnrnBest regards,rnAlejandro

    #2368
    robin.trunk
    Keymaster

    Hi Alejandro,rnrnyou are right, since the BounceBack is implemented as an Dynamics object, that replaces the standard collision step. This step is desired to be strictly local, therefore the code is not designed to allow non-local boundaries at this point.rnThe post processing is the right place for non-local boundary treatment. As an example you can look at the convection boundary implemented for advection diffusion problems. Especially at the filesrnopenlb > src > dynamics > advectionDiffusionBoundaryPostProcessor3D.h / .hhrnThe Generator creates an PostProcessor object that contains a function processSubDomain, where the actual treatment of the boundary is implemented.rnrndirection and orientation are computed from a discrete normal that is obtained byrndiscreteNormal = blockGeometryStructure.getStatistics().getType(iX,iY,iZ);rnThis normal is pointing outwards and discreteNormal[0] contains the type of boundary node (plane, edge, …). More information about this normal can be found in the doxygen.rnrnBest regardsrnRobin

    #2346

    Hi Robin,rnrnThank you for your response. I have not been tried to implement the addConvectionBoundary function of the class sOnLatticeBoundaryCondition2D. I have already read your paper Inertial dilute particulate fluid flow simulations with an Euler–Euler lattice Boltzmann method, where you implemented this convection-boundary in order to simulate an outflow condition. It seems that “”advectionDiffusionBoundayPostProcessiorXD.h/hh”” it is only implemented in 3D, right? rnrnIn the case of free-slip, if “”U“”is the velocity vector and “”n“” is the normal vector to the boundary pointing outwards, the grad(U)*n = 0 (0 is the zero vector). Thus, if I am not wrong, the outflow condition of your paper should not be applied for this kind of boundary.rnrnI checked the addSlipBoundary function available in olb::sOnLatticeBoundaryCondition2D< T, Lattice > Class Template Reference. The processSubDomain, located in SlipBoundaryProcessor2D, works as the specular reflection approach explained by myself at the beginning of this post. However, I do not understand why the corner nodes are treated as a bounce-back for the diagonal direction and the vertical and horizontal are switched 90°. For example, for a D2Q9 lattice and the North-West node, the distributions changed are :rn

      f4 = f2rnf5 = f1rnf6 = f8

    rnrnIt should be noted that the lattice arrangement is:rn

    Code:
    rn 1—-8—-7rn|| || ||rn 2—-0—-6rn|| || ||rn 3—-4—-5rn

    rnrnAs pointed out by in Question about Cavity2d Example and How to set a slip boundary posts, it seems that the nodes residing in the overlap region could not be implemented as a Slip-Boundary-Condition. Does someone know how to “”fix”” or overcome this problem?rnrnFinally, the user guide indicates that createInterpBoundaryConditionXD is the default non-local boundary condition based in the work of Skordos (1993). It seems that “”StraightFdBoundaryProcessor2D“” and “”PlaneFdBoundaryProcessor3D“” correspond to the post-processing classes for 2D and 3D, respectively. Does someone know how theses classes are accessed by the createInterpBoundaryConditionXD object ? Because from the sOnLatticeBoundaryConditionXD class only the velocity/pressure/slip/convection boundary functions are available. rnrnBest regards,rnAlejandrorn

    #2347
    robin.trunk
    Keymaster

    Hi Alejandro,rnrn

    Quote:
    It seems that “”advectionDiffusionBoundayPostProcessiorXD.h/hh”” it is only implemented in 3D, right?

    rnThis is correct, but for 2D it should be possible to do an analogue implementation.rnrn

    Quote:
    the grad(U)*n = 0 (0 is the zero vector)

    rnWasn’t that just what you wanted? In your first post you wrote:rn

    Quote:
    2. von Neumann boundary condition : The gradient of the velocity normal to the wall is zero

    rnSo for free slip you want something similiar (replacing the vector n with a vector tangential to the surface), or am I wrong?rnrn

    Quote:
    it seems that the nodes residing in the overlap region could not be implemented as a Slip-Boundary-Condition. Does someone know how to “”fix”” or overcome this problem?

    rnIf you refer to the “”could not add boundary”” messages in the beginning, this shouldn’t be a problem, since computations on the overlap are not required, hence no boundary condition has to be applied.rnrnBest regardsrnRobin

    #2348

    Hi Robin,rnrnThanks for your response. From your last post I have some doubts:rn

      rn1. What do you mean by doing an analogue implementation ?rnrn2. The vector

    n should be the normal vector in order to implement the condition grad(U)*n = 0. Maybe I did not express myself correctly in my post for the “”von Neumann boundary condition””. So in this case it is me that is wrong ;).rnrn3. I have not well understood the “”overlap”” region. But from your response, will all the nodes/lattices at the boundary be implemented to the boundary condition defined by slip-boundary/velocity-boundary/etc.? rnrnrnI am trying to implement the free-slip boundary condition at the boundary from the default non-local boundary condition based in the work of Skordos (1993). I figured out how the addVelocityBoundary from the class olb::sOnLatticeBoundaryCondition2D implements:rnrnolb::StraightFdBoundaryProcessor2D< T, Lattice, direction, orientation > Class Template ReferencernrnThis class corresponds to the algorithm proposed by Skordos. This class is used as post-processor. The process is called from the class SuperLatticeXD in the collideAndStream() function.rnrnI would like to define a new class from StraightFdBoundaryProcessor2D class in order to redefine a new process function that will define grad(U)*n = 0. Also, I am trying to inheritance the class SuperLattice2D to add a new function addFreeSlipBoundary which will used to invoke the new class from StraightFdBoundaryProcessor2D. Basically, I want to modify the post-process function according to what I want and then I define a new function to implement this post-processor function, like the addVelocityBoundary function.rnrnDo you have any idea how could this could be made ? Does exist a better way to give the boundary conditions for the velocity and the grad(u) in the Skordos algorithm?rnrnBest Regards,rnrnAlejandro

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