# PHOEBE 2.0 Documentation

## 2.0 Docs

Prev: Potentials Next: Apsidal Motion
.

# Eccentricity (Volume Conservation)¶

## Setup¶

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

%matplotlib inline

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¶

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

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

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¶

b.filter(qualifier='pot', context='constraint')

<ParameterSet: 2 parameters | components: primary, secondary>

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

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

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)¶

b.add_dataset('mesh', times=np.linspace(0,1,11))

<ParameterSet: 2 parameters | contexts: compute, dataset>

b.set_value('ecc', 0.2)

b.run_compute()

<ParameterSet: 662 parameters | components: primary, secondary>

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

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

print b['rpole@primary@model']

ParameterSet: 11 parameters

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

print b['volume@primary@model']

ParameterSet: 11 parameters

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

b.remove_dataset('mesh01')


b.add_dataset('rv', times=np.linspace(0,1,51))

<ParameterSet: 15 parameters | contexts: compute, dataset>

b.run_compute()

<ParameterSet: 4 parameters | components: primary, secondary>

axs, artists = b.plot()

b.remove_dataset('rv01')


## Influence on Light Curves (fluxes)¶

b.add_dataset('lc', times=np.linspace(0,1,51))

<ParameterSet: 15 parameters | contexts: compute, dataset>

b.run_compute()

<ParameterSet: 2 parameters | qualifiers: fluxes, times>

axs, artists = b.plot()

Prev: Potentials Next: Apsidal Motion
.
Last update: 06/07/2017 11:30 a.m. (CET)