MathGroup Archive 2011

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

Search the Archive

NDSolve issues with initial and boundary conditions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119200] NDSolve issues with initial and boundary conditions
  • From: Arturo Amador <arturo.amador at ntnu.no>
  • Date: Wed, 25 May 2011 05:54:13 -0400 (EDT)

Hi,

I am having some issues when trying to solve a system of three coupled 
differential equations numerically using NDSolve. I am trying to specify 
boundary conditions for two of the variables in the same point (point at 
L) and a boundary condition for the last variable at zero. The 
mathematica code is:

IIn[24]:= vacuumlinearrhs=CF=81 =
 (-((4 E^(-4 t) Sqrt[E^(2 t) Lambda^2] (-1 + n) g[t]^2)/
         Lambda^4) - (12 g[t]^2)/(E^(2 t) Lambda^2 + 16 g[t]^2 =CF=810[t])^(3/
          2)) factor=CF=81[t]
Out[24]= -((E^(5 t)
   Lambda^5 (-((E^(-4 t) Sqrt[E^(2 t) Lambda^2] (-1 + n))/Lambda^4) -
    3/(E^(2 t) Lambda^2 + 16 g[t]^2 =CF=810[t])^(3/2)))/(24 =CF=80^2))

In[25]:= vacuumcuadraticrhsg =
 ((24 E^(-6 t) Sqrt[E^(2 t) Lambda^2] (-1 + n) g[t]^4)/
       Lambda^6 + (216 g[t]^4)/(E^(2 t) Lambda^2 + 16 g[t]^2 =CF=810[t])^(5/
          2)) factorg[t]
Out[25]= (2 E^(5 t) Lambda^5 g[
  t]^4 ((E^(-6 t) Sqrt[E^(2 t) Lambda^2] (-1 + n))/Lambda^6 +
   9/(E^(2 t) Lambda^2 + 16 g[t]^2 =CF=810[t])^(5/2)))/=CF=80^2

In[26]:= vacuumcubicrhsh =
 [(-((160 E^(-8 t) Sqrt[E^(2 t) Lambda^2] (-1 + n) g[t]^6)/
         Lambda^8) - (4320 g[t]^6)/(E^(2 t) Lambda^2 + 16 g[t]^2 =CF=810[t])^(7/
          2)) factorh[t]
Out[26]= -((40 E^(5 t)
   Lambda^5 g[
   t]^6 (-((E^(-8 t) Sqrt[E^(2 t) Lambda^2] (-1 + n))/Lambda^8) -
    27/(E^(2 t) Lambda^2 + 16 g[t]^2 =CF=810[t])^(7/2)))/(3 =CF=80^2))


(*Declarations*)
Lambda = Sqrt[5] m=CF=83;

L = -17090/10000;
m=CF=83 = 400;

m=CF=80 = 0;
f=CF=80 = 93;

lambda = 2 (m=CF=83^2 - m=CF=80^2)/f=CF=80^2;
gk0 = (lambda/24)^(1/2);
=CF=81k0 = 1/2 f=CF=80^2;

n = 4;


sol = NDSolve[{D[=CF=810[t], t] == vacuumlinearrhs=CF=81,
    4 D[g[t]^2, t] + 3 h[t] D[=CF=810[t], t] == vacuumcuadraticrhsg,
    D[h[t], t] == vacuumcubicrhsh, =CF=810[L] == =CF=81k0, =
g[L]^2 == gk0^2,
    h[0] == 0}, {=CF=810, g, h}, {t, L, 0},
   Method -> {StiffnessSwitching,
     Method -> {ExplicitRungeKutta, Automatic}}];

with output:

Power::infy: Infinite expression 1/0. encountered. >>

Infinity::indet: Indeterminate expression (0. Sqrt[5] ComplexInfinity)/\[Pi]^2 encountered. >>

Power::infy: Infinite expression 1/0.^2 encountered. >>

Infinity::indet: Indeterminate expression (0. Sqrt[5] ComplexInfinity)/\[Pi]^2 encountered. >>

Power::infy: Infinite expression 1/0. encountered. >>

General::stop: Further output of Power::infy will be suppressed during this calculation. >>
Infinity::indet: Indeterminate expression 0. ComplexInfinity encountered. >>
General::stop: Further output of Infinity::indet will be suppressed during this calculation. >>
NDSolve::ndnum: Encountered non-numerical value for a derivative at t ===
 -1.709. >>

I am sure there is no singularity. I am getting this output no matter what value I am giving for h[0], as long as I specify the boundary condition in a point that is not L, it gives me this same error message. I have tried h[0.9L] and still the same. When h[t]==0 The system reduces to this:

sol = NDSolve[{D[=CF=810[t], t] == (Lambda Exp[t])^5/(
      24 =CF=80^2) ( (n - 1)/(Lambda Exp[t])^3 +
        3/((Lambda Exp[t])^2 + 16 =CF=810[t] g[t]^2)^(3/2)),
    D[g[t]^2, t] == ((Lambda Exp[t])^5 * g[t]^4 )/(
      2 =CF=80^2) ((n - 1)/(Lambda Exp[t])^5 +
        9/((Lambda Exp[t])^2 + 16 =CF=810[t] g[t]^2)^(5/2)), =CF=810[L] == =CF=81k0,
    g[L]^2 == gk0^2}, {=CF=810, g}, {t, L, 0},
   Method -> {StiffnessSwitching,
     Method -> {ExplicitRungeKutta, Automatic}}];

For which I get nice solutions.



Thanks in advance


--
Arturo Amador Cruz
Stipendiat				Norges =
Teknisk-Naturvitenskapelige Universitet (NTNU)
						Institutt for Fysikk
						Fakultet for =
Naturvitenskap og Teknologi
						H=C3=B8gskoleringen 5, =
Realfagbygget, E5-108
Telefon					(735) 93366		NO-7491 =
TRONDHEIM
										=
NORWAY
arturo.amador at ntnu.no





  • Prev by Date: Re: Series[log[x], {x, 0, 3}]
  • Next by Date: Re: Defining Formatting and Notation
  • Previous by thread: Re: Precedence question
  • Next by thread: Again : Is there a BNF for Mathematica?