Note
Go to the end to download the full example code.
Finding alpha_n_min for ConstCSModel
/home/docs/checkouts/readthedocs.org/user_builds/pttools/checkouts/latest/pttools/models/const_cs.py:681: RuntimeWarning: invalid value encountered in scalar multiply
return w_b * phase + w_s * (1 - phase)
alpha_n_min=0.019979025715431656, a_s=1.6600828662109106, a_b=1, V_s=1, V_b=0
alpha_n_min=0.019979025715431656, alpha_n=0.019979025715431656
from pttools.models import ConstCSModel
model = ConstCSModel(css2=1/3, csb2=1/4, a_s=5, alpha_n_min=0.02)
print(f"alpha_n_min={model.alpha_n_min}, a_s={model.a_s}, a_b={model.a_b}, V_s={model.V_s}, V_b={model.V_b}")
model2 = ConstCSModel(css2=1/3, csb2=1/4, a_s=2, a_b=1, V_s=0.1)
print(f"alpha_n_min={model.alpha_n_min}, alpha_n={model.alpha_n(model.w_crit)}")
Total running time of the script: (0 minutes 0.466 seconds)
Estimated memory usage: 264 MB