Re: NDSolve initial value problem
- To: mathgroup at smc.vnet.net
- Subject: [mg99239] Re: NDSolve initial value problem
- From: dh <dh at metrohm.com>
- Date: Thu, 30 Apr 2009 06:25:45 -0400 (EDT)
- References: <gt90l4$l1t$1@smc.vnet.net>
Hi Murat,
the solution to your DEQ must be continuous. Therefore,
T[0,y]==Piecewise[{0,-1< y<1}]==0 (where I delete the superfluous part) and:
T[x, 1] == 1 for x==0
are inconsistent.
Daniel
Murat Havzalı wrote:
> Dear Mathematica users;
>
>
>
> I am trying to solve liquid heat/mass transfer equation with mixed boundary
> conditions.
>
> My code looks like this:
>
>
>
> pe=0.5;
>
> u[y]=1-y^2;
>
>
>
> sol=NDSolve[
>
> {
>
> pe*u[y]*D[T[x,y],x]==D[T[x,y],y,y],
>
>
>
> T[0,y]==Piecewise[{{-y,y<=-1},{0,-1< y<1},{1,1<=y}}],
>
>
>
> T[x,1]==1,
>
> (D[T[x,y],y]/.y->-1)==-1
>
>
>
> },
>
> T,{x,0,1},{y,-1,1},SolveDelayed->True];
>
>
>
> This returns inconsistent initial boundary conditions error.
>
> I also tried to make the piecewise initial condition, a numerical function
> namely:
>
>
>
> initial[y_?NumericQ]:=Piecewise[{{-y,y<=-1},{0,-1< y<1},{1,1<=y}}]
>
>
>
>
>
> However this did not work, too. I understand that there is a similar
> question already asked about this subject,
>
> and I tried my best to convert it to my problem but couldn't. I couldn't
> find the code but I also tried to give the
>
> initial piecewise function as a interpolating function, it returned the same
> response.
>
> Any help would be appreciated.
>
>
>
> Thanks.
>
>
>
> Murat Havzal
>
>