:orphan: Examples ======== These are example scripts using the `py-pde` package, which illustrates some of the most important features of the package. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. thumbnail-parent-div-close .. raw:: html
Advanced PDEs ------------- These examples demonstrate more advanced usage of the package. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /examples_gallery/advanced_pdes/images/thumb/sphx_glr_post_step_hook_thumb.png :alt: :doc:`/examples_gallery/advanced_pdes/post_step_hook` .. raw:: html
Post-step hook function
.. raw:: html
.. only:: html .. image:: /examples_gallery/advanced_pdes/images/thumb/sphx_glr_heterogeneous_bcs_thumb.png :alt: :doc:`/examples_gallery/advanced_pdes/heterogeneous_bcs` .. raw:: html
Heterogeneous boundary conditions
.. raw:: html
.. only:: html .. image:: /examples_gallery/advanced_pdes/images/thumb/sphx_glr_heterogeneous_pde_thumb.png :alt: :doc:`/examples_gallery/advanced_pdes/heterogeneous_pde` .. raw:: html
Heterogeneous PDE
.. raw:: html
.. only:: html .. image:: /examples_gallery/advanced_pdes/images/thumb/sphx_glr_pde_brusselator_rd_pde_thumb.png :alt: :doc:`/examples_gallery/advanced_pdes/pde_brusselator_rd_pde` .. raw:: html
Brusselator - Using the ReactionDiffusionPDE class
.. raw:: html
.. only:: html .. image:: /examples_gallery/advanced_pdes/images/thumb/sphx_glr_custom_noise_thumb.png :alt: :doc:`/examples_gallery/advanced_pdes/custom_noise` .. raw:: html
Custom noise
.. raw:: html
.. only:: html .. image:: /examples_gallery/advanced_pdes/images/thumb/sphx_glr_pde_custom_class_thumb.png :alt: :doc:`/examples_gallery/advanced_pdes/pde_custom_class` .. raw:: html
Kuramoto-Sivashinsky - Using custom class
.. raw:: html
.. only:: html .. image:: /examples_gallery/advanced_pdes/images/thumb/sphx_glr_pde_coupled_thumb.png :alt: :doc:`/examples_gallery/advanced_pdes/pde_coupled` .. raw:: html
Custom Class for coupled PDEs
.. raw:: html
.. only:: html .. image:: /examples_gallery/advanced_pdes/images/thumb/sphx_glr_stratonovich_thumb.png :alt: :doc:`/examples_gallery/advanced_pdes/stratonovich` .. raw:: html
SDE with Stratonovich interpretation
.. raw:: html
.. only:: html .. image:: /examples_gallery/advanced_pdes/images/thumb/sphx_glr_pde_1d_class_thumb.png :alt: :doc:`/examples_gallery/advanced_pdes/pde_1d_class` .. raw:: html
1D problem - Using custom class
.. raw:: html
.. only:: html .. image:: /examples_gallery/advanced_pdes/images/thumb/sphx_glr_solver_comparison_thumb.png :alt: :doc:`/examples_gallery/advanced_pdes/solver_comparison` .. raw:: html
Solver comparison
.. raw:: html
.. only:: html .. image:: /examples_gallery/advanced_pdes/images/thumb/sphx_glr_pde_custom_numba_thumb.png :alt: :doc:`/examples_gallery/advanced_pdes/pde_custom_numba` .. raw:: html
Kuramoto-Sivashinsky - Compiled methods
.. raw:: html
.. only:: html .. image:: /examples_gallery/advanced_pdes/images/thumb/sphx_glr_post_step_hook_class_thumb.png :alt: :doc:`/examples_gallery/advanced_pdes/post_step_hook_class` .. raw:: html
Post-step hook function in a custom class
.. raw:: html
.. only:: html .. image:: /examples_gallery/advanced_pdes/images/thumb/sphx_glr_pde_sir_thumb.png :alt: :doc:`/examples_gallery/advanced_pdes/pde_sir` .. raw:: html
Custom PDE class: SIR model
.. raw:: html
.. only:: html .. image:: /examples_gallery/advanced_pdes/images/thumb/sphx_glr_pde_brusselator_class_thumb.png :alt: :doc:`/examples_gallery/advanced_pdes/pde_brusselator_class` .. raw:: html
Brusselator - Using custom class
.. thumbnail-parent-div-close .. raw:: html
Grids and fields ---------------- These examples show how to define and manipulate discretized fields. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /examples_gallery/fields/images/thumb/sphx_glr_plot_polar_grid_thumb.png :alt: :doc:`/examples_gallery/fields/plot_polar_grid` .. raw:: html
Plot a polar grid
.. raw:: html
.. only:: html .. image:: /examples_gallery/fields/images/thumb/sphx_glr_plot_vector_field_thumb.png :alt: :doc:`/examples_gallery/fields/plot_vector_field` .. raw:: html
Plotting a vector field
.. raw:: html
.. only:: html .. image:: /examples_gallery/fields/images/thumb/sphx_glr_plot_cylindrical_field_thumb.png :alt: :doc:`/examples_gallery/fields/plot_cylindrical_field` .. raw:: html
Plotting a scalar field in cylindrical coordinates
.. raw:: html
.. only:: html .. image:: /examples_gallery/fields/images/thumb/sphx_glr_random_fields_thumb.png :alt: :doc:`/examples_gallery/fields/random_fields` .. raw:: html
Random scalar fields
.. raw:: html
.. only:: html .. image:: /examples_gallery/fields/images/thumb/sphx_glr_analyze_scalar_field_thumb.png :alt: :doc:`/examples_gallery/fields/analyze_scalar_field` .. raw:: html
Visualizing a scalar field
.. raw:: html
.. only:: html .. image:: /examples_gallery/fields/images/thumb/sphx_glr_finite_differences_thumb.png :alt: :doc:`/examples_gallery/fields/finite_differences` .. raw:: html
Finite differences approximation
.. thumbnail-parent-div-close .. raw:: html
Output and analysis ------------------- These examples demonstrate how to store and analyze output. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /examples_gallery/output/images/thumb/sphx_glr_storages_thumb.png :alt: :doc:`/examples_gallery/output/storages` .. raw:: html
Storage examples
.. raw:: html
.. only:: html .. image:: /examples_gallery/output/images/thumb/sphx_glr_logarithmic_kymograph_thumb.png :alt: :doc:`/examples_gallery/output/logarithmic_kymograph` .. raw:: html
Logarithmic kymograph
.. raw:: html
.. only:: html .. image:: /examples_gallery/output/images/thumb/sphx_glr_trajectory_io_thumb.png :alt: :doc:`/examples_gallery/output/trajectory_io` .. raw:: html
Writing and reading trajectory data
.. raw:: html
.. only:: html .. image:: /examples_gallery/output/images/thumb/sphx_glr_trackers_thumb.png :alt: :doc:`/examples_gallery/output/trackers` .. raw:: html
Using simulation trackers
.. thumbnail-parent-div-close .. raw:: html
Simple PDEs ----------- These examples demonstrate basic usage of the package to solve PDEs. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /examples_gallery/simple_pdes/images/thumb/sphx_glr_laplace_eq_2d_thumb.png :alt: :doc:`/examples_gallery/simple_pdes/laplace_eq_2d` .. raw:: html
Solving Laplace's equation in 2d
.. raw:: html
.. only:: html .. image:: /examples_gallery/simple_pdes/images/thumb/sphx_glr_poisson_eq_1d_thumb.png :alt: :doc:`/examples_gallery/simple_pdes/poisson_eq_1d` .. raw:: html
Solving Poisson's equation in 1d
.. raw:: html
.. only:: html .. image:: /examples_gallery/simple_pdes/images/thumb/sphx_glr_simple_thumb.png :alt: :doc:`/examples_gallery/simple_pdes/simple` .. raw:: html
Simple diffusion equation
.. raw:: html
.. only:: html .. image:: /examples_gallery/simple_pdes/images/thumb/sphx_glr_pde_custom_expression_thumb.png :alt: :doc:`/examples_gallery/simple_pdes/pde_custom_expression` .. raw:: html
Kuramoto-Sivashinsky - Using PDE class
.. raw:: html
.. only:: html .. image:: /examples_gallery/simple_pdes/images/thumb/sphx_glr_spherical_grid_thumb.png :alt: :doc:`/examples_gallery/simple_pdes/spherical_grid` .. raw:: html
Spherically symmetric PDE
.. raw:: html
.. only:: html .. image:: /examples_gallery/simple_pdes/images/thumb/sphx_glr_cartesian_grid_thumb.png :alt: :doc:`/examples_gallery/simple_pdes/cartesian_grid` .. raw:: html
Diffusion on a Cartesian grid
.. raw:: html
.. only:: html .. image:: /examples_gallery/simple_pdes/images/thumb/sphx_glr_klein_gordon_thumb.png :alt: :doc:`/examples_gallery/simple_pdes/klein_gordon` .. raw:: html
Klein-Gordon equation
.. raw:: html
.. only:: html .. image:: /examples_gallery/simple_pdes/images/thumb/sphx_glr_stochastic_simulation_thumb.png :alt: :doc:`/examples_gallery/simple_pdes/stochastic_simulation` .. raw:: html
Stochastic simulation
.. raw:: html
.. only:: html .. image:: /examples_gallery/simple_pdes/images/thumb/sphx_glr_boundary_conditions_thumb.png :alt: :doc:`/examples_gallery/simple_pdes/boundary_conditions` .. raw:: html
Setting boundary conditions
.. raw:: html
.. only:: html .. image:: /examples_gallery/simple_pdes/images/thumb/sphx_glr_time_dependent_bcs_thumb.png :alt: :doc:`/examples_gallery/simple_pdes/time_dependent_bcs` .. raw:: html
Time-dependent boundary conditions
.. raw:: html
.. only:: html .. image:: /examples_gallery/simple_pdes/images/thumb/sphx_glr_pde_1d_expression_thumb.png :alt: :doc:`/examples_gallery/simple_pdes/pde_1d_expression` .. raw:: html
1D problem - Using PDE class
.. raw:: html
.. only:: html .. image:: /examples_gallery/simple_pdes/images/thumb/sphx_glr_pde_brusselator_expression_thumb.png :alt: :doc:`/examples_gallery/simple_pdes/pde_brusselator_expression` .. raw:: html
Brusselator - Using the PDE class
.. raw:: html
.. only:: html .. image:: /examples_gallery/simple_pdes/images/thumb/sphx_glr_pde_heterogeneous_diffusion_thumb.png :alt: :doc:`/examples_gallery/simple_pdes/pde_heterogeneous_diffusion` .. raw:: html
Diffusion equation with spatial dependence
.. raw:: html
.. only:: html .. image:: /examples_gallery/simple_pdes/images/thumb/sphx_glr_pde_schroedinger_thumb.png :alt: :doc:`/examples_gallery/simple_pdes/pde_schroedinger` .. raw:: html
Schrödinger's Equation
.. thumbnail-parent-div-close .. raw:: html
.. toctree:: :hidden: :includehidden: /examples_gallery/advanced_pdes/index.rst /examples_gallery/fields/index.rst /examples_gallery/output/index.rst /examples_gallery/simple_pdes/index.rst