-
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 #17
Comments
Hi, thanks for your interest. I think there are two things you can check:
1. if you are using uniform bodyforce to drive the fluid and periodic
boundary conditions, there might not be too much change on rho, especially
for channel flow.
2. you probably need to click rescale button in paraview to make sure the
visualization range is reasonable for your data at different times.
Initially the rho is uniform everywhere, but they might become not uniform
after several time steps, now you need to click this rescale button to make
visualization scale consistent to your "current data range".
[image: image.png]
Thanks, if you have any questions, please let me know
…On Mon, 7 Aug 2023 at 07:54, Vivia93 ***@***.***> wrote:
Dear author,
Hello. Thank you very much for publishing your work. I am greatly
benefited from studying. In the post-processing stage, I have a question.
When processing a group in Paraview, I chose the "rho" option, but the
images in each step did not change. What is the reason for this? Is it a
normal phenomenon?
I hope to receive your answer.
—
Reply to this email directly, view it on GitHub
<#17>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQH6X7EIZ7U7OX6CHMLXUCGMFANCNFSM6AAAAAA3GQ26VE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hi,
Please don't use density to define different phases, this LBM two phase
code is a color gradient method, so we have another variable phi to
represent the ratio of water/oil at every lattice. this phi is updated with
a convection-diffusion equation, the velocity field is calculated using
normal LBM, so there are two input file, in code lbm_solver_3d_2phase.py,
find the line: solid_np, phase_np = init_geo('./img_ftb131.txt',
'./phase_ftb131.dat')
This is the line to define geometry, and initial water/oil distribution
(phase_ftb131.dat, 1=water, -1=oil), more details can be found in paper
attached with this email, this code actually is a Taichi implementation of
this paper, please refer to this paper for more details.
…On Mon, 28 Aug 2023 at 13:39, Vivia93 ***@***.***> wrote:
Hello,Dr.Yang,
Thank you very much for your answer. I have a question that I would like
to ask. In the lbm_solver_3d_2phase.py file,I want to simulate gas (non
wetting phase) entering water saturated rocks (wetting phase),but the code
does not specify the density used to replace the fluid, so I only changed
the viscosity of the fluid. From the simulation results, it can be seen
that there is not much change in density. If possible, can we express the
density used to drive the fluid?
[image: 5]
<https://user-images.githubusercontent.com/130535694/263704107-e18cb487-76a9-4dfd-ae0d-67c0f09b7bcd.jpg>
[image: 40]
<https://user-images.githubusercontent.com/130535694/263704142-2df4471c-c961-46ec-bce8-d30edeccd3c8.jpg>
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQBVYXV2DZ3T5CA56RLXXSGQPANCNFSM6AAAAAA3GQ26VE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hello Dr. Yang, Thank you for your answer. May I ask if it is possible to calculate the saturation of the water and gas phases in the lbm_solver_3d_2phase.py file, and then use this to calculate the relative permeability? In the phase file, I defined 1 as the water phase and -1 as the gas phase.. You mentioned that psi represents the water/air ratio (the original code is water/oil). Can I use psi to calculate the relative permeability? Looking forward to your reply. |
Hi,
phi is a measure of water/oil ratio at each lattice. If you want to
calculate saturation, you need to iterate all fluid lattice, count how many
fluid lattices with phi>0 then use this number to divide total fluid
lattice number, you will get the water saturation :-)
Jianhui
…On Fri, 1 Sept 2023 at 10:47, Vivia93 ***@***.***> wrote:
Hello Dr. Yang,
Thank you for your answer. May I ask if it is possible to calculate the
saturation of the water and gas phases in the lbm_solver_3d_2phase.py file,
and then use this to calculate the relative permeability?
In the phase file, I defined 1 as the water phase and -1 as the gas
phase.. You mentioned that psi represents the water/air ratio (the original
code is water/oil). Can I use psi to calculate the relative permeability?
Looking forward to your reply.
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQGCVJBBH2IJD6OLMBDXYGVK5ANCNFSM6AAAAAA3GQ26VE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Looks like there is something not quite feasible in simulation
configuration... Can you visualize the distribution of initial air and gas?
what are their viscosity? What's the bodyforce you're using to drive the
fluid?
…On Sat, 2 Sept 2023 at 09:42, Vivia93 ***@***.***> wrote:
Hello Dr. Yang,
I calculated the saturation of the water and gas phases, but when I
reached 200 steps, I suddenly encountered an error, and the output vtk file
was also incorrect. May I ask what caused this issue?
[image: 1693643508(1)]
<https://user-images.githubusercontent.com/130535694/265192516-ac2074d8-21de-4e3e-8eb4-d6c85ce37540.png>
[image: 1693643759(1)]
<https://user-images.githubusercontent.com/130535694/265192663-d7c062b2-95a2-4c1e-bc13-9e273234b11c.png>
[image: 1693643812(1)]
<https://user-images.githubusercontent.com/130535694/265192761-9a102276-bc81-4a48-a1b8-8497e5786cf3.png>
[image: 1693644032(1)]
<https://user-images.githubusercontent.com/130535694/265193114-b50fa352-2c35-4fcf-80b8-0fc370390258.png>
[image: 1693644068(1)]
<https://user-images.githubusercontent.com/130535694/265193129-8b08a239-6f56-48dd-a4bd-4a62810c9ac1.png>
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQGX37CGWYR2CTVSKTLXYLWORANCNFSM6AAAAAA3GQ26VE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I set the viscosity of air and water separately
niu_l = 0.001 #psi>0
niu_g = 0.000018 #psi<0
And I also set the phase. txt to represent the initial two-phase distribution, as my model is 150x150x150, the 150 points in the two-phase file I set are a group, with six points in one group being the gas phase and the other being the water phase.
I have not modified the bodyforce used to drive the fluid.
ext_f[None] = ti.Vector([fx,fy,fz])
叶落何翩翩
***@***.***
…------------------ 原始邮件 ------------------
发件人: "yjhp1016/taichi_LBM3D" ***@***.***>;
发送时间: 2023年9月2日(星期六) 下午4:46
***@***.***>;
***@***.******@***.***>;
主题: Re: [yjhp1016/taichi_LBM3D] A question (Issue #17)
Looks like there is something not quite feasible in simulation
configuration... Can you visualize the distribution of initial air and gas?
what are their viscosity? What's the bodyforce you're using to drive the
fluid?
On Sat, 2 Sept 2023 at 09:42, Vivia93 ***@***.***> wrote:
> Hello Dr. Yang,
> I calculated the saturation of the water and gas phases, but when I
> reached 200 steps, I suddenly encountered an error, and the output vtk file
> was also incorrect. May I ask what caused this issue?
>
> [image: 1693643508(1)]
> <https://user-images.githubusercontent.com/130535694/265192516-ac2074d8-21de-4e3e-8eb4-d6c85ce37540.png>
> [image: 1693643759(1)]
> <https://user-images.githubusercontent.com/130535694/265192663-d7c062b2-95a2-4c1e-bc13-9e273234b11c.png>
> [image: 1693643812(1)]
> <https://user-images.githubusercontent.com/130535694/265192761-9a102276-bc81-4a48-a1b8-8497e5786cf3.png>
> [image: 1693644032(1)]
> <https://user-images.githubusercontent.com/130535694/265193114-b50fa352-2c35-4fcf-80b8-0fc370390258.png>
> [image: 1693644068(1)]
> <https://user-images.githubusercontent.com/130535694/265193129-8b08a239-6f56-48dd-a4bd-4a62810c9ac1.png>
>
> —
> Reply to this email directly, view it on GitHub
> <#17 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AJEDKQGX37CGWYR2CTVSKTLXYLWORANCNFSM6AAAAAA3GQ26VE>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Hi,
The reason is you're using too small viscosity. The fluid part of this two
phase LBM is a normal MRT-LBM, I won't use any viscosity smaller than 0.01.
And viscosity contrast between two phases will greatly impact the stability
of your simulation. So I suggest you''re using same viscosity for two
phrases and keep them larger than 0.01. If you're problem is capillary
dominate (very low capillary number < 1e-4), this is fine, as the
dominating force is capillary not viscous/inertia, but if your problem is
inertia dominate (capillary number > 1e-3), you probably can't use this two
phase LBM, you need to try some other approaches.
…On Sat, 2 Sept 2023 at 10:04, Vivia93 ***@***.***> wrote:
I set the viscosity of air and water separately
niu_l = 0.001 #psi>0
niu_g = 0.000018 #psi<0
And I also set the phase. txt to represent the initial two-phase
distribution, as my model is 150x150x150, the 150 points in the two-phase
file I set are a group, with six points in one group being the gas phase
and the other being the water phase.
I have not modified the bodyforce used to drive the fluid.
ext_f[None] = ti.Vector([fx,fy,fz])
叶落何翩翩
***@***.***
------------------ 原始邮件 ------------------
发件人: "yjhp1016/taichi_LBM3D" ***@***.***>;
发送时间: 2023年9月2日(星期六) 下午4:46
***@***.***>;
***@***.******@***.***>;
主题: Re: [yjhp1016/taichi_LBM3D] A question (Issue #17)
Looks like there is something not quite feasible in simulation
configuration... Can you visualize the distribution of initial air and
gas?
what are their viscosity? What's the bodyforce you're using to drive the
fluid?
On Sat, 2 Sept 2023 at 09:42, Vivia93 ***@***.***> wrote:
> Hello Dr. Yang,
> I calculated the saturation of the water and gas phases, but when I
> reached 200 steps, I suddenly encountered an error, and the output
vtk file
> was also incorrect. May I ask what caused this issue?
>
> [image: 1693643508(1)]
> <
https://user-images.githubusercontent.com/130535694/265192516-ac2074d8-21de-4e3e-8eb4-d6c85ce37540.png>
> [image: 1693643759(1)]
> <
https://user-images.githubusercontent.com/130535694/265192663-d7c062b2-95a2-4c1e-bc13-9e273234b11c.png>
> [image: 1693643812(1)]
> <
https://user-images.githubusercontent.com/130535694/265192761-9a102276-bc81-4a48-a1b8-8497e5786cf3.png>
> [image: 1693644032(1)]
> <
https://user-images.githubusercontent.com/130535694/265193114-b50fa352-2c35-4fcf-80b8-0fc370390258.png>
> [image: 1693644068(1)]
> <
https://user-images.githubusercontent.com/130535694/265193129-8b08a239-6f56-48dd-a4bd-4a62810c9ac1.png>
>
> —
> Reply to this email directly, view it on GitHub
> <
#17 (comment)>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AJEDKQGX37CGWYR2CTVSKTLXYLWORANCNFSM6AAAAAA3GQ26VE>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID:
***@***.***>
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQBQIIKZMGAYLGKUP5TXYLZBDANCNFSM6AAAAAA3GQ26VE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hello,Dr.Yang, In the two-phase flow simulation, I found that you set CapA=0.005, and I reset this parameter to CapA=0.0005 during the simulation. I have noticed that the displacement speed has increased. Is there any basis or range for the value of CapA parameter? |
Hu, this is what we expect. small CapA means smaller surface tension, also
means smaller capillary force, so it's easier to push the interface. If we
use a very big CapA, it will make numerical stability issue, so I will keep
CapA between 0.0 - 0.1
Vivia93 ***@***.***> 于 2023年9月25日周一 上午6:46写道:
… Hello,Dr.Yang,
In the two-phase flow simulation, I found that you set CapA=0.005, and I
reset this parameter to CapA=0.0005 during the simulation. I have noticed
that the displacement speed has increased. Is there any basis or range for
the value of CapA parameter?
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQEKRJBVM2MXCWNZZ23X4ELCVANCNFSM6AAAAAA3GQ26VE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
您好,请问您是如何将数据转换为需要的solid_np,phase_np = init_geo('./img_ftb131.txt' ,'./phase_ftb131.dat')这是定义几何形状和初始水/油分布的线(phase_ftb131.dat,1=水,-1=油)这2个文件的呢?img_ftb131是先按照切片数为第一层循环,然后按照行为第二层循环,再按照列为第三层循环进行读取CT的数据嘛?同样的,phase_ftb131相分布数据,是同样的顺序,然后将第一个切片的像素为0的位置设置为1,其余位置是-1,其余切片不用设置1和-1嘛? |
img_ftb131和phase_ftb131的matlab生成如下: clc;clear;close all; ImgPath = "自己的路径" lens = size(matFiles); end imgftb300_2D = reshape(imgftb300, 300300, 300); |
你好,solid_np 和 phase_np 都是按照一样的顺序组织的:
比如如果solid_np 是一个三维数组 那么文件image_ftb131.txt 里面的顺序是:
for k in range(nz):
for j in range(ny):
for i in range(xn):
print(solid_np[i,j,k])
同样的顺序也用于 phase_ftb131.dat 上。 区别就是在img_ftb131.txt 也就是Geometry 的定义中 0 = Void,
1 = Solid,
第二个文件phase_ftb131.dat 是定义初始的油水分布的, -1 = non-wetting phase, 1 = wetting
phase, 对于solid 的位置,phase 可以随便写1 或者 -1
如果有不清楚的可以在问我
…On Sun, 8 Oct 2023 at 02:59, renxiaosa00 ***@***.***> wrote:
solid_np,phase_np = init_geo('./img_ftb131.txt'
,'./phase_ftb131.dat')这是定义几何形状和初始水/油分布的线(phase_ftb131.dat,1=水,-1=油)
您好,请问您是如何将数据转换为需要的solid_np,phase_np = init_geo('./img_ftb131.txt'
,'./phase_ftb131.dat')这是定义几何形状和初始水/油分布的线(phase_ftb131.dat,1=水,-1=油)这2个文件的呢?img_ftb131是先按照切片数为第一层循环,然后按照行为第二层循环,再按照列为第三层循环进行读取CT的数据嘛?同样的,phase_ftb131相分布数据,是同样的顺序,然后将第一个切片的像素为0的位置设置为1,其余位置是-1,其余切片不用设置1和-1嘛?
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQDSJ4RCWARRXZH3FWTX6ICIBAVCNFSM6AAAAAA3GQ26VGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJRHA4TCNZYHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
我是为了计算二氧化碳进入水的过程,参数设置如下: |
我是计算二氧化碳进入水的两相流模拟过程,数据大小也是150150150 |
体力是指fx, 或者fy, 或者fz, 例子中我给fx fy
都加了力,是为了让诸如过程快一些,从多个方向都有流动,正常模拟实验状态的画,只用定义一个方向的f, 取决于你想从哪个方向注入
你上面给出的就是周期边界了,因为没有选取任何边界使用压力或者速度边界条件,默认就是周期
颜色边界是让某一个inlet, outlet 固定颜色,是再这里定义, 下面就是X 方向的左面定义为固定颜色,为non-wetting
相,也就是从periodic 流动回来的在这里会被重新定义为non-wetting, 也就是如果X_left是inlet,
我们这里只注入non-wetting
bc_psi_x_left, psi_x_left = 1, -1.0 # boundary condition for
phase-field: 0 = periodic,
bc_psi_x_right, psi_x_right = 0, 1.0 # 1 = constant value on the
boundary, value = -1.0 phase1 or 1.0 = phase 2
bc_psi_y_left, psi_y_left = 0, 1.0
bc_psi_y_right, psi_y_right = 0, 1.0
bc_psi_z_left, psi_z_left = 0, 1.0
bc_psi_z_right, psi_z_right = 0, 1.0
…On Wed, 18 Oct 2023 at 08:36, renxiaosa00 ***@***.***> wrote:
好的,谢谢您!
(1)“体力1e-3”指的是fx fy 嘛?
(2)周期边界加固定颜色指的是边界条件的bcxr嘛?比如说以下图片的设置这块嘛
[image: image]
<https://user-images.githubusercontent.com/36992106/276147806-a9d39b81-1364-42fa-8a33-5859f626a424.png>
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQF4RTVSHC2DF5JQC7LX76BHXAVCNFSM6AAAAAA3GQ26VGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRXHA2DONBRGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
你的模拟结果看起来好像是可以的,你先不要可视化geometry, 你把trehsold 选只可视化<0 的部分(phi), opacity 选1
然后从file, 选择文件,再重新打开一个结果文件,选择geoemtry 标签,这时候你可以使用counter 来可视化geometry
的表面,然后对这个表面选opacity
0.5左右(你自己尝试一个合适的值),就能差不多可视化出来多孔介质里面流体流动情况了。这个属于paraview操作的小trick 的问题 😀
…On Tue, 24 Oct 2023 at 09:18, renxiaosa00 ***@***.***> wrote:
[image: 68c876d5a933e36998707402bf6d24f]
<https://user-images.githubusercontent.com/36992106/277593217-174787fc-4b10-45d7-ab2f-eb80b079795a.jpg>
[image: c72a90993d5c5e31cd68c041ee047a1]
<https://user-images.githubusercontent.com/36992106/277593255-43e15465-efab-492d-9af9-ccb655f040b6.jpg>
我设置了threshold,但是好像选择的opacity不太对,只要这块不是1,图像就没了,似乎是没找对geometry部分opacity,请问这个是在哪里找到的呢?我搜的可视化方法基本上很少有这个介绍。
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQB3MPE7RAIDVR6XKB3YA52VRAVCNFSM6AAAAAA3GQ26VGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZWG42DAMZRHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
好的,谢谢您的指导,我属实是第一次接触多相流,真是太感谢您的指导了!就是我的出口总是在刚开始迭代的时候就产生相的变化,按理说刚开始二氧化碳进入孔隙的时候左边入口才开始慢慢移动,右边出口不该出现二氧化碳的,但是无论我怎么尝试,刚开始进入二氧化碳时,出口总是有二氧化碳存在,之前也听您解释过这个原因,但是改参数总也不知道哪些值往哪些方向改,就有些不知所措了 |
应该是右边像左边一样也需要使用固定颜色边界,你试试看
renxiaosa00 ***@***.***> 于 2023年10月25日周三 上午2:10写道:
…
好的,谢谢您的指导,我属实是第一次接触多相流,真是太感谢您的指导了!就是我的出口总是在刚开始迭代的时候就产生相的变化,按理说刚开始二氧化碳进入孔隙的时候左边入口才开始慢慢移动,右边出口不该出现二氧化碳的,但是无论我怎么尝试,刚开始进入二氧化碳时,出口总是有二氧化碳存在,之前也听您解释过这个原因,但是改参数总也不知道哪些值往哪些方向改,就有些不知所措了
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQEPFJPUSZK2HEWKYMTYBBRJVAVCNFSM6AAAAAA3GQ26VGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZYGMYTKNZSHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
我的颜色边界采用的默认的代码: |
把第二行改成1 1.0 意思是使用固定颜色边界,边界上的颜色固定为1.0
renxiaosa00 ***@***.***> 于 2023年10月25日周三 上午8:03写道:
… 我的颜色边界采用的默认的代码:
bc_psi_x_left, psi_x_left = 1, -1.0
bc_psi_x_right, psi_x_right = 0, 1.0
bc_psi_y_left, psi_y_left = 0, 1.0
bc_psi_y_right, psi_y_right = 0, 1.0
bc_psi_z_left, psi_z_left = 0, 1.0
bc_psi_z_right, psi_z_right = 0, 1.0
“右边像左边一样也需要使用固定颜色边界”指的是不是bc_psi_x_right, psi_x_right = 1,
-1.0啊?这样就能跟左边的bc_psi_x_left, psi_x_left颜色边界一样了
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQGGCUXZAZGBMRY7HOLYBC2V5AVCNFSM6AAAAAA3GQ26VGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZYGY2DAMRRGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
我看后面备注是 1 = constant value on the boundary, value = -1.0 phase1 or 1.0 = phase 2,那么是不是bc_psi_x_right, psi_x_right = 1, 2.0啊?毕竟刚开始的初始条件右边出口按理说得是phase 2-水,左边入口才是-1对应的二氧化碳吧?是不是变量我理解错了,比如bc_psi是设置颜色的,psi是设置别的什么参数的?其实我没太搞懂pis_x/y/z, psi_solid分别是什么意思。 |
颜色LBM 使用phi 来表示non-wetting phase 或者wetting phase, phi的值一般介于-1.0 到 1.0
之间,我们一般可以简单的认为小于零的就是non-wetting phase, 大于0的是wetting phase
(也和接触角有关,接触角变了也可能这两个反过来)。我那里写的-1.0 = phase 1 意思就是-1.0 表示non wetting phase,
1.0 = phase 2 意思是1.0 表示phase 2 (wetting phase). 所以这里第二行改为1 1.0
意思就是右边使用颜色边界,边界上固定为phi = 1.0 (也就是wetting phase)
…On Wed, 25 Oct 2023 at 08:40, renxiaosa00 ***@***.***> wrote:
我看后面备注是 1 = constant value on the boundary, value = -1.0 phase1 or 1.0 =
phase 2,那么是不是bc_psi_x_right, psi_x_right = 1, 2.0啊?毕竟刚开始的初始条件右边出口按理说得是phase
2-水,左边入口才是-1对应的二氧化碳吧?是不是变量我理解错了,比如bc_psi是设置颜色的,psi是设置别的什么参数的?其实我没太搞懂pis_x/y/z,
psi_solid分别是什么意思。
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQDV52U3YWGTHYKL7NTYBC667AVCNFSM6AAAAAA3GQ26VGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZYGY4TCNZSGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hello! I would like to ask, what is the unit of 'niu'? |
It is in lattice unit, you need to convert it into a physical unit using
dimensional analysis. This is a big subject, you need to read some
references. For example:
https://www.sciencedirect.com/science/article/pii/S001793101834835X
…On Thu, 2 Nov 2023 at 07:47, hangqqq ***@***.***> wrote:
Hello! I would like to ask, what is the unit of 'niu'?
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQGWYQDXT4SBXARYJLLYCNF2RAVCNFSM6AAAAAA3GQ26VGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJQGIZDMNJSGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
It means your simulation didn't converged. This might due to two reasons:
1. Try using same viscosity for both phases and keep them bigger than 0.1
2. Your mesh resolution is too low, try using a better mesh
renxiaosa00 ***@***.***> 于 2023年11月15日周三 上午6:52写道:
… [image: 1698648606301]
<https://user-images.githubusercontent.com/140054215/278961736-3f28c9ee-f240-48c1-a767-a0710194c94a.png> [image:
1698648515606]
<https://user-images.githubusercontent.com/140054215/278961804-3187f0ca-6289-4447-a520-5e78c4ac1d7a.png>
I would like to ask what is the reason for this sudden decline and the
results that come out later?
How to generate the water saturation and air saturation?
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQGEVIQBAW2BAE36LI3YERRA7AVCNFSM6AAAAAA3GQ26VGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJRHA4TONRUHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
您好,请问计算饱和度的时候,water_lattices and total_fluid_lattices是怎么定义的呢?我看python里面没有A[None] = int(count)的定义模式啊 |
A[None]
这个不是python里面的变量定义方式,这个是Taichi里面定义的张量,如果这个张量就是一个单个的元素,就这么赋值或者读取。所以如果你需要把water_lattices
这种变量在Taichi scope里面使用,需要在最前面定义为Taichi scope的单变量张量,这样就能在Taichi scope里面使用了
(充分利用GPU 并行的便利)
…On Tue, 28 Nov 2023 at 07:44, renxiaosa00 ***@***.***> wrote:
40bea3b184dd025e80ea7371255d6fb.jpg (view on web)
<https://github.com/yjhp1016/taichi_LBM3D/assets/36992106/51ae8080-2423-4e4a-8465-7b62af8e4678>
我总是报这样的错误额,迭代前声明total_fluid_lattices={"None":1}也不对。
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQDYIXB3PEPO2FN6F7LYGWI7PAVCNFSM6AAAAAA3GQ26VGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRZGI3TCMRYGA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
# Declares a 0D scalar field whose data type is f32
f_0d = ti.field(ti.f32, shape=()) # 0D field
…On Wed, 29 Nov 2023 at 08:27, renxiaosa00 ***@***.***> wrote:
1cdcdf98b626e648ff4e3d1299f38dca.JPG (view on web)
<https://github.com/yjhp1016/taichi_LBM3D/assets/36992106/677649ea-0210-4426-8f1e-050e64ba3ecb>
这是我定义的方式,结果不对额
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQHWTWT23WRY4BZVYVTYG3WY7AVCNFSM6AAAAAA3GQ26VGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZRGQZTENZTHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
嗯,好的,可视化这块似乎是我的模拟出问题了,把骨架当做孔隙了,所以一直显示不对劲。我换了数据结构后,再次模拟的时候,niu_l niu_g都是0.1,然后改变fx fy capA,psi_solid后,二氧化碳饱和度总是出现突然上升,比如模拟一段时间后CO2饱和度是0.5,下一步直接就0.9了,请问这种是一般因为什么原因啊? |
突然上升一般是simulation crash 了,你用的边界条件全是periodic 吗? 你的孔隙结构是否对称?
试着降低CapA 试试, CapA 是表面张力的参数,一般数值不稳定都出现在界面处,所以降低表面张力有利于数值温度
另外只用一个方向的bodyforce试试,比如只有fx 不要这么大,试试fx=1e-4之类的
CapA fx,fy范围和geometry 有关系 (其实是网格解析度),不好说一个范围
…On Sat, 9 Dec 2023 at 07:32, renxiaosa00 ***@***.***> wrote:
image.png (view on web)
<https://github.com/yjhp1016/taichi_LBM3D/assets/36992106/ff718757-f737-4ff8-b4a4-4bcfc08255f4>
这是我的孔隙结构,然后,设置niu_l = 0.1, niu_g = 0.1,psi_solid = 0.7, fx=5e-3
fy=-5e-3,CapA = 2e-3模拟结果CO2饱和度会突然饱和,改变capA分别为2e-2 or
2e-1,都会发生这样的突然饱和,这种情况在流动上显示的是,刚开始在孔隙流动,突然下一步就饱和了,这个一般是要怎么根据结构调整参数呢,我看psi_solid
范围是【-1,1】这个对应实际角度是怎么个换算关系呢?还有capA,fx,fy的实际应用范围是什么样呢?
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQEOCVLAM77KM7NRYQLYIQH2FAVCNFSM6AAAAAA3GQ26VGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBYGI4TEMRYGA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
如果使用periodic 边界条件那geometry必须要对称啊。。。
正负表示方向。fx 为正表示在x方向上在正方向上施加力,负表示x方向上负方向上施加力
renxiaosa00 ***@***.***> 于 2023年12月9日周六 上午8:58写道:
… image.png (view on web)
<https://github.com/yjhp1016/taichi_LBM3D/assets/36992106/b567586d-5f1d-43d5-ad9c-343280d1d0bd>
这是我的边界条件,孔隙结构不对称。目前fx=5e-4确实还没crash。还有fx fy 设置的值其中存在负的,这表示是什么意思呢?
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQF3JIUTC4P3G6IN25DYIQR47AVCNFSM6AAAAAA3GQ26VGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBYGMZTEOBQGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
老师,请问, |
老师,如果可以的话,我可以申请添加您联系方式么?我的QQ是1379289573,微信rxs137,邮箱rxsjiayou@163.com,您方便的话可以任选其中一个进行交流。 |
fx, fy, fz 不是压力,是bodyforce, 是对所有流体点施加的均匀的力,比如重力就是这种体力。
如果使用了压力边界也还是可以施加体力的,可以根据你的情况定。
你说的使用压力边界的方法基本正确,只是这个边界的rho值需要小心选择,压力边界不是个数值上很稳定的方法,需要小心使用。。。
如果你的geometry不对称可以把你的geometry在比如说x方向上做个镜像,这样虽然大小增加了一倍,就可以使用周期边界加体力了,避开了压力边界
我们最好可以在这里交流,这样你的问题别人没准遇到了也能得到解答😃
如果你的geometry
renxiaosa00 ***@***.***> 于 2023年12月10日周日 上午3:32写道:
… image.png (view on web)
<https://github.com/yjhp1016/taichi_LBM3D/assets/36992106/746555a0-a264-4f34-92e3-03f8c448424b>
mo'ni模拟的时候,出口这块感觉应该还没流到这块,但是这块相已经改变了。请问这个是什么原因呢?
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQCL7N7NYPSXWFSBCZLYIUUNBAVCNFSM6AAAAAA3GQ26VGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBYHA2DMNRUGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
老师,请问bodyforce的三个变量fx, fy, fz,rho,vx_bcxl, vy_bcxl, vz_bcxl 三个方向组合的速度,capA, psi_solid对应的物理量单位是怎么换算的呢?可以参考哪个说明手册呢? |
LBM 单位换算是个大话题,不是很直接,有很多资料讲这方面的:
https://www.sciencedirect.com/science/article/abs/pii/S001793101834835X
https://palabos-forum.unige.ch/t/lattice-boltzmann-units-example/33
https://www.biofm-research.com/wp-content/uploads/2021/07/Krueger_Edmonton_scaling.pdf
…On Mon, 11 Dec 2023 at 05:23, renxiaosa00 ***@***.***> wrote:
老师,请问bodyforce的三个变量fx, fy, fz,rho,vx_bcxl, vy_bcxl, vz_bcxl
三个方向组合的速度,capA, psi_solid对应的物理量单位是怎么换算的呢?可以参考哪个说明手册呢?
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQAHRTCYCUZ6KLSODS3YI2KEFAVCNFSM6AAAAAA3GQ26VGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBZGM2DONRUGI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
好的,谢谢老师!有一个关于粘度比的设置问题,我看颜色梯度模型基本上都是设置的粘度比,而本程序中是直接设置了粘度,并且粘度不同也不是代表不同的流体,不同的流体是通过相文件控制的,那么这块如果要设置不同的粘度比的话,是怎么进行固定一个设置另一个的呢?并且目前的粘度都是0.1,这个跟实际的比如谷歌搜的二氧化碳,水的粘度是怎么对照的呢? |
粘度比通过直接设置不同的粘度就可以实现了,不过粘度需要在合理范围内,由于LBM是固定dt和dx的,所以粘度不能太小,两相流由于界面存在,数值稳定性比单相的差,所以最好粘度比不要大于5
(这是经验值)
无法直接实现真实的二氧化碳和水,需要根据你的case情况做简化,比如如果你的case雷诺数很低,说明粘性力不主导,那粘度比用1也可以,需要你根据你的情况综合考虑
renxiaosa00 ***@***.***> 于 2023年12月19日周二 上午3:37写道:
…
好的,谢谢老师!有一个关于粘度比的设置问题,我看颜色梯度模型基本上都是设置的粘度比,而本程序中是直接设置了粘度,并且粘度不同也不是代表不同的流体,不同的流体是通过相文件控制的,那么这块如果要设置不同的粘度比的话,是怎么进行固定一个设置另一个的呢?并且目前的粘度都是0.1,这个跟实际的比如谷歌搜的二氧化碳,水的粘度是怎么对照的呢?
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQFLDPOWIS6R5UYBETLYKEDWJAVCNFSM6AAAAAA3GQ26VGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRSGA2TKMJSHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
我觉得这个是对的吧,表面张力越小,毛细力的阻力也越小,越容易注入,另外我觉得你的CapA最后那个2e-1太大了,除非你用更细的网格,不然结果不可靠我觉得,界面附近的库朗数可能已经超过一了
renxiaosa00 ***@***.***> 于 2024年1月1日周一 上午2:20写道:
… 老师,我按照您的建议,其余参数不变,设置了不同的capA,发现CO2饱和度增加的结果好像有些不对,结论是capA越小,CO2饱和度增加地越快。比如下面图是不同地capA:2e-3
2e-2 2e-1,看结论反而是2e-3的CO2增长的越快,我看一般都是capA越大CO2增长地越快,但这个怎么反过来了?
image.png (view on web)
<https://github.com/yjhp1016/taichi_LBM3D/assets/36992106/f64ead68-c784-4893-b106-e7d21b62450b>
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQGVWAXA5KHXSL7R4CDYMIMOZAVCNFSM6AAAAAA3GQ26VGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZTGEYDSNRZHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
我觉你的force 有点大了,另外你如果计算下毛系数,我感觉你这个case 不是capillary dominate.
这个是固定网格尺寸的LBM, 数值稳定性不是很好,需要小心取这些参数
…On Fri, 19 Jan 2024 at 13:02, Vivia93 ***@***.***> wrote:
X4.R.D.5TWXJRF.Y9BEY1.G.png (view on web)
<https://github.com/yjhp1016/taichi_LBM3D/assets/130535694/33afe821-2d4a-4701-bddd-4bdf9424fc2a>
请问为什么我模拟出来表面张力系数越大,速度越大呢?表面张力系数我取的是0.005和0.003
0.003:
image.png (view on web)
<https://github.com/yjhp1016/taichi_LBM3D/assets/130535694/ae1dbb27-aec6-4fb7-965b-b16a1a0f0a9c>
0.005:
image.png (view on web)
<https://github.com/yjhp1016/taichi_LBM3D/assets/130535694/c6577dcf-c2ef-41e0-8047-d585386d5c1a>
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEDKQBM2UNIODLAZRVBQFTYPJVHBAVCNFSM6AAAAAA3GQ26VGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBQGM4TEMJYGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Dear author,
Hello. Thank you very much for publishing your work. I am greatly benefited from studying. In the post-processing stage, I have a question. When processing a group in Paraview, I chose the "rho" option, but the images in each step did not change. What is the reason for this? Is it a normal phenomenon?
I hope to receive your answer.
The text was updated successfully, but these errors were encountered: