Skip to content

Some doubts about codes in multiconponents example

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics Some doubts about codes in multiconponents example

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #4967
    Zhangshi
    Participant

    Dear all developers,

    Recently,I found it difficult to understand some codes in YoungLaplace3D and contactAngle3D.I hope someone can give me some guidance.
    Here are several questions.
    1.`const T alpha = 1.5; [lattice units]
    const T kappa1 = 0.0075; // For surface tensions [lattice units]
    const T kappa2 = 0.005; // For surface tensions [lattice units]
    const T gama = 1.; // For mobility of interface [lattice units] ` How to set up the value of these variable in lattice units?
    Or say I wonder if these value are equal to actual physical value.
    If not,how should I calculate the value?

    2. ` AnalyticalConst3D<T,T> one ( 1. );
    SmoothIndicatorSphere3D<T,T> sphere( {nx/2., nx/2., nx/2.}, radius, 10.*alpha );
    AnalyticalIdentity3D<T,T> rho( one );
    AnalyticalIdentity3D<T,T> phi( one – sphere – sphere );
    sLattice1.iniEquilibrium( superGeometry, 1, rho, zeroVelocity );
    sLattice2.iniEquilibrium( superGeometry, 1, phi, zeroVelocity );`
    Here, these codes are used to create spherical regions.But I have no idea to understand AnalyticalIdentity3D<T,T> phi( one - sphere - sphere );?

    3.SuperLatticeFfromAnalyticalF3D<T, DESCRIPTOR> half(half_, sLattice1);
    Here I just found “slattice1” written.But I found “half” can be
    used in SuperIdentity3D<T,T> c1 (half*(density1+density2));,in which “density2” is relevant to “slattice2”.

    4.Here are two fluid components in “YoungLaplace3d”.I wonder if both of the viscosity of these two components are setted up.I just found the differences between the density of these two.

    5.In “contractAngle3D”,I have some trouble understanding something about meterial number setting.
    At first,a cuboid is built for geometry.

    std::vector<T> extend = { nxy, nxy, nz };
      std::vector<T> origin = { 0., 0., 0. };
      IndicatorCuboid3D<T> cuboid(extend,origin);

    In prepareGeometry
    `superGeometry.rename( 0,2 );
    Vector<T,3> extend(nxy+2., nxy+2., nz-1.*converter.getPhysDeltaX() );
    Vector<T,3> origin( -1., -1., 0.5*converter.getPhysDeltaX() );
    IndicatorCuboid3D<T> inner ( extend, origin );
    superGeometry.rename( 2,1,inner ); `
    I think the origin is setted in( 0.,0.,0.5*converter.getPhysDeltaX() ) have the same effect.I don’t understand.

    6.As question 5,in RayleighTaylor3D,I have the same problem.
    At first,a cubiod is setting.

    CuboidGeometry3D<T> cGeometry( 0, 0, 0, 1, nx, ny, nz, singleton::mpi().getSize() );    
    #else
      CuboidGeometry3D<T> cGeometry( 0, 0, 0, 1, nx, ny, nz, 1 );

    Then, in “prepareGeometry”,
    `Vector<T,3> origin1( -2. );
    Vector<T,3> origin2( -2., ny/2., -2. );
    Vector<T,3> origin3( -2., ny-1., -2. );
    Vector<T,3> extend1( nx+3., 2., nz+3. );
    Vector<T,3> extend2( nx+3., ny/2+2., nz+3. );
    IndicatorCuboid3D<T> bottom( extend1, origin1 );
    IndicatorCuboid3D<T> upper( extend2, origin2 );
    IndicatorCuboid3D<T> top( extend1, origin3 );`
    I think upper is included in top,isn’t it?
    So the following codes

    superGeometry.rename( 1,2,upper );              
      superGeometry.rename( 1,3,bottom );
      superGeometry.rename( 2,4,top );

    can be equal to

    superGeometry.rename( 1,4,upper );              
      superGeometry.rename( 1,3,bottom );

    .
    It’s quite confusing for me.

    6.I wonder what do gama(mobility of interface) and epsilon mean?

    7.SuperGeometry3D (CuboidGeometry3D< T > &cuboidGeometry, LoadBalancer< T > &lb, int overlap=2)
    Here,how do I understand the overlap?
    I have the same problem in understanding rename( 2, 1, 1, 1, 1,)".

    Thanks for your reading.I’m waitting for your reply.

    Zhangshi

    • This topic was modified 3 years, 11 months ago by Zhangshi.
    #4969
    mathias
    Keymaster

    Dear Zhangshi,

    that are a lot of questions. For many of them you find answers in our user guide. Further, we have a lecture on multi-component flows at our next spring school where we explain a lot about the model and also play with it in an exercise.

    I am sorry that we dont have the time to answer so many questions idividually. But with the spring school we have a format for further discussions.

    Best
    Mathias

    #4970
    Zhangshi
    Participant

    Dear Mathias,

    I’m sorry for asking too many questions.I’m glad to going to spring school for further learning.But it seems that I don’t have enough time to get there.
    Some of the questions above have been solved by myself.But there are still two problems.Do you mind listenning for a while?

    First is question 2.

    `AnalyticalConst3D<T,T> one ( 1. );
    SmoothIndicatorSphere3D<T,T> sphere( {nx/2., nx/2., nx/2.}, radius, 10.*alpha );
    AnalyticalIdentity3D<T,T> rho( one );
    AnalyticalIdentity3D<T,T> phi( one – sphere – sphere );
    sLattice1.iniEquilibrium( superGeometry, 1, rho, zeroVelocity );
    sLattice2.iniEquilibrium( superGeometry, 1, phi, zeroVelocity );`

    AnalyticalIdentity3D<T,T> phi( one - sphere - sphere );
    It’s used for constructing spherical erea.But “one” is not the same kind as the sphere.And why here subtract sphere for twice?

    2.Something about question 1 is really confusing.How to get the value of these variable in lattice units?Would yuo give me some advice?

    Thanks for you reply!
    Best
    Zhangshi

    • This reply was modified 3 years, 11 months ago by Zhangshi.
    #4982
    Nicolas
    Participant

    Dear Zhanshi,

    1a. you can subtract an object of type SmoothIndicatorSphere3D from an object of type AnalyticalIdentity3D since they are both derived from the class AnalyticalF3D. You can find the respective inheritance diagram (AnalyticalF3D inheritance graph) in our doxygen. Please take a closer look here first for any questions regarding related problems.

    1b. As phi is supposed to be defined between -1 and 1, the SmoothIndicatorSphere3D (ranging from 0 to 1) needs to be subtracted twice.

    2. Any quantity can be transformed between lattice and physical units anytime by using the conversion factors in our UnitConverter. Those you can find in the UnitConverter log at the start of your simulation or by calling them like getConversionFactorLength(). Plenty of quantities can already directly be calculated by respective calls (UnitConverter functions). In case your quantity is not part of it, just check its dimensions and use the provided conversion factors to convert it in the same manner it is done in the UnitConverter.

    Best,

    Nicolas

    #4983
    Zhangshi
    Participant

    Dear Nicolas,

    Thanks for your detailed answer.Though it will take a little more for me to understand 1b.I’ll read the doxygen again.
    By the way,have you ever tried the STLreader to add a particle based on your own stl files?Is this feasible?
    Thank you again for your help.

    Best
    Zhangshi

    #4992
    Nicolas
    Participant

    Dear Zhangshi,

    thank you a lot for the suggestion, however this is already implemented and has been used by Trunk et al.. Although it is not part of the current release 1.3–1, it might be part of the next one.

    Best,
    Nicolas

    • This reply was modified 3 years, 11 months ago by Nicolas.
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.