OndrejKincl / fenics-course-fluids

Docs for a FEniCS course on fluids organized by SIAM SC Prague
MIT License
1 stars 0 forks source link

Navier Stokes implementation #2

Open EzequielS2 opened 6 months ago

EzequielS2 commented 6 months ago

Hi @OndrejKincl @JakubFara @ktuma @AlenkaJ @georgiosmalik

How to implement the below problem in Fenics?

The given expression will be interpreted at run-time so that vx = 6(y − 1)(2 − y). As y ∈ [1, 2] thereby creating a parabolic velocity profile with a mean velocity of unity.

OndrejKincl commented 6 months ago

Olá!

First, you need to create the mesh. Since your geometry is a polygon, you can refer to this guide.

Secondly, you need to mark your boundaries, see here.

Then, you must prescribe the boundary conditions. Fenics will not decide for you what the inflow should be. You will have to supply your parabolic profile as an Expression. Our tutorials show how no-slip condition is prescribed. For outflow, I recommend to use the do-nothing condition.

Finally, you create the weak formulation and solve it. You can refer to our tutorial on Navier-Stokes.