Comments (6)
The syntax is:
var_dx = sim.add_variation()
var_dx.particles[j].x = 1
from rebound.
from rebound.
she was concerned that the variational equations implementation in Rebound only work with celestial variables, not with Cartesian variables.
That's not correct. The "vary" function is a convenience function that allows you to vary orbital elements. The function exists because it's non-trivial to map these variations to cartesian coordinates. Varying cartesian coordinates on the other hand is trivial. See below.
I’m wondering what the 1 signifies in initializing var_dx.particles[j].x = 1?
This is varying the x coordinate of the j-th particle. This is what you want for the Jacobian you mentioned. The "1" is just a normalization. You can use another other non-zero number. That would give you the same result if you divide it out again at the end. This is just coming from the fact that variational equations are invariant under multiplications with a constant. But really, there is no good reason to use a number other than 1 here.
then I should be able to get the derivate of earth eccentricity
Your setup looks good. But you want to keep a reference to all the var_dx
, var_dy
, ... variables. Right now you are overwriting them in the loop. Use an array and set var_dx[j]
. After the integration you can get the matrix elements:
using the syntax
var_dx[j].particles[i].x var_dx[j].particles[i].y ...
var_dy[j].particles[i].x var_dy[j].particles[i].y
...
From that you can calculate
using the chain rule. Just write down
I hope that helps.
from rebound.
from rebound.
I'll close this issue for know, but feel free to re-open if you have more questions.
from rebound.
from rebound.
Related Issues (20)
- `configure_ghostboxes` has no effect HOT 2
- Attribute error Question HOT 3
- Inconsistency in solution across inclination HOT 16
- Adding particles via Horizons system HOT 3
- There are quite significant differences in the orbital elements of asteroids and their clones HOT 9
- Soft sphere implementation HOT 3
- MEGNO time evolution HOT 17
- WHFast512 on macOS system HOT 1
- run solar system with and without planet to planet gravity forces HOT 1
- MOID calculation at a given timestep HOT 6
- How to read the binary file output? HOT 8
- how to read snapshots in a loop HOT 4
- viewing a SA from the command line ("sadump") HOT 6
- There don't appear to be any reference docs? HOT 3
- TRACE crashes after adding 2 particles after a merger event (on ARM-based Mac; [edit:] on Linux, too) HOT 3
- How to get the orbit elements of the first star? HOT 3
- 'Barycentre' primary convenience function HOT 3
- Create comets from particles in mean motion resonance with an eccentric planet HOT 13
- User-defined close encounter/colision/ejection condition. HOT 3
- [TRACE+] Binary files size from simulation archive dependent on integrator HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rebound.