Message Boards Message Boards

0
|
6099 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Problems with differential equations

Posted 10 years ago

Hi, I'm trying to solve a little oceanographic problem. I wanna plot the stream lines of a system composed by the Sverdrup equation (equation regulating water motion) and the continuity equation (conservation of mass); and all this in spherical coordinates, so in a shell DR around the Earth (but keeping only the radial and longitudinal coordinates, which in the end is just a slice of the spherical shell). I attach also the code. 2 omega sin (phi) is the Coriolis parameter. w is the radial water velocity and v is the longitudinal one.

Any idea?

thanks a lot in advance for any suggestion! Lorenzo

Attachments:
POSTED BY: Lorenzo Rossato
2 Replies
Posted 10 years ago

Thanks, yes I also tried a simple version of the problem in cartesian coordinates (in attach) but I get the same error. Basically I'm trying to show to my professor the advantages of using mathematica for simulations but I'm a bit rusty... Boundary conditions are an open question, meaning that I'm just aiming at showing some plots of possible water currents; there are no specific constraints

Attachments:
POSTED BY: Lorenzo Rossato

In the final term in your list, system, you are differentiating functions that do not depend on the variable r since the evaluation is done before the differentiation is carried out. You can fix this like this:

system = {2 \[CapitalOmega] sin[\[Phi]] \!\(
\*SubscriptBox[\(\[PartialD]\), \(r\)]\(\[Omega][r, \[Phi]]\)\) == -(
      v[r, \[Phi]]/r) cos[\[Phi]], 1/r^2 \!\(
\*SubscriptBox[\(\[PartialD]\), \(r\)]\((
\*SuperscriptBox[\(r\), \(2\)] \[Omega][r, \[Phi]])\)\) + 1/r  \!\(
\*SubscriptBox[\(\[PartialD]\), \(\[Phi]\)]\(v[r, \[Phi]]\)\) == 0,
   \[Omega][R, \[Phi]] == \[Omega][R + \[CapitalDelta]R, \[Phi]] == 
    0, \[Omega][r, 0] == \[Omega][r, 2 \[Pi]], 
   v[r, 0] == v[r, 2 \[Pi]], (\!\(
\*SubscriptBox[\(\[PartialD]\), \(r\)]\(v[r, \[Phi]]\)\) /. (r -> 
        R)) == 0, (\!\(
\*SubscriptBox[\(\[PartialD]\), \(r\)]\(v[r, \[Phi]]\)\) /. (r -> 
        R + \[CapitalDelta]R)) == 0};

However, when this is done you get the following error message concerning boundary conditions and initial conditions which you will then need to address (I am not going to address that here since I am not sure of the details of your problem):

NDSolve::ivone: Boundary values may only be specified for one independent variable. Initial values may only be specified at one value of the other independent variable. >>
POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract