Eccentricity (Volume Conservation)

Setup

Let's first make sure we have the latest version of PHOEBE 2.0 installed. (You can comment out this line if you don't use pip for your installation or don't want to update to the latest release).


In [ ]:
!pip install -I "phoebe>=2.0,<2.1"

As always, let's do imports and initialize a logger and a new Bundle. See Building a System for more details.


In [1]:
%matplotlib inline

In [2]:
import phoebe
from phoebe import u # units
import numpy as np
import matplotlib.pyplot as plt

logger = phoebe.logger()

b = phoebe.default_binary()


WARNING: Constant u'Gravitational constant' is already has a definition in the u'si' system [astropy.constants.constant]
WARNING: Constant u'Solar mass' is already has a definition in the u'si' system [astropy.constants.constant]
WARNING: Constant u'Solar radius' is already has a definition in the u'si' system [astropy.constants.constant]
WARNING: Constant u'Solar luminosity' is already has a definition in the u'si' system [astropy.constants.constant]
/usr/local/lib/python2.7/dist-packages/astropy/units/quantity.py:782: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
  return super(Quantity, self).__eq__(other)

Relevant Parameters


In [3]:
print b.get(qualifier='ecc')


Parameter: ecc@binary@component
                       Qualifier: ecc
                     Description: Eccentricity
                           Value: 0.0
                  Constrained by: 
                      Constrains: ecosw@binary@component, esinw@binary@component, pot@primary@component, pot@secondary@component
                      Related to: per0@binary@component, ecosw@binary@component, esinw@binary@component, rpole@primary@component, q@binary@component, syncpar@primary@component, sma@binary@component, pot@primary@component, rpole@secondary@component, syncpar@secondary@component, pot@secondary@component


In [4]:
print b.get(qualifier='ecosw', context='component')


Parameter: ecosw@binary@component
                       Qualifier: ecosw
                     Description: Eccentricity times cos of argument of periastron
                           Value: 0.0
                  Constrained by: ecc@binary@component, per0@binary@component
                      Constrains: None
                      Related to: ecc@binary@component, per0@binary@component


In [5]:
print b.get(qualifier='esinw', context='component')


Parameter: esinw@binary@component
                       Qualifier: esinw
                     Description: Eccentricity times sin of argument of periastron
                           Value: 0.0
                  Constrained by: ecc@binary@component, per0@binary@component
                      Constrains: None
                      Related to: ecc@binary@component, per0@binary@component

Relevant Constraints


In [6]:
b.filter(qualifier='pot', context='constraint')


Out[6]:
<ParameterSet: 2 parameters | components: primary, secondary>

In [7]:
print b.get(qualifier='pot', component='primary', context='constraint')


Constrains (qualifier): pot
Expression in SI (value): rocherpole2potential({rpole@primary@component}, {q@binary@component}, {ecc@binary@component}, {syncpar@primary@component}, {sma@binary@component}, 1)
Current Result (result): 6.28266165375

In [8]:
print b.get(qualifier='ecosw', context='constraint')


Constrains (qualifier): ecosw
Expression in SI (value): {ecc@binary@component} * (cos({per0@binary@component}))
Current Result (result): 0.0

In [9]:
print b.get(qualifier='esinw', context='constraint')


Constrains (qualifier): esinw
Expression in SI (value): {ecc@binary@component} * (sin({per0@binary@component}))
Current Result (result): 0.0

Influence on Meshes (potentials, volumes)


In [10]:
b.add_dataset('mesh', times=np.linspace(0,1,11))


Out[10]:
<ParameterSet: 2 parameters | contexts: compute, dataset>

In [11]:
b.set_value('ecc', 0.2)

In [12]:
b.run_compute()


Out[12]:
<ParameterSet: 662 parameters | components: primary, secondary>

In [13]:
print b['pot@primary@model']


ParameterSet: 11 parameters
    0.0@pot@primary@latest@model: 6.22827408689
    0.1@pot@primary@latest@model: 6.1432940846
    0.2@pot@primary@latest@model: 6.10376571797
    0.3@pot@primary@latest@model: 6.10376571797
    0.4@pot@primary@latest@model: 6.1432940846
    0.5@pot@primary@latest@model: 6.22827408689
    0.6@pot@primary@latest@model: 6.36091908169
    0.7@pot@primary@latest@model: 6.49345186737
    0.8@pot@primary@latest@model: 6.49345186737
    0.9@pot@primary@latest@model: 6.36091908169
    1.0@pot@primary@latest@model: 6.22827408689

In [14]:
ax, artists = b['mesh01'].plot(x='times', y='pot')



In [15]:
print b['rpole@primary@model']


ParameterSet: 11 parameters
  0.0@rpole@primary@latest@model: 1.05674996072 solRad
  0.1@rpole@primary@latest@model: 1.07469956478 solRad
  0.2@rpole@primary@latest@model: 1.08325387146 solRad
  0.3@rpole@primary@latest@model: 1.08325387146 solRad
  0.4@rpole@primary@latest@model: 1.07469956478 solRad
  0.5@rpole@primary@latest@model: 1.05674996072 solRad
  0.6@rpole@primary@latest@model: 1.02987857563 solRad
  0.7@rpole@primary@latest@model: 1.00433766089 solRad
  0.8@rpole@primary@latest@model: 1.00433766089 solRad
  0.9@rpole@primary@latest@model: 1.02987857563 solRad
  1.0@rpole@primary@latest@model: 1.05674996072 solRad

In [16]:
axs, artists = b['mesh01'].plot(x='times', y='rpole')



In [17]:
print b['volume@primary@model']


ParameterSet: 11 parameters
  0.0@volume@primary@latest@m...: 4.33150305333 solRad3
  0.1@volume@primary@latest@m...: 4.33150305333 solRad3
  0.2@volume@primary@latest@m...: 4.33150305333 solRad3
  0.3@volume@primary@latest@m...: 4.33150305333 solRad3
  0.4@volume@primary@latest@m...: 4.33150305333 solRad3
  0.5@volume@primary@latest@m...: 4.33150305333 solRad3
  0.6@volume@primary@latest@m...: 4.33150305333 solRad3
  0.7@volume@primary@latest@m...: 4.33150305333 solRad3
  0.8@volume@primary@latest@m...: 4.33150305333 solRad3
  0.9@volume@primary@latest@m...: 4.33150305333 solRad3
  1.0@volume@primary@latest@m...: 4.33150305333 solRad3

In [18]:
ax, artists = b['mesh01'].plot(x='times', y='volume')



In [19]:
b.remove_dataset('mesh01')

Influence on Radial Velocities


In [20]:
b.add_dataset('rv', times=np.linspace(0,1,51))


Out[20]:
<ParameterSet: 15 parameters | contexts: compute, dataset>

In [21]:
b.run_compute()


Out[21]:
<ParameterSet: 4 parameters | components: primary, secondary>

In [22]:
axs, artists = b.plot()



In [23]:
b.remove_dataset('rv01')

Influence on Light Curves (fluxes)


In [24]:
b.add_dataset('lc', times=np.linspace(0,1,51))


Out[24]:
<ParameterSet: 15 parameters | contexts: compute, dataset>

In [25]:
b.run_compute()


Out[25]:
<ParameterSet: 2 parameters | qualifiers: fluxes, times>

In [26]:
axs, artists = b.plot()