Something about settlingCube3D
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Something about settlingCube3D
- This topic has 6 replies, 2 voices, and was last updated 3 years ago by Zhangshi.
May 24, 2020 at 12:03 pm #4979
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?
ZhangshiMay 24, 2020 at 7:08 pm #4980
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?
RobinMay 25, 2020 at 4:38 am #4981
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.
ZhangshiMay 25, 2020 at 5:00 pm #4988
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.
RobinMay 25, 2020 at 6:31 pm #4990
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.
ZhangshiMay 25, 2020 at 7:57 pm #4991
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.
RobinMay 27, 2020 at 5:02 am #4994
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.
- You must be logged in to reply to this topic.