Neumann boundary condition in a first order PDE
이전 댓글 표시
I'm trying to solve the following equation using PDEPE:
dC/dt + v * dC/dx = constant
With the boundary conditions:
C(t,0)=Cin dC(t,L)/dx=0
My question is how can I incorporate the second BC in the PDEPE syntax, if I should define f = [-v]. Is there any posibility to call the penultime value and make it equal to ur, so dC/dx=0? u(x_n) = u(x_(n-1))
Thanks for your cooperation!
Antonio
답변 (1개)
In this case you want to set
pr = 0;
qr = -1/v; %to cancel out f
댓글 수: 11
The derivative is included in the q part, see the right hand boundary condition of example 1 of the pdepe help
Tom
2012년 9월 25일
You don't need to- the gradient is included. Can you provide some example code?
Antonio
2012년 9월 25일
Tom
2012년 9월 25일
I just realised- all the times I've used PDEPE my f term has included dudx in it... What is the equation you are solving?
Antonio
2012년 9월 25일
Tom
2012년 9월 25일
Can you post a link to the equation?
Tom
2012년 9월 25일
I'm not sure how PDEPE can deal with two time terms, maybe it would be better to solve numerically in a for loop.
Antonio
2012년 9월 25일
카테고리
도움말 센터 및 File Exchange에서 Electromagnetics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!