-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
a question about poiseuille flow #20
Comments
Hi,
This code is already using half way bounce back scheme. When you run the
simulation have you checked if the result already reach equilibrium? You
can check by plot u_max VS time. when this max velocity doesn't.change any
more it means the system reach equilibrium. I feel that if you need to run
the simulation for a longer time, you probably will get better result.
zh-shen ***@***.***> 于 2023年9月17日周日 下午2:50写道:
… Dear Dr. Yang
I want to compare the simulated results with the analytical results for
the plane poiseuille flow problem, but the simulated maximum velocity is
far from the analytical one. the parameters and the code is shown as follow:
[image: 0]
<https://user-images.githubusercontent.com/55670602/268504527-d8b4f090-973b-4766-844f-318d3b95e08e.jpg>
[image: 1]
<https://user-images.githubusercontent.com/55670602/268504717-acc07148-f857-42d3-b39b-95705d156536.jpg>
the simulated result is:
array([0. , 0.00529185, 0.01337433, 0.01914818, 0.02261291,
0.0237679 , 0.02261291, 0.01914818, 0.01337433, 0.00529183,
0. ], dtype=float32)
but the analytical maximum velocity should be 0.1
I see your paper mentioned the use of halfway bounce-back boundary
conditions for the poiseuille flow, how to make it? could you please give
to some suggestions?
—
Reply to this email directly, view it on GitHub
<#20>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQCLFXLL7FBTH2JRTNTX2353DANCNFSM6AAAAAA43UHCIA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
do i still run longer? |
Hi, due to the use of half way bounce back, you need to make your channel
width as 12 lattice (your current geometry seems is 11lattice, means actual
channel.width is 10lu). Analytical v_max should be 0.06667 not 0.1 (see the
manuscript in your first email). If you enlarge the channel to correct size
you can get better result I think
zh-shen ***@***.***> 于 2023年9月17日周日 下午3:08写道:
… thanks for your quick reply! I think the result has reached equilibrium,
you can see the screenshot
[image: 2]
<https://user-images.githubusercontent.com/55670602/268507159-78423bec-421b-4e2c-8aa4-2dae9444167a.jpg>
—
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQD35EV3JD57L3GGVSDX2377DANCNFSM6AAAAAA43UHCIA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hi,
Thanks for pointing out this issue, I have carefully checked the kernel,
found two bugs, I have fixed them and added a poiseuille flow example
(similar to yours), I tested it with different widths, and now can get
results with only ~ 3% against analytical solution. Please use git pull to
update your code and try :-)
Thanks,
Jianhui
…On Mon, 18 Sept 2023 at 03:00, zh-shen ***@***.***> wrote:
To reduce the computing time, I reduced fy. and this is the code
[image: code]
the formular I used to calculate the max velovity is $u_{max}={gH^2\over
8\nu}$, then the analytical one is $u_{max}={1/6*10^{-6}410^2 \over 8*1/6}
= 5*10^{-3}$.
and the simulated results are
[image: results0]
[image: results1]
the max velocity is stable for many time step, so i think the its reaches
equilibrium. but the simulated one didn't match the analytical one. i don't
know what the problem is
—
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQEMITH7S3AD2U2AG3DX26TM7ANCNFSM6AAAAAA43UHCIA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
:-) |
Hi I think.that shoud be fine. Taichi use single precision, so I'm not
surprised we lost some accuracy. The code in C++ double precision can give
much better result.
zh-shen ***@***.***> 于 2023年9月19日周二 上午7:51写道:
… hi,
i recalculated two case of poiseuille flow with your new code
the formular that i used to compute the max velocity is $u_{max}={fH^2\over
8 \rho \nu}$
the code of the first case is
[image: code0]
the simulated result is
[image: result0]
[image: result1]
you can see the max velocity is stable at 4.42e-4, but the analytical
result is 5e-4
the second case is your example_poiseuille_flow.py, the code is
[image: code1]
<https://user-images.githubusercontent.com/55670602/268865004-ccb0b056-8c95-4c7d-a749-a961194b42b9.jpg>
the simulated result is
[image: result2]
<https://user-images.githubusercontent.com/55670602/268865066-ebc59e1d-f381-4839-98ba-b6ce4942bb6e.jpg>
[image: result3]
<https://user-images.githubusercontent.com/55670602/268865095-860c5fe5-0646-40b2-bd51-da6c6a4a037b.jpg>
the simulated max velocity is still increase even i have simulated for
800000th step, and its value is up to 0.019685, but the analytical result
should be about 0.016875. do you think the answer is acceptable? and did i
make any mistake?
thank for your reply!
—
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQECNMXJD2ZYHBXCPX3X3E6IZANCNFSM6AAAAAA43UHCIA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
but i get the same results evenif if write ti.init(default_ip=ti.i64,default_fp=ti.f64,arch=ti.cpu,kernel_profiler=False, print_ir=False) in the beginning of the code 😥 |
Because in the code, due to parallel computing, I need to use some atomic
operation like += (this is automatically carried out with atomic operation
in Taichi), anything with atomic operation will reduce the precision to
f32. So if we want to leverage the parallelization feature, we probably can
only use f32, but if we don't need any atomic operation, yes, we can use
f64. Taichi is designed for computing graphic applications initially, they
only need f32 for most of the scenarios.
…On Tue, 19 Sept 2023 at 11:55, zh-shen ***@***.***> wrote:
but i get the same results evenif if write
ti.init(default_ip=ti.i64,default_fp=ti.f64,arch=ti.cpu,kernel_profiler=False,
print_ir=False) in the beginning of the code 😥
—
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQHTD7CNKHQE57QSJG3X3F23RANCNFSM6AAAAAA43UHCIA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
😭 |
What's the main application of your study? There might be some other small
bug in the code, I can't guarantee 100% accuracy, and that's why I share
the whole code with the community, so anyone who can find an issue and
would help to improve the quality of this code package. Any suggestion is
appreciated :-)
…On Tue, 19 Sept 2023 at 13:01, zh-shen ***@***.***> wrote:
😭
—
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQG7SHYWSUZGURLELJTX3GCS3ANCNFSM6AAAAAA43UHCIA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
i want to calculate the permeability of a porous medium, so i need to validate the code first |
we measure the permeability of a porous medium in the expriment is 0.4mD, at present, we can't get satisfying simulation results from your code. I don't want to deep into the LBM, i just want to use it as a tool to get a simulation result, do you have any recommendations on reliable LBM codes? |
You can try OpenLB or Palabos.
But you probably need to be pay attention to imaging and segmentation part,
it brings a lot of uncertainty, especially for carbonate rock of which the
pore sizes spans several orders of magnitude, one simulation won't be able
to cover all pore scales, it's difficult to selexlct REV (representative
element volume), you need to use multi scale simulation to cover different
scale of pore sizes. This is a still on going research topic.
zh-shen ***@***.***> 于 2023年9月20日周三 上午4:23写道:
… we measure the permeability of a porous medium in the expriment is 0.4mD,
at present, we can't get satisfying simulation results from your code. I
don't want to deep into the LBM, i just want to use it as a tool to get a
simulation result, do you have any recommendations on reliable LBM codes?
with best regards!
—
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQFG44TR3G2LEKYE3H3X3JOT5ANCNFSM6AAAAAA43UHCIA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
thanks for your advice 😄 |
I will spend some time to check if there is still some improvement that can
be done on the code side (maybe some tuning on MRT parameters can help to
increase the model performance), but I'm working on other issues, and can
only work on this project using my spare time. So can't guarantee when this
can be done... :-) You can try these two LB packages for now, they are well
developed and tested.
…On Wed, 20 Sept 2023 at 08:13, zh-shen ***@***.***> wrote:
thanks for your advice 😄
—
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQFXBIE4LFKSQIP7NWLX3KJRZANCNFSM6AAAAAA43UHCIA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
ok~ |
Dear Dr. Yang
I want to compare the simulated results with the analytical results for the plane poiseuille flow problem, but the simulated maximum velocity is far from the analytical one. the parameters and the code is shown as follow:
the simulated result is:
array([0. , 0.00529185, 0.01337433, 0.01914818, 0.02261291,
0.0237679 , 0.02261291, 0.01914818, 0.01337433, 0.00529183,
0. ], dtype=float32)
but the analytical maximum velocity should be 0.1
I see your paper mentioned the use of halfway bounce-back boundary conditions for the poiseuille flow, how to make it? could you please give to some suggestions?
The text was updated successfully, but these errors were encountered: