<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Equivalent Radius
Setup
Let's first make sure we have the latest version of PHOEBE 2.3 installed (uncomment this line if running in an online notebook session such as colab).
Step1:  As always, let's do imports and initialize a logger and a new Bundle.
Step2:  Now let's add a mesh dataset at a few different times so that we can see how the potentials affect the surfaces of the stars.
Step3:  Relevant Parameters
The 'requiv' parameter defines the stellar surface to have a constant volume of 4./3 pi requiv^3.
Step4:  Critical Potentials and System Checks
Additionally, for each detached component, there is an requiv_max Parameter which shows the critical value at which the Roche surface will overflow.  Setting requiv to a larger value will fail system checks and raise a warning.
Step5:  At this time, if you were to call run_compute, an error would be thrown.  An error isn't immediately thrown when setting requiv, however, since the overflow can be recitified by changing any of the other relevant parameters.  For instance, let's change sma to be large enough to account for this value of rpole and you'll see that the error does not occur again.
Step6:  These logger warnings are handy when running phoebe interactively, but in a script its also handy to be able to check whether the system is currently computable /before/ running run_compute.
This can be done by calling run_checks which returns a boolean (whether the system passes all checks) and a message (a string describing the first failed check).
<ASSISTANT_TASK:>
Python Code:
#!pip install -I "phoebe>=2.3,<2.4"
Explanation: Equivalent Radius
Setup
Let's first make sure we have the latest version of PHOEBE 2.3 installed (uncomment this line if running in an online notebook session such as colab).
End of explanation
import phoebe
from phoebe import u # units
import numpy as np
import matplotlib.pyplot as plt
logger = phoebe.logger()
b = phoebe.default_binary()
Explanation: As always, let's do imports and initialize a logger and a new Bundle.
End of explanation
b.add_dataset('mesh', times=np.linspace(0,1,11), dataset='mesh01')
Explanation: Now let's add a mesh dataset at a few different times so that we can see how the potentials affect the surfaces of the stars.
End of explanation
print(b['requiv@component'])
Explanation: Relevant Parameters
The 'requiv' parameter defines the stellar surface to have a constant volume of 4./3 pi requiv^3.
End of explanation
print(b['requiv_max@primary@component'])
print(b['requiv_max@primary@constraint'])
b.set_value('requiv@primary@component', 3)
Explanation: Critical Potentials and System Checks
Additionally, for each detached component, there is an requiv_max Parameter which shows the critical value at which the Roche surface will overflow.  Setting requiv to a larger value will fail system checks and raise a warning.
End of explanation
b.set_value('sma@binary@component', 10)
Explanation: At this time, if you were to call run_compute, an error would be thrown.  An error isn't immediately thrown when setting requiv, however, since the overflow can be recitified by changing any of the other relevant parameters.  For instance, let's change sma to be large enough to account for this value of rpole and you'll see that the error does not occur again.
End of explanation
print(b.run_checks())
b.set_value('sma@binary@component', 5)
print(b.run_checks())
Explanation: These logger warnings are handy when running phoebe interactively, but in a script its also handy to be able to check whether the system is currently computable /before/ running run_compute.
This can be done by calling run_checks which returns a boolean (whether the system passes all checks) and a message (a string describing the first failed check).
End of explanation
<END_TASK>