Input planet orbit setup
It can happen (as it happens now to me) that one fargOCA user might want to start a simulation with a disc an a planetary system, and then add one planet a posteriori.
As things are now, this does not seem to be possible. One idea would be to extend the disk_load_config file to allow this.
A similar option that could be added (which is also a way to approach the same problem) is to allow the user to specify all orbital elements of a planet in the configuration file. So far only the semi-major axis, eccentricity and inclinations can be specified. One could allow also the angles to be given by the users (possibly as optional parameters), as sometimes this can be very useful.
In my mind, a config file that looks like this
Planets {
SuperEarth {
Name SuperEarth
Distance 1
Eccentricity 0
Inclination 0
Mass 1.e-5
AccretionTimeInverse 0.0
Feel
{
Disk true
Others false
}
}
}
would still be ok, but the user would also be allowed to have
Planets {
SuperEarth {
Name SuperEarth
Distance 1.3
Eccentricity 0
Inclination 0
MeanLongitude 0 ; NEW and optional, usually called lambda
LongitudePericenter 0 ; NEW and optional, usually called varpi
LongitudeNode 0 ; NEW and optional, usually called Omega
Mass 1.e-5
AccretionTimeInverse 0.0
Feel
{
Disk true
Others false
}
}
}
fargOCA would need to convert these (a,e,i,lambda,varpi,Omega) to cartesian coordinates in a heliocentric frame: it already does this in planetarySystem.cpp
(initialPlanetPosition
and initialPlanetVelocity
), but there all the angles are assumed to be equal to 0. The complete formulas from (a,e,i,lambda,varpi,Omega) to cartesian coordinates in a heliocentric frame are not difficult, and probably already implemented in the code somewhere.
With Elena we thought this could go into a separate branch for now, to make sure there are no backward compatibility issues. @alainm what do you think?
Cheers!