.. _diffusion-poisson_periodic_boundary_condition:

diffusion/poisson_periodic_boundary_condition.py
================================================

**Description**


This example is using a mesh generated by gmsh. Both the
.geo script used by gmsh to generate the file and the .mesh
file can be found in meshes.

The mesh is suitable for periodic boundary conditions. It consists
of a cylinder enclosed by a box in the x and y directions.

The cylinder will act as a power source.

Transient Laplace equation in time interval
:math:`t \in [0, t_{\rm final}]` with a localized power source and
periodic boundary conditions:

Find :math:`T(t)` for :math:`t \in [0, t_{\rm final}]` such that:

.. math::
    \int_{\Omega}c s \pdiff{T}{t}
    + \int_{\Omega} \sigma_2 \nabla s \cdot \nabla T
    = \int_{\Omega_2} P_3 T
    \;, \quad \forall s \;.


.. image:: /../gallery/images/diffusion-poisson_periodic_boundary_condition.png


:download:`source code </../examples/diffusion/poisson_periodic_boundary_condition.py>`

.. literalinclude:: /../examples/diffusion/poisson_periodic_boundary_condition.py

