setting generalised Neumann boundary conditions in pdetoolbox when c is not 1
1 回表示 (過去 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 で Geometry and Mesh についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!