setting generalised Neumann boundary conditions in pdetoolbox when c is not 1
7 次查看(过去 30 天)
显示 更早的评论
I have a rectangle with no flux on two sides and flux proportional to concentration on the other two sides. (I am modelling diffusion in a cylindrical well with some loss). I have set the boundary condition matrix to
1 1 1 1
0 0 0 0
3 3 1 1
1 1 1 1
46 46 48 48
48 48 48 48
49 49 48 48
48 48 48 48
so that q is 0 on two sides and .01 on the other two. g is 0 always.
But my PDE equation has d = x, c = x, a = 0 and f = 0 in the PDEtoolbox format. and the boundary condition equation has n*c*grad(u) + qu = g. So should I be dividing q by x in the boundary condition matrix?
0 个评论
回答(1 个)
Bill Greene
2013-8-5
编辑:Bill Greene
2013-8-5
Hi,
If I understand your BC correctly,
>flux proportional to concentration
you would like to set n*c*grad(u) (flux through the boundary) equal -.01*u?
Basically, PDE Toolbox "knows" the value of flux on an edge because you have specified the particular edge in defining your BC. So, as long as your definition of flux is the same as PDE Toolbox (i.e. n*c*grad(u)), you don't need to divide by c.
If I misundersood the question, let me know and I'll try again ;-)
Bill
2 个评论
Bill Greene
2013-8-5
The "standard" definition of a flux boundary condition in a diffusion problem is: n*c*grad(u). But, if you want to apply a BC that is simply grad(u), that is perfectly fine. But, as you suspected, you would need to divide by the value of c on that boundary. If you include the variable 'x' in the expression for your BC, PDE Toolbox will automatically substitute the appropriate value for x on the boundary.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Boundary Conditions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!