2.0 - 2.1 Migration: Contact 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(contact_binary=True)

requiv_max and requiv_min

In PHOEBE 2.1, there is a new constrained Parameter for contact systems which tell the maximum value allowed for requiv before overflow occurs.


In [4]:
print b['requiv_max@constraint']


ParameterSet: 2 parameters
   requiv_max@primary@constraint: requiv_contact_L23({q@binary@component}, {sma@binary@component}, 1)
  requiv_max@secondary@constr...: requiv_contact_L23({q@binary@component}, {sma@binary@component}, 2)

Similarly, there is another constrained Parameter that defines the minimum allowed value for requiv before the system would no longer be in contact.


In [3]:
print b['requiv_min@constraint']


ParameterSet: 2 parameters
   requiv_min@primary@constraint: requiv_contact_L1({q@binary@component}, {sma@binary@component}, 1)
  requiv_min@secondary@constr...: requiv_contact_L1({q@binary@component}, {sma@binary@component}, 2)

requiv, pot, and fillout_factor

Note that requiv and requiv_min exist for both the primary and secondary components. If we look at requiv, we'll see that that is also defined for both components, with another constraint dictating that the secondary requiv must correspond to the same potential of the contact envelope.


In [5]:
print b['requiv']


ParameterSet: 3 parameters
        requiv@primary@component: 1.5 solRad
*     requiv@secondary@component: 1.5 solRad
     requiv@secondary@constraint: pot_to_requiv_contact({pot@contact_envelope@component}, {q@binary@component}, {sma@binary@component}, 2)

The value of that potential as well as the corresponding fillout_factor is also exposed (and attached to the envelope object). In PHOEBE 2.0, pot was the input Parameter for contacts, but is now constrained with requiv of the primary star the free parameter, by default.


In [8]:
print b['pot']


ParameterSet: 2 parameters
* pot@contact_envelope@component: 3.40137740723
  pot@contact_envelope@constr...: requiv_to_pot_contact({requiv@primary@component}, {q@binary@component}, {sma@binary@component}, 1)

In [9]:
print b['fillout_factor']


ParameterSet: 2 parameters
* fillout_factor@contact_enve...: 0.641789708077
  fillout_factor@contact_enve...: pot_to_fillout_factor({q@binary@component}, {pot@contact_envelope@component})

If desired, you can flip these constraints to allow any one of the three to be free (and the other two constrained). For more information see the critical radii: contact systems tutorial.