# Best approach to solving this coupled nonlinear PDE system (incompressible convection)?

**URL:** <https://discourse.julialang.org/t/best-approach-to-solving-this-coupled-nonlinear-pde-system-incompressible-convection/101290>\
**Category:** Numerics\
**Tags:** pde\
**Created:** [July 7, 2023, 4:32am UTC](https://discourse.julialang.org/t/best-approach-to-solving-this-coupled-nonlinear-pde-system-incompressible-convection/101290 "2023-07-07T04:32:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![PeX](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pex/32/49986_2.png) [@PeX](https://discourse.julialang.org/u/PeX)\
**Post date:** [July 7, 2023, 4:32am UTC](https://discourse.julialang.org/t/best-approach-to-solving-this-coupled-nonlinear-pde-system-incompressible-convection/101290/1 "2023-07-07T04:32:07Z")

</div>

Hello everyone!  
I’m new to solving PDEs with Julia, only done ODEs so far. My problem looks like this:

-\nabla P+\nabla \cdot \sigma+\rho \vec{g}=0

\nabla \cdot \vec{u}=0

\dot{\varepsilon}=\frac{1}{2}\left(\nabla \vec{u}+(\nabla \vec{u})^T\right)

\dot{\varepsilon}+\ddot{\varepsilon} \frac{\eta\_K}{E\_K} = \left(\frac{\sigma}{F}\right)^n d^{-p} e^{Q\_M\left(\beta-\frac{1}{R T}\right)} + \ddot{\sigma} \frac{\eta\_K}{E\_K E\_M}

Where u(x,z,t), \varepsilon(x,z,t), \sigma(x,z,t) and P(x,z,t) are the unkowns and the rest are constants. I want to solve this on a 2D cartesian grid.

I wonder what packages / methods I should look for in trying to solve this nonlinear problem. Are there any examples of similar things I can follow? Should I try PINNS or it would need much more than a single laptop?

Thank you !!

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [July 7, 2023, 5:11am UTC](https://discourse.julialang.org/t/best-approach-to-solving-this-coupled-nonlinear-pde-system-incompressible-convection/101290/2 "2023-07-07T05:11:09Z")

</div>

> [@PeX](#):
>
> I wonder what packages / methods I should look for in trying to solve this nonlinear problem. Are there any examples of similar things I can follow?

This should just work in MethodOfLines.jl if I’m reading it correctly. Give it a try.

---

<div class="post-metadata">

**Author:** ![eneiva](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eneiva/32/16631_2.png) [@eneiva](https://discourse.julialang.org/u/eneiva)\
**Post date:** [July 7, 2023, 8:21am UTC](https://discourse.julialang.org/t/best-approach-to-solving-this-coupled-nonlinear-pde-system-incompressible-convection/101290/3 "2023-07-07T08:21:07Z")

</div>

Hi, this is a nonlinear Stokes PDE problem that is well-suited to be solved with Gridap.jl.

Perhaps you can take a look at the [incompressible Navier-Stokes tutorial](https://gridap.github.io/Tutorials/stable/pages/t008_inc_navier_stokes/) -also the p-Laplacian and elasticity/damage tutorials- to work out how to implement it. If you struggle to implement the nonlinear constitutive sigma-eps relation (I believe this could be the hardest part), you can try getting help in the [gitter](https://gitter.im/Gridap-jl/community) channel.

I would also take a look at Ferrite.jl. I am not familiar with the package, but maybe it can also solve this type of problem.

---

<div class="post-metadata">

**Author:** ![luraess](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/luraess/32/16189_2.png) [@luraess](https://discourse.julialang.org/u/luraess)\
**Post date:** [July 8, 2023, 9:17pm UTC](https://discourse.julialang.org/t/best-approach-to-solving-this-coupled-nonlinear-pde-system-incompressible-convection/101290/4 "2023-07-08T21:17:44Z")

</div>

Hi, you could give Finite-Difference stencils a try on xPUs using [ParallelStencil.jl](https://github.com/omlins/ParallelStencil.jl/tree/main#viscous-stokes-2-d-app), and potentially the accelerated pseudo-transient method ([this paper](https://gmd.copernicus.org/articles/15/5757/2022/) and related [2D Stokes code](https://github.com/PTsolvers/PseudoTransientStokes.jl)) if you seek for fast steady state solutions.
