找回密码
 注册
Simdroid-非首页
查看: 112|回复: 1

[11.其他多场耦合] using shadow-vriable to avoid negative concentration

[复制链接]
发表于 2008-11-29 20:47:58 | 显示全部楼层 |阅读模式 来自 黑龙江哈尔滨
Dear Srinivas,

If you had a concentration c could define c_shadow as

flc1hs(c-0.1,0.1).*c

This function shadows c while c is positive, but goes to zero as c goes
negative. Note that the region over which the function deviates from c
is controlled by the second argument to the flc1hs function. I've
attached a picture of the function to this email. Note that '.*' is
needed not '*' as this means pointwise multiplucation, not matrix
multiplucation.

The point about using these variables in models is that if you have a
chemical reaction in some subdomain


A + B -> C

and the rate is equal to constant*A*B, then if A and B go negative at
the same time, the rate ends up positive and A and B will spiral
helplessly away to very negative values.
If you define the rate as
constant*A_shadow*B_shadow (defined as above) then if A or B go negative
during the convergence process, the rate ends up at zero, and so they
don't get trapped at negative values.

Best Wishes,

Nick.

merugu_s wrote:
> Hey Nick,
> I was reading your post about negative concentration. You
> said we can use shadow variable instead of actual concentration to
> make solution converge. Can you elaborate on that.... I don't know
> much about COMSOl so your advise will help me a lot.
>
> thanks,
> Srinivas
>

--

Dr Nicholas Stevens

Corrosion and Protection Centre
School of Materials
University of Manchester
Sackville Street
P.O. Box 88
Manchester
M60 1QD

Telephone: +44 (0) 161 306 3621
Fax: +44 (0) 161 306 4865



-------------------------------------------------------

Hi,

I'm modeling using the module Chemical engineering>Convection and
Diffusion.

The result shows negative concentration even though the reaction rate,
initial value in boundary is positive.
Why does this happen?

Did anybody have any idea on how to solve this problem?

Thanks a lot

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
发表于 2009-3-9 17:24:05 | 显示全部楼层 来自 台湾
Simdroid开发平台
請問這位大大,我還是不太清楚你的設定方式。
我在source term 裡直接設
constant*flc1hs(c-0.1,0.1).*c然後直接求解嗎?
回复 不支持

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-5-15 07:44 , Processed in 0.034465 second(s), 14 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表