Detached Binary: Roche vs Rotstar

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"

In [1]:
%matplotlib inline

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


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]
/Library/Python/2.7/site-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)

Adding Datasets

Now we'll create an empty mesh dataset at quarter-phase so we can compare the difference between using roche and rotstar for deformation potentials:


In [3]:
b.add_dataset('mesh', times=[0.75], dataset='mesh01')


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

Running Compute

Let's set the radius of the primary component to be large enough to start to show some distortion when using the roche potentials.


In [20]:
b['rpole@primary@component'] = 1.8

Now we'll compute synthetics at the times provided using the default options


In [21]:
b.run_compute(irrad_method='none', distortion_method='roche', model='rochemodel')


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

In [22]:
b.run_compute(irrad_method='none', distortion_method='rotstar', model='rotstarmodel')


Out[22]:
<ParameterSet: 62 parameters | components: primary, secondary>

Plotting


In [23]:
axs, artists = b['rochemodel'].plot()



In [24]:
axs, artists = b['rotstarmodel'].plot()



In [ ]: