setting generalised Neumann boundary conditions in pdetoolbox when c is not 1
조회 수: 3 (최근 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!