diff --git a/examples/c++/README.rst b/examples/c++/README.rst index ff4d9b3e1..2992c8227 100644 --- a/examples/c++/README.rst +++ b/examples/c++/README.rst @@ -1,10 +1,12 @@ C++ Examples ------------ -.. include:: examples/c++/contact_mechanics_model/README.rst - .. include:: examples/c++/solid_mechanics_model/README.rst .. include:: examples/c++/solid_mechanics_cohesive_model/README.rst +.. include:: examples/c++/contact_mechanics_model/README.rst + +.. include:: examples/c++/diffusion_model/README.rst + .. include:: examples/c++/phase_field_model/README.rst diff --git a/examples/c++/diffusion_model/README.rst b/examples/c++/diffusion_model/README.rst new file mode 100644 index 000000000..31baba624 --- /dev/null +++ b/examples/c++/diffusion_model/README.rst @@ -0,0 +1,46 @@ +diffusion_model +''''''''''''''' + +In ``diffusion_model``, examples of the ``HeatTransferModel`` are presented. + +An example of a static heat propagation is presented in +``heat_diffusion_static_2d.cc``. This example consists of a square 2D plate of +:math:`1 \text{m}^2` having an initial temperature of :math:`100 \text{K}` +everywhere but a none centered hot point maintained at +:math:`300 \text{K}`. :numref:`fig-ex-diffusion_static` presents the geometry +of this case (left) and the results (right). The material used is a linear +fictitious elastic material with a density of :math:`8940 \text{kg}/\text{m}^3`, +a conductivity of :math:`401 \text{W}/\text{m}/\text{K}` and a specific heat +capacity of :math:`385 \text{J}/\text{K}/\text{kg}`. + +.. _fig-ex-diffusion_static: +.. figure:: examples/c++/diffusion_model/images/diffusion_static.png + :align: center + :width: 70% + + Initial (left) and final (right) temperature field + + +In ``heat_diffusion_dynamics_2d.cc``, the same example is solved dynamically +using an explicit time scheme. The time step used is :math:`0.12 \text{s}`. + +.. _fig-ex-diffusion_explicit: +.. figure:: examples/c++/diffusion_model/images/hot-point-2.png + :align: center + :width: 70% + + Temperature field after 15000 time steps = 30 minutes. The lines represent + iso-surfaces. + +In ``heat_diffusion_dynamics_3d.cc``, a 3D explicit dynamic heat propagation +problem is solved. It consists of a cube having an initial temperature of +:math:`100 \text{K}` everywhere but a centered sphere maintained at +:math:`300 \text{K}`. :numref:`fig-ex-diffusion_3d` presents the resulting +temperature field evolution. + + .. _fig-ex-diffusion_3d: +.. figure:: examples/c++/diffusion_model/images/diffusion_3d.gif + :align: center + :width: 70% + + Temperature field evolution. diff --git a/examples/c++/diffusion_model/images/diffusion_3d.gif b/examples/c++/diffusion_model/images/diffusion_3d.gif new file mode 100644 index 000000000..858731005 Binary files /dev/null and b/examples/c++/diffusion_model/images/diffusion_3d.gif differ diff --git a/examples/c++/diffusion_model/images/diffusion_static.png b/examples/c++/diffusion_model/images/diffusion_static.png new file mode 100644 index 000000000..2d5c35ef5 Binary files /dev/null and b/examples/c++/diffusion_model/images/diffusion_static.png differ diff --git a/examples/c++/diffusion_model/images/hot-point-1.png b/examples/c++/diffusion_model/images/hot-point-1.png new file mode 100644 index 000000000..6349ba329 Binary files /dev/null and b/examples/c++/diffusion_model/images/hot-point-1.png differ diff --git a/examples/c++/diffusion_model/images/hot-point-2.png b/examples/c++/diffusion_model/images/hot-point-2.png new file mode 100644 index 000000000..2325ee893 Binary files /dev/null and b/examples/c++/diffusion_model/images/hot-point-2.png differ