.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/hyp_oecs/plot_bickley_ile.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_hyp_oecs_plot_bickley_ile.py: Bickley jet iLE =============== Compute the iLE field for the bickley jet. .. GENERATED FROM PYTHON SOURCE LINES 9-16 .. code-block:: Python # Author: ajarvis import numpy as np import matplotlib.pyplot as plt from numbacs.flows import get_predefined_callable from numbacs.diagnostics import ile_2D_func .. GENERATED FROM PYTHON SOURCE LINES 17-20 Get flow -------------- Set the initial time, retrieve a jit-callable for the flow, and set up domain. .. GENERATED FROM PYTHON SOURCE LINES 20-36 .. code-block:: Python # set time at which to compute iLE t0 = 0.0 # retrieve function pointer, parameters, and domain for double gyre flow. vel_func, domain = get_predefined_callable("bickley_jet") # set up domain # set up domain dx = 0.05 dy = 0.05 x = np.arange(domain[0][0], domain[0][1] + dx, dx) y = np.arange(domain[1][0], domain[1][1] + dy, dy) dx = x[1] - x[0] dy = y[1] - y[0] .. GENERATED FROM PYTHON SOURCE LINES 37-40 iLE --------- Compute iLE from velocity function at t = t0. .. GENERATED FROM PYTHON SOURCE LINES 40-42 .. code-block:: Python ile = ile_2D_func(vel_func, x, y, t0=t0) .. GENERATED FROM PYTHON SOURCE LINES 43-46 Plot ---- Plot the results. .. GENERATED FROM PYTHON SOURCE LINES 46-50 .. code-block:: Python fig, ax = plt.subplots(dpi=200) ax.contourf(x, y, ile.T, levels=80) ax.set_aspect("equal") plt.show() .. image-sg:: /auto_examples/hyp_oecs/images/sphx_glr_plot_bickley_ile_001.png :alt: plot bickley ile :srcset: /auto_examples/hyp_oecs/images/sphx_glr_plot_bickley_ile_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 3.937 seconds) .. _sphx_glr_download_auto_examples_hyp_oecs_plot_bickley_ile.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_bickley_ile.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_bickley_ile.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_bickley_ile.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_