.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/const_cs/const_cs_find.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_const_cs_const_cs_find.py: Finding alpha_n_min for ConstCSModel ==================================== .. GENERATED FROM PYTHON SOURCE LINES 5-14 .. rst-class:: sphx-glr-script-out .. code-block:: none /home/docs/checkouts/readthedocs.org/user_builds/pttools/checkouts/stable/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 | .. code-block:: Python 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)}") .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.330 seconds) **Estimated memory usage:** 265 MB .. _sphx_glr_download_auto_examples_const_cs_const_cs_find.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: const_cs_find.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: const_cs_find.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: const_cs_find.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_