Re: Partial differential equation with evolving boundary conditions
- To: mathgroup at smc.vnet.net
- Subject: [mg91498] Re: Partial differential equation with evolving boundary conditions
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Sun, 24 Aug 2008 07:05:33 -0400 (EDT)
- References: <g8o868$l6k$1@smc.vnet.net>
Hi, a) the code DSolve[{\[Lambda];\[Lambda]s;emax;dutycycle;...}__] is total useless because emax; make nothing .. b) you can't have a first order equation on the boundary for theta[1|0,t] you must integrate that to get \[Theta][0, t] == Exp[-t/\[Lambda]s], \[Theta][1, t] == Exp[-t/\[Lambda]s] c) this is inconsistent with \[Theta][y,0]==0 and no soulution would exist. d) the classical way is to think about the existence and uniqueness of the solution *before* a analytical or numeric solution is attempt. e) Manipulate[s = NDSolve[{ \!\( \*SubscriptBox[\(\[PartialD]\), \(y, y\)]\ \(\[Theta][y, t]\)\) + elecy[t]*(5 - \[Theta][y, t])*y*(1 - y) == \[Lambda]*\!\( \*SubscriptBox[\(\[PartialD]\), \(t\)]\(\[Theta][y, t]\)\), \[Theta][0, t] == Exp[-t/\[Lambda]s], \[Theta][1, t] == Exp[-t/\[Lambda]s], \[Theta][y, 0] == 1}, \[Theta], {y, 0, 1}, {t, 0, 2}]; Plot3D[\[Theta][y, t] /. s, {y, 0, 1}, {t, 0, 2}, PlotStyle -> Automatic, PlotRange -> {0, 5}], {{emax, 25., "emax"}, 0, 100, Appearance -> "Labeled"}, {{dutycycle, 0.25, "dutycycle"}, 0, 1, Appearance -> "Labeled"}, {{\[Lambda], 1., "\[Lambda]"}, 0.001, 10, Appearance -> "Labeled"}, {{\[Lambda]s, 1., "\[Lambda]s"}, 0.001, 10, Appearance -> "Labeled"}, Initialization :> (elecy[t_] := Which[0 <= Mod[t, 1] <= dutycycle, emax, dutycycle < Mod[t, 1] <= 1, 0.]), ContinuousAction -> False, ControlPlacement -> Top] work fine. Regards Jens Ingolf Dahl wrote: > Best friends! > I am trying to solve a partial differential equation (in principle the heat > equation) with boundary conditions that also evolve with time. For instance > this works for me: > > Manipulate[s=NDSolve[{\[Lambda];emax;dutycycle;\!\( > \*SubscriptBox[\(\[PartialD]\), \(y, y\)]\ \(\[Theta][y, > t]\)\)+elecy[t]*(5-\[Theta][y,t])*y*(1-y)==\[Lambda]*\!\( > \*SubscriptBox[\(\[PartialD]\), \(t\)]\(\[Theta][y, t]\)\), > \[Theta][y,0]==0, > -(\!\( > \*SubscriptBox[\(\[PartialD]\), \(y1\)]\(\[Theta][y1, > t]\)\)/.{y1->0})*0.1+\[Theta][0,t]==0,+( \!\( > \*SubscriptBox[\(\[PartialD]\), \(y1\)]\(\[Theta][y1, > t]\)\)/.{y1->1})*0.1+\[Theta][1,t]== > 0},\[Theta],{y,0,1},{t,0,2}];Plot3D[\[Theta][y,t]/.s,{y,0,1},{t,0,2},PlotSty > le->Automatic,PlotRange->{0,5}],{{emax,25.,"emax"},0,100,Appearance->"Labele > d"},{{dutycycle,0.25,"dutycycle"},0,1,Appearance->"Labeled"}, > {{\[Lambda],1.,"\[Lambda]"},0.001,10,Appearance->"Labeled"},Initialization:> > (elecy[t_]:=Which[0<=Mod[t,1]<=dutycycle,emax,dutycycle<Mod[t,1]<=1,0.]), > ContinuousAction->False,ControlPlacement->Top] > > but this does not work > > Manipulate[s=NDSolve[{\[Lambda];\[Lambda]s;emax;dutycycle;\!\( > \*SubscriptBox[\(\[PartialD]\), \(y, y\)]\ \(\[Theta][y, > t]\)\)+elecy[t]*(5-\[Theta][y,t])*y*(1-y)==\[Lambda]*\!\( > \*SubscriptBox[\(\[PartialD]\), \(t\)]\(\[Theta][y, t]\)\), > \[Theta][0,t]==-\[Lambda]s*\!\( > \*SubscriptBox[\(\[PartialD]\), \(t\)]\(\[Theta][0, > t]\)\),\[Theta][1,t]==-\[Lambda]s*\!\( > \*SubscriptBox[\(\[PartialD]\), \(t\)]\(\[Theta][1, t]\)\), > \[Theta][y,0]==0},\[Theta],{y,0,1},{t,0,2}];Plot3D[\[Theta][y,t]/.s,{y,0,1}, > {t,0,2},PlotStyle->Automatic,PlotRange->{0,5}],{{emax,25.,"emax"},0,100,Appe > arance->"Labeled"},{{dutycycle,0.25,"dutycycle"},0,1,Appearance->"Labeled"}, > {{\[Lambda],1.,"\[Lambda]"},0.001,10,Appearance->"Labeled"},{{\[Lambda]s,1., > "\[Lambda]s"},0.001,10,Appearance->"Labeled"},Initialization:>(elecy[t_]:=Wh > ich[0<=Mod[t,1]<=dutycycle,emax,dutycycle<Mod[t,1]<=1,0.]), > ContinuousAction->False,ControlPlacement->Top] > > I obtain the error message > > NDSolve::bdord: Boundary condition \[Theta][0,t]+1. (\[Theta]^(0,1))[0,t] > should have derivatives of order lower than the differential order of the > partial differential equation. >> > > plus a lot more. As I understand it, the second case should be solvable in > principle. Is this error a deficiency of NDSolve, or have I made some > mistake? This problem can be seen as a partial differential equation (in y > and t) coupled to two ordinary differential equations (for the boundary > conditions, only in t). What is the best way to solve such problems? > > This is the simplification of a more involved case, where the boundary > conditions also are coupled to the partial differential equation, but I have > tried to boil down the problem here. > > Best regards > > Ingolf Dahl > Sweden > > >
- Follow-Ups:
- RE: Re: Partial differential equation with evolving boundary conditions
- From: "Ingolf Dahl" <ingolf.dahl@telia.com>
- RE: Re: Partial differential equation with evolving boundary conditions