Equation resolution
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
I would like to write this equation in Matlab :
A (dC/dt)+ B (dC/dz)=0
with these conditions :
for t=0 and z>0 : C=C0, for z=0 and t>0 : C=0, for z=L and t>0 : dC/dz=0,
and how to resolve it. thanks for your help in advance
채택된 답변
Clemens
2011년 4월 26일
I also only see the trivial solution C(z,t) = 0
But let me take some notes and see if a something more general is possible.
Let's write as product: C(z,t) = f(z)g(t) then you got the boundary conditions:
z>0: g(0) = 0;
t>0: f(0)=0;
f'(L) =0;
Then you could choose f any function that solves these conditions.
and solve g...
A f(z) g'(t) + B f'(z) g(t) == 0
simplify to
g'(t) = - B/A f'(z)/f(z) g(t)
So the general solution would be:
g(t) = D * exp(-B/A f'/f t)
but with g(0)=0 it requires D=0
unless one is nitpicking...
- if A=0 and B=0 - you are free to choose g to anything that fullfills the boundaries.
- what if only one is 0: then either g(t)=0 or g'(t) = 0. Both together with your boundary lead to C(z,t) = 0.
- maybe if f=0 or f'=0... no then the outcome for C would C(z,t) = 0
- well actually if you construct f such that it is 0 in the range [0,L] then you could solve g without any more conditions.
- and/or if you make g such that it is 0 for t >=0 you are free to solve f analogous.
but reading the question I think the interesting area would be t>0 and z=[0,L]. So only C(z,t) = 0 in that range.
Or someone with better math skills comes for help :D
댓글 수: 2
Clemens
2011년 4월 29일
First things first. When you say "write" there are several ways depending on what you want.
I suppose you are after a numerical solution. You can use bvp4c for that. There is an example in the help.
You can also input it symbolicaly. But I never used that, so no help from me there.
But keep in mind the first post. f is not uniquely defined. So you might get many different solutions.
추가 답변 (1개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!