-
Notifications
You must be signed in to change notification settings - Fork 0
Config File and Parameters
This page describes the config file and its parameters.
Alternatively, have a look at this example config file where each parameter is explained in an inline comment.
The config file consists of the sections Astronomical Constants, Video, Scale, Plot, Debug plus a section for each celestial body in the simulation. Do not remove any parameters.
[Astronomical Constants]
g = 6.67430e-11 # [m**3/kg/s**2] <float> gravitational constant +/- 0.00015
au = 1.495978707e11 # [m] <float> astronomical unit
r_sun = 6.96342e8 # [m] <float> solar radius
m_sun = 1.98847e30 # [kg] <float> solar mass +/- 0.00007
l_sun = 3.83e26 # [W] <float> solar luminosity
r_jup = 7.1492e7 # [m] <float> Jupiter radius
m_jup = 1.8981246e27 # [kg] <float> Jupiter mass
r_earth = 6.378135e6 # [m] <float> Earth radius
m_earth = 5.9720e24 # [kg] <float> Earth mass
v_earth = 2.97852e4 # [m/s] <float> Earth orbital velocity (if orbit was circular)
The parameters in this section are primarily provided for your convenience. You may utilize them when defining other parameters within the configuration file.
Example: Expressing the size of the visible area in a plot in astronomical units (in section Scale):
scope_left = 2.5 * au
This section controls length and quality of the simulation and the resulting video.
[Video]
video_file = MyFirstVideo.mp4 # <string> the resulting video is saved in this file
frames = 90 # <int> number of frames of video. Proportional to Curvesimulator's run time
# and to the length of the animation.
fps = 30 # <int> frames per second in video. Proportional to the velocity of the
# objects in the animation. Inverse proportional to length of video.
dt = 3600 # [s] <int> real time difference between simulation iterations. Proportional to
# the velocity of the objects in the animation. Needs to be small in order to
# calculate with sufficient precision when objects are close to each other.
# Reasonable values can easily be under 10 seconds or over 10000 seconds. If
# your orbits change after a few rotations then you probably need a smaller value.
# dt * sampling_rate is the real time difference between 2 frames in the animation.
# If your star system produces eclipses, dt * sampling_rate should be < 1000 in
# order to generate an accurate light curve.
sampling_rate = 200 # <int> Calculating the physics is much faster than animating it. Therefore only
# 1/sampling_rate of the calculated iterations is used as a frame in the animation.
# In other words: The simulation's number of calculated iterations and also the
# length of the array with light curve data will be equal to frames * sampling_rate.
This section governs the dimensions of objects within the animation, balancing realism with visual clarity.
The parameters scope_left and scope_right define the viewing range for the two perspectives of the star system. They represent the actual distance between the left and right borders of the plots.
Due to the vast size difference between stars and planets, depicting them to scale in a single animation is often impractical. CurveSimulator offers parameters to adjust the relative sizes of celestial bodies in the animation. Note that this scaling typically results in animated eclipses appearing longer than they would in reality.
Setting autoscaling = on typically yields optimal results. This option automatically adjusts scaling, applying logarithmic scaling when necessary. Use min_radius and max_radius to specify the smallest and largest object radii in the animation.
Alternatively, with autoscaling = off, you can manually define separate scales for stars and planets in both the overhead (left) and edge-on (right) views, using the parameters star_scale_left, planet_scale_left, star_scale_right, planet_scale_right.
[Scale]
scope_left = 6.0 * au # [m] <float> scope of left plotting window is [-scope_left, scope_left].
# Middle of window is (0.0, 0.0)
scope_right = 6.0 * au # [m] <float> scope of right plotting window is [-scope_right, scope_right].
# Middle of window is (0.0, 0.0)
autoscaling = on # <string> allowed values: on, off
star_scale_left = 100.0 # [1] <float> (if autoscale off) animate stars with StarScale_left times
# enlarged radius in left view.
planet_scale_left = 1000.0 # [1] <float> (if autoscale off) animate planets with PlanetScale_left times
# enlarged radius in left view.
star_scale_right = 100.0 # [1] <float> (if autoscale off) animate stars with StarScale_right times
# enlarged radius in right view.
planet_scale_right = 1000.0 # [1] <float> (if autoscale off) animate planets with PlanetScale_right times
# enlarged radius in right view.
min_radius = 2.0 # [%] <float> (if autoscale on) radius of smallest body in animation relative
# to plot scope. radius=100 would fill the whole plot.
max_radius = 7.0 # [%] <float> (if autoscale on) maximum radius of largest body in animation
# relative to plot scope. radius=100 would fill the whole plot.
# If necessary, scaling will be done logarithmically instead of linear.
This section controls the simulation's start date, the size of the moving red dot on the light curve, and the size of the overhead view and edge-on view. Apart from start_date, it is best not to change the other parameters in this section, except if the plots do not fit well on your screen, for example, because your screen has an uncommon aspect ratio.
[Plot]
start_date = 2468000.0 # Barycentric Julian Date (TDB) at the start of the simulation
figure_width = 16 # <int> width of figure which contains all plots and animations
figure_height = 8 # <int> height of figure which contains all plots and animations
xlim = 1.25 # <float> left and right view both show x-values between -Xlim and + Xlim
ylim = 1.0 # <float> left and right view both show y-values between -Ylim and + Ylim
red_dot_height = 1/13 # <float> relative height of red dot in light curve plot
red_dot_width = 1/200 # <float> relative width of red dot in light curve plot
For debugging purposes only. Ignore this section if you aren't a CurveSimulator developer.
All following sections define physical bodies in the simulation. The section names define the names of the bodies.
The first body in the config file is considered to be the primary star of the system. No orbit parameters are needed for this body.
Note that not all Kepler orbit parameters have to be provided because some parameters can be derived from others. This gives you some flexibility. Instead of Kepler parameters you can also just provide a state vector. For each celestial body, the provided orbit paramters may be a different subset of the possible parameters.
[TestSun]
body_type = star # star/planet
mass = 1.0 * m_sun # [kg]
radius = 1.0 * r_sun # [m]
luminosity = 1.0 * l_sun # [W]
limb_darkening = [0.3, 0.9, -0.2] # Limb darkening coefficients a0, a1, ..., an
color = 0.99, 0.99, 0.11 # RGB value in animation. Minimum = 0, maximum = 1.
[TestPlanet]
body_type = planet # star/planet
mass = 0.642e24 # [kg]
radius = 3346e03 # [m]
# if the state vector (startposition and velocity) is provided, no Kepler orbit parameters have to be provided
# startposition = 1.0 * au, 1.0 * au, 1.0 * au # [m], [m], [m]
# velocity = 1.0 * v_earth, 1.0 * v_earth, 1.0 * v_earth # [m/s], [m/s], [m/s]
# Mandatory parameters:
a = 1.0 * au # [m] semi-major axis
e = 0.7 # [1] eccentricity
i = 90.0 # [deg] inclination. 90°: we see orbit edge-on. >90°: planet moves below and
# in front of the sun, as well as above and behind the sun in edge view.
# Two of the following three parameters have to be provided:
longitude_of_ascending_node = 0 # [deg] Ω: longitude of ascending node
longitude_of_periapsis = 0 # [deg] ϖ: longitude of periapsis
argument_of_periapsis = 0 # [deg] ω: argument of periapsis
# One of the following five parameters has to be provided in order to specify the initial position on the orbit.
L = 0 # [deg] mean longitude
nu = 0 # [deg] true anomaly.
ma = 0 # [deg] mean anomaly
ea = 0 # [deg] eccentric anomaly
T = 0 # [s] Time of periapsis
# The absolute time of periapsis is start_date - T
t = 0 # [t] Optional additional time difference. Default = 0.
color = 0.01, 0.99, 0.01 # RGB value in animation. Minimum = 0, maximum = 1.
CurveSimulator Wiki