2.0 - 2.1 Migration: Semidetached Systems

Let's first make sure we have the latest version of PHOEBE 2.1 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.1,<2.2"

In PHOEBE 2.1, rpole and potential have been replaced with requiv. That means that the constraint used to handle semidetached systems has also changed.


In [1]:
import phoebe
b = phoebe.default_binary()

requiv_max

In PHOEBE 2.1, there is a new constrained Parameter that allows access to the critical value of requiv at which overflow would occur (for a detached system - contact systems have requiv_min and requiv_max).


In [3]:
print b['requiv_max@primary@constraint']


Constrains (qualifier): requiv_max
Expression in SI (value): requiv_L1({q@binary@component}, {syncpar@primary@component}, {ecc@binary@component}, {sma@binary@component}, {incl@primary@component}, {long_an@primary@component}, {incl@binary@component}, {long_an@binary@component}, 1)
Current Result (result): 2.01327517654 solRad

In order to create a semidetached system, you create a constraint as in PHOEBE 2.0, except instead of choosing 'critical_rpole' or 'critical_pot' constraints, use a new constraint called 'semidetached', via b.add_constraint.


In [4]:
b.add_constraint('semidetached', 'primary')


Out[4]:
<ParameterSet: 1 parameters>

In [6]:
print b['requiv@primary@constraint']


Constrains (qualifier): requiv
Expression in SI (value): 1.000000 * {requiv_max@primary@component}
Current Result (result): 2.01327517654 solRad

For more information, see the critical radii: semidetached systems tutorial.