- 积分
- 15
- 注册时间
- 2008-7-20
- 仿真币
-
- 最后登录
- 1970-1-1
|
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 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
×
|