.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/props/plot_chapman_jouguet.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_props_plot_chapman_jouguet.py: Chapman-Jouguet speed ===================== Plot $v_{CJ} (\alpha_n)$ .. GENERATED FROM PYTHON SOURCE LINES 7-42 .. image-sg:: /auto_examples/props/images/sphx_glr_plot_chapman_jouguet_001.png :alt: plot chapman jouguet :srcset: /auto_examples/props/images/sphx_glr_plot_chapman_jouguet_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none /home/docs/checkouts/readthedocs.org/user_builds/pttools/checkouts/main/pttools/models/full.py:138: RuntimeWarning: invalid value encountered in log10 /home/docs/checkouts/readthedocs.org/user_builds/pttools/checkouts/main/pttools/models/full.py:140: RuntimeWarning: invalid value encountered in log10 /home/docs/checkouts/readthedocs.org/user_builds/pttools/checkouts/main/pttools/bubble/boundary.py:518: RuntimeWarning: invalid value encountered in sqrt /home/docs/checkouts/readthedocs.org/user_builds/pttools/checkouts/main/pttools/models/full.py:138: RuntimeWarning: invalid value encountered in log10 /home/docs/checkouts/readthedocs.org/user_builds/pttools/checkouts/main/pttools/models/full.py:140: RuntimeWarning: invalid value encountered in log10 | .. code-block:: Python import numpy as np from examples import utils from pttools import bubble, models from pttools.analysis.plot_chapman_jouguet import ChapmanJouguetPlot def main() -> ChapmanJouguetPlot: plot = ChapmanJouguetPlot(alpha_n=np.linspace(0.15, 0.3, 100)) plot.add(models.BagModel(a_s=1.1, a_b=1, V_s=1), analytical=False, label="Bag model (analytical)") plot.add(models.BagModel(a_s=1.1, a_b=1, V_s=1), ls="--") plot.add( models.ConstCSModel(a_s=1.1, a_b=1, css2=1/3, csb2=1/3, V_s=1), label="Constant $c_s$ model with bag coeff.", ls=":" ) # Todo: adjust the parameters so that the models have valid critical temperatures plot.add(models.ConstCSModel(a_s=1.1, a_b=1, css2=0.25, csb2=1/3, V_s=1), label="Constant $c_s$ model", ls="--") plot.add(models.ConstCSModel(a_s=1.1, a_b=1, css2=1/3, csb2=0.25, V_s=1, allow_invalid=True), label="Constant $c_s$ model v2", ls="-") plot.add( models.FullModel(thermo=models.ConstCSThermoModel(a_s=1.1, a_b=1, css2=1/3, csb2=0.25, V_s=1, allow_invalid=True), allow_invalid=True), ls=":" ) plot.add( models.FullModel(thermo=models.StandardModel(V_s=10), allow_invalid=True), label="Standard Model with V" ) plot.process() return plot if __name__ == "__main__": plot = main() utils.save_and_show(plot.fig, "chapman_jouguet.png") .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 2.154 seconds) **Estimated memory usage:** 264 MB .. _sphx_glr_download_auto_examples_props_plot_chapman_jouguet.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_chapman_jouguet.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_chapman_jouguet.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_chapman_jouguet.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_