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"
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 [1]:
import phoebe
from phoebe import u # units
import numpy as np
import matplotlib.pyplot as plt
logger = phoebe.logger()
b = phoebe.default_binary()
In [2]:
b['requiv_max@component@primary']
Out[2]:
In [3]:
b['requiv_max@constraint@primary']
Out[3]:
We can see that the default system is well within this critical value by printing all radii and critical radii.
In [5]:
print(b.filter(qualifier='requiv*', context='component'))
If we increase 'requiv' past the critical point, we'll receive a warning from the logger and would get an error if attempting to call b.run_compute().
In [6]:
b['requiv@primary'] = 2.2
In [7]:
print(b.run_checks())
If the value of requiv was exactly the critical value, we'd have a semi-detached system. Alternatively, we could use a constraint to enforce that a system remains semi-detached.
If the value of requiv is over the critical value, the system is overflowing and will raise an error. If we intentionally want a contact system, we can explicitly create a contact system.