MathGroup Archive 2003

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

Search the Archive

NDSolve w/ vectors requires homogenous system in 5.0

  • To: mathgroup at smc.vnet.net
  • Subject: [mg42789] NDSolve w/ vectors requires homogenous system in 5.0
  • From: dalefamily at yahoo.com (Brian Dale)
  • Date: Sat, 26 Jul 2003 04:32:56 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

It seems that the NDSolve portion works fine, but that the functions
such as Cross and Plus have trouble working correctly with the
required mix of numeric and symbolic vectors.  The effect of this is
to restrict vector diff eqts to homogenous systems.  Here are my
results:

The Bloch equation (fundamental equation for magnetic resonance
imaging) describes the motion of an isochromat in a magnetic field. 
For all parameters = 1 (for simplicity) I can define the following:

b = {1,1,0} represents the magnetic field 
d = DiagonalMatrix[{1,1,1}] represents the signal decay 
r = {0,0,1} represents the signal regrowth 
bd = {{-1,0,-1},{0,-1,1},{1,-1,-1}} represents field and decay 
bdr = {{-1,0,-1,0},{0,-1,1,0},{1,-1,-1,1},{0,0,0,0}} represents
everything for the augmented coordinate system {x,y,z,Mo}

m0 = {0,0,1} initial magnetization 
ma0 = {0,0,1,1} augmented initial magnetization 

The Bloch equation can be written in 3 ways: 

eq1:= {m'[t] == Cross[m[t],b] - d.m[t] + r , m[0] == m0} 
eq2:= {m'[t] == bd.m[t] + r , m[0] == m0} 
eq3:= {ma'[t] == bdr.ma[t] , ma[0] == ma0} 

NDSolve[eq1, m, {t,0,10}] generates the message Cross::nonn1
(arguments should be equal-length vectors) and the message
NDSolve::ndfdmc (inconsistent dimensionality) and fails.

NDSolve[eq2, m, {t,0,10}] generates the message NDSolve::ndfdmc
(inconsistent dimensionality) and fails.

NDSolve[eq3, ma, {t,0,10}] succeeds.

If I remove the r term from eq1 and eq2 then:

NDSolve[eq1, m, {t,0,10}] still generates the message Cross::nonn1 but
succeeds (with no regrowth).

NDSolve[eq2, m, {t,0,10}] succeeds (with no regrowth).

The success with eq3 seems to indicate that NDSolve itself is capable
of solving the equation, but the failure of the others seems to show
that the equations must be entered such that each term contains an
unknown vector.  

Does anyone have any other experience with this?  Perhaps there is an
easy work-around that doesn't require the augmented coordinate system
with its wasteful computation of the 4 the coordinate.  Any input
would be appreciated.

-Thanks
 Brian Dale


  


  • Prev by Date: Re: v5 FrontEnd problem on Linux
  • Next by Date: Re: Re: Series
  • Previous by thread: Two successive plots, in a single cell, how to get same transverse axis scaling?
  • Next by thread: Re: NDSolve w/ vectors requires homogenous system in 5.0