Message Boards Message Boards

0
|
10892 Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How can I solve this ImplicitRegion Error in NDSolve?

Posted 9 years ago

I'd like to solve a differential equation with some initial conditions to get an eclipse curve for Earth's orbit using Newton's Law in a cylindrical coordinate.

NDSolve gave me two more useless solutions, so I added ImplicitRegion option. But, if I run the following code, I get an error message like this.

"The function [Rho][t] does not have the same number of arguments as independent variables (3)". >>

x[t_] := rho[t] Cos[theta[t]]
y[t_] := rho[t] Sin[theta[t]]

r[t] = ( {
      {Cos[theta[t]], Sin[theta[t]]},
      {-Sin[theta[t]], Cos[theta[t]]}
     } ).( {
      {x[t]},
      {y[t]}
     } ) // Simplify // Flatten

vCylinderical[t] = ( {
      {Cos[theta[t]], Sin[theta[t]]},
      {-Sin[theta[t]], Cos[theta[t]]}
     } ).( {
      {D[x[t], {t, 1}]},
      {D[y[t], {t, 1}]}
     } ) // Simplify // Flatten

aCylinderical[t] = ( {
      {Cos[theta[t]], Sin[theta[t]]},
      {-Sin[theta[t]], Cos[theta[t]]}
     } ).( {
      {D[x[t], {t, 2}]},
      {D[y[t], {t, 2}]}
     } ) // Simplify // Flatten

Thread[({x[t], y[t]} /. t -> 0) == {149.6 10^6, 0}]
Thread[(D[{x[t], y[t]}, t] /. t -> 0) == {0, 29.786 3600 }]
initialConditions = Union[%, %%];

G = 3600^2 6.673 10^-20;
M = 1.989 10^30;
interval = 9000;
diffEqs = Thread[aCylinderical[t] == {-((G M)/rho[t]^2), 0}];

Rgn = ImplicitRegion[
  0 <= rho[t] <= 149.6 10^6 && 0 <= theta[t] <= 2 \[Pi], {rho[t], 
   theta[t]}]


NDSolve[{diffEqs, initialConditions}, {rho, theta}, {t, 0, 
  interval}, {rho[t], theta[t]} \[Element] Rgn]
POSTED BY: Changsoo Lee
3 Replies
POSTED BY: Frank Kampas

Well that's true but I think the Hamiltonian is the more powerful representation and perhaps we should consider the symmetry elements? Functionals and extreemals?

Any thoughts on my random jottings, fae bonnie scotland?

POSTED BY: jonathan lister

enter image description here

POSTED BY: Simon Cadrin
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