Skip to content

Something about settlingCube3D

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics Something about settlingCube3D

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #4979
    Zhangshi
    Participant

    Dear all,

    Recently I’m simulating a particle floating in the water.But something wrong happened when I changed some parameters.I changed the size of the cuboid into (0.15,0.15,1.),the maxphyT into 5,cubeDensity into 700,resolution into 450.But when I ran the code, the terminal showed that the peocess was killed when preparing geometry.I hope someone can give me some advice.
    By the way,I want to add a particle by stlreader.But,it seems not an easy work.Could someone give me some hints?Which class is needed?

    Best
    Zhangshi

    #4980
    robin.trunk
    Keymaster

    Dear Zhangshi,

    there could be several reasons. By the cuboid size do you mean the settling cube or the domain. If it is the particle, it would be larger than the domain. If it is the domain size, according to the resolution that would be more than 500.000.000 cells. Depending on the machine you are using maybe the RAM is not enough, this would lead to the process being killed during geometry creation.
    On the other hand, are you already using STLs? In this case the STL file should be watertigth to be sure.
    Do you get some kind of error message?

    Best regards
    Robin

    #4981
    Zhangshi
    Participant

    Dear Robin,
    Thanks for your reply.For first problem,it seems that the RPM in my computer is not really enough.I‘ll change another one.
    For stl files,I have some trouble for code programming.
    I read the user guide.But I only found the usage of stlreading in geometry preparing.I have no idea how to use stlreading to build a particle.This is a really important and confusing point for me.Could you give me some guidance?
    I wonder if the following codes are necessary for this.

    IndicatorCuboid3D<T> cuboid(extend, origin);
     CuboidGeometry3D<T> cuboidGeometry(cuboid,      converter.getConversionFactorLength(), 7);
     HeuristicLoadBalancer<T> loadBalancer(cuboidGeometry);

    Thanks for your patience.

    Best
    Zhangshi

    #4988
    robin.trunk
    Keymaster

    Dear Zhangshi,

    the objects for such particle simulations are described my SmoothIndicators, e.g. https://www.openlb.net/DoxyGen/html/db/d8b/classolb_1_1SmoothIndicatorCylinder3D.html
    You will have to create a new one, which calculates the physical parameters (or you hardcode them if you know them) in the constructor. Also the ()-operator is used to decide wheater a given point is within the particle or outside. at this point you have to include the STL. You can probably take advantage of the included STL-reader : https://www.openlb.net/DoxyGen/html/d2/d60/classolb_1_1STLreader.html

    I suggest you use an existing SmoothIndicator as a blueprint and have a look at the STLreader (it is applied e.g. in the cylinder3D example case.

    Best regards
    Robin

    #4990
    Zhangshi
    Participant

    Dear robin,

    Thanks for your patient answer.I’m sorry for asking for advice too often.
    It seems a hard work for me to make an attempt on creating a new SmoothIndicator,but I’ll think about trying this way.You suggest that I shoulduse an existing SmoothIndicator as a blueprint.
    Do you mean that I should just use some simple smoothIndicators for simulation,such as smoothIndicatorCuboid? Or try to combine these geometric primitives with a more complex one?
    By the way,I’ve build a oil-water surface with the help of you.And I was baffled by how to set the change of the acceleration when the particle arrived the oil.
    You are so kind for answering so many questions for me.I don’t know how to express my gratitude.If I could post my problems more easier on forum,I’ll have more time to solve problems by myself with your guidance,rather than just ask for advice.

    Best
    Zhangshi

    #4991
    robin.trunk
    Keymaster

    Dear Zhangshi,

    if you want to use STL files you will have to create a new SmoothIndicator. I wanted to suggest to have a look at the other indicators and use them as a blueprint in the process of creating this new indicator.
    Similar, if you want to combine some simple shapes, this will also require some programming and modification of some SmoothIndicators.
    Or you can maybe simply you case to an object that can be described by an analytical equation.
    As you described, you want the particle to float between the two phases. Setting the acceleration / force could be non-trivial as this force is currently just a global parameter. Therefore the current code might not be able to correctly depict an object’s buoyancy forces.

    Best regards
    Robin

    #4994
    Zhangshi
    Participant

    Dear Robin,

    Thanks for all your help.I’m sorry to reply so late.Yesterday I’ve tried
    to modify the source code.But maybe it’s too hard for me now.Maybe I’ll try another way.
    Thank you again.

    Best
    Zhangshi

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