Skip to content

Gloriousface

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 34 total)
  • Author
    Posts
  • Gloriousface
    Participant

    one example snippet to wrok is like the following:
    for(int iC=0;iC<4;++iC){
    BlockGeometry2D<T>& BGeo=superGeometry.getExtendedBlockGeometry(iC);
    int Nx=BGeo.getNx();
    int Ny=BGeo.getNy();
    for(int ix=2;ix<=Nx-2;++ix){
    for(int iy=2;iy<Ny-2;++iy){
    BGeo.getPhysR(phR,ix,iy);
    indx=phR[0];
    indy=phR[1];
    if(indx>10 && indx<15 && indy>20 && indy<50){
    BGeo.get(ix,iy)=2;
    }
    }
    }

    clout<<“BlockGeometry “<<iC<<” prepared!”<<endl;
    }

    Gloriousface
    Participant

    Hi Fany:
    You can use BlockGeometryXD to specify the name of the cell with its location. Firstly you instantiate one object with BlockGeometryXD, BlockGeometryXD<T> &BG=superGeometry.getExtendedBlockGeometry(iC), where iC is the index of the block. Then the size of this BG is get with Nx=BG.getNx() and Ny=BG.getNy(); Then in a for loop with ix from 2 to Nx-2, iy from 2 to Ny-2, get the physical position of the cell with BG.getPhysR(phr,ix,iy); if the physical position statisfies the requiement, rename the cell with BG.get(ix,iy)=2 for example.

    in reply to: component velocity in Shanchen multicomponent model #6111
    Gloriousface
    Participant

    Adrian:
    Thanks for your reply.
    As described in “The Lattice Boltzmann Method:Principle and Practice”(Chapter 6) by Timm Kruger and the paper you mentioned, Guo’s force is used for the single phase flow. However, for the multiphase flow, Tim Kruger pointed that the barycentric velocity Ub should be used (Chapter 9, Page 382,eq(9.124)). This velocity should be same for both components (Page 383,eq(9.127)), i.e.,Ueq=Ub.
    In openlb, the ForcedBGKdynamics, the snippet in member collid is simply: u+=force/2, not corrected with the density averaged force. This also makes the component Ueq different.

    in reply to: BounceBack boundary #5845
    Gloriousface
    Participant

    Thank you very much for your reply. What I mean by the standard BounceBack is that the particles bounce directly at the boundary, and the boundary is at the grid point, rather than half step bounce by pushing half of the grid inward. I don’t know whether the standard BounceBack realized in OpenLB is what I mean ?

    • This reply was modified 2 years, 9 months ago by Gloriousface.
    in reply to: shanChenForcedPostProcessor2D #5772
    Gloriousface
    Participant

    Thank you very much for your reply.Where do the values of the eight parameters come from? I can’t find out where to assign values to these parameters. In addition, do you mean two sets of lattices by two cuboids?

    in reply to: rayleighTaylor3d #5740
    Gloriousface
    Participant

    Thank you very much for your help. This problem has been solved successfully

    in reply to: shanChenForcedPostProcessor2D #5736
    Gloriousface
    Participant

    Hello,all

    I have a few code in ShanChenForcedPostProcessor2D that I don’t understand very much.

    util::intersect ( x0, x1, y0, y1,
    x0_, x1_, y0_, y1_,
    newX0, newX1, newY0, newY1)

    What are the functions of these codes,and What do x0 and other symbols mean?
    Thanks

    in reply to: shanChenForcedPostProcessor2D #5730
    Gloriousface
    Participant

    Sorry, I don’t quite understand the meaning of scaling density. Could you explain it in more detail?

    in reply to: Two component lattice density setting #5727
    Gloriousface
    Participant

    Thank you very much for your help.I don’t quite understand “getAverageRho ()”. What density does this function output and why is it different from the initial density I set?

    in reply to: Multicomponent flow #5725
    Gloriousface
    Participant

    Thank you very much for your reply

    in reply to: Two component lattice density setting #5724
    Gloriousface
    Participant

    Thank you very much for your reply. When I used SC model to simulate oil-water two-component flow, ZouHe velocity boundary was set at the inlet and ZouHe pressure boundary was set at the outlet. During the simulation, the average density of component 1 and component 2 kept increasing and diverged after 10000 iterations. What is the reason for this? I would appreciate it if you could help me with this problem.

    Best
    Gloriousface

    in reply to: Multicomponent flow #5717
    Gloriousface
    Participant

    Hello,all

    I’m simulating the flow of oil and water. It’s difficult to set the density of the two components. The following is the density of the two components I set, but the simulation results beat very seriously. Is there any problem with this setting?

    AnalyticalConst2D<T,T> waterrho( 1 );
    AnalyticalConst2D<T,T> oilrho( 0.8 );

    in reply to: Unit conversion #5714
    Gloriousface
    Participant

    Thank you very much for your reply. I’m simulating two-component flow and trying to apply pressure boundary to the outlet, but there are two problems I don’t quite understand.

    1.The initial density and initial velocity of each component are defined in prepareLattice function. How to define the initial density of inlet and outlet?
    2.Is the initial density of the inlet of the two lattices consistent?
    3.I set the following statement in the program to achieve the pressure boundary
    setLocalPressureBoundary<T,DESCRIPTOR>(sLatticeOne, omega, superGeometry, 4);
    setLocalPressureBoundary<T,DESCRIPTOR>(sLatticeTwo, omega, superGeometry, 4);
    Do I need other statements, such as defineU?

    in reply to: Unit conversion #5710
    Gloriousface
    Participant

    Hello,everuone

    When I read the help document, I found that the analyticF function is applicable to the SI unit. Can I ask the following lines of code to set the speed and pressure in the SI system of units?

    AnalyticalConst2D<T,T> ux( 0. );
    AnalyticalConst2D<T,T> uy( 0. );
    AnalyticalConst2D<T,T> rho( 1. );
    AnalyticalComposed2D<T,T> u( ux,uy );

    The calculation of LBM uses lattice units. These lines of code for setting the initial equilibrium distribution function directly use international units. Is there a conversion mechanism?

    sLattice.defineRhoU( bulkIndicator, rho, u );
    sLattice.iniEquilibrium( bulkIndicator, rho, u );

    in reply to: Periodic boundary #5709
    Gloriousface
    Participant

    Thank you very much for your reply

Viewing 15 posts - 1 through 15 (of 34 total)