.. _diffusion-poisson_nonlinear_parametric: diffusion/poisson_nonlinear_parametric.py ========================================= **Description** Nonlinear diffusion with a field-dependent coefficient and parametric sweep. Solve the problem: .. math:: -\nabla \cdot \left( (1 + \alpha u^2)\nabla u \right) = \sin(\pi x)\sin(\pi y) \quad \text{in } \Omega, with homogeneous Dirichlet boundary conditions: .. math:: u = 0 \quad \text{on } \partial \Omega. The diffusion coefficient depends on the solution: .. math:: c(u) = 1 + \alpha u^2. The problem is solved for several values of :math:`\alpha`, and the solutions are compared to the linear case :math:`\alpha = 0`. Usage Examples -------------- - Run with the default parameters:: sfepy-run sfepy/examples/diffusion/poisson_nonlinear_parametric.py sfepy-view output/poisson_nonlinear_parametric/square_unit_tri_alpha_*.vtk -2 - Use custom values of :math:`\alpha`, show :math:`\nabla u`:: sfepy-run sfepy/examples/diffusion/poisson_nonlinear_parametric.py -d "alphas=[1e5,5e5,1e6]" sfepy-view output/poisson_nonlinear_parametric/square_unit_tri_alpha_*.vtk -2 -f u:gu:p0 u:p0 --no-scalar-bars .. image:: /../doc/images/gallery/diffusion-poisson_nonlinear_parametric.png :download:`source code ` .. literalinclude:: /../sfepy/examples/diffusion/poisson_nonlinear_parametric.py