Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Re: Partial differential equation with evolving boundary conditions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg91528] RE: [mg91498] Re: Partial differential equation with evolving boundary conditions
  • From: "Ingolf Dahl" <ingolf.dahl at telia.com>
  • Date: Mon, 25 Aug 2008 06:55:58 -0400 (EDT)
  • References: <g8o868$l6k$1@smc.vnet.net> <200808241105.HAA15454@smc.vnet.net>

Hi Jens-Peer,
Thanks for your interest and your comments

My problematic code was a little damaged by the copy-and-paste. I try again:

Manipulate[s = NDSolve[{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, 
  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]

Interleaved comments to your answer follow below

Best regards

Ingolf Dahl
 

> -----Original Message-----
> From: Jens-Peer Kuska [mailto:kuska at informatik.uni-leipzig.de] 
> Sent: den 24 augusti 2008 13:06
> To: mathgroup at smc.vnet.net
> Subject: [mg91498] Re: Partial differential equation with 
> evolving boundary conditions
> 
> Hi,
> 
> a) the code DSolve[{\[Lambda];\[Lambda]s;emax;dutycycle;...}__]
>     is total useless because emax; make nothing ..

The emax; command is there to tell Manipulate to recalculate NDSolve each
time emax is changed. Maybe there is a better way to accomplish this?

> 
> 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]

That is a reformulation of my question, but it that of mathematical
necessity or is it just necessary for NDSolve?

I wanted to avoid this approach, because my real problem is slightly more
involved, and then straightforward integration is not possible.

By the way, the solutions you suggest are incomplete, they should read

    \[Theta][0, t] == integrationconstant0* Exp[-t/\[Lambda]s],
    \[Theta][1, t] == integrationconstant1* Exp[-t/\[Lambda]s]

> 
> c) this is inconsistent with \[Theta][y,0]==0 and no soulution
>     would exist.

and then with integrationconstant0 = integrationconstant1 = 0 there is
trivial consistence with 
\[Theta][y,0]==0 

> 
> 
> d) the classical way is to think about the existence and uniqueness
>     of the solution *before* a analytical or numeric solution
>     is attempt.

Sometimes I prefer other ways, all roads should lead to Rome. Sometimes it
is very illuminating to try to find a constructive solution. In this way I
was able to formulate a question appropriate for MathGroup, where all
answers use to be nice. 

But with \[Theta][0, t]==0 and  \[Theta][1, t] == 0 there should exist
solutions, and thus also in this case(?) I do not think that the rule
""Boundary condition ... should have derivatives of order lower than the
differential order of the partial differential equation" is applicable in
this case. 

End of my comments/ Ingolf


> 
> 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},P
> > lotSty
> > 
> le->Automatic,PlotRange->{0,5}],{{emax,25.,"emax"},0,100,Appearance->"
> > le->Labele
> > d"},{{dutycycle,0.25,"dutycycle"},0,1,Appearance->"Labeled"},
> > 
> {{\[Lambda],1.,"\[Lambda]"},0.001,10,Appearance->"Labeled"},Initializa
> > tion:> 
> > 
> (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,10
> > 0,Appe
> > 
> arance->"Labeled"},{{dutycycle,0.25,"dutycycle"},0,1,Appearance->"Labe
> > arance->led"},
> > 
> {{\[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
> > 
> > 
> > 
> 
> 




  • Prev by Date: Re: Re: Re: Help to remove equivalent
  • Next by Date: RE: Re: Integral of radial solution (hydrogen atom) is not evaluated
  • Previous by thread: Re: Partial differential equation with evolving boundary conditions
  • Next by thread: Re: RE: Re: Partial differential equation with