simulation of incompressible Navier-Stokes equation using Firedrake
Hi everyone, My name is Kamal and I am a PhD student in the University of Hamburg, Germany. My PhD project deals with the simulation of coupled atmoshpere-ocean models. I want to use Firedrake to simulate my models and therefore to get accustomed with the software I have been using it for the past couple of months to solve some test/tutorial problems. At present, I am working on the following benchmark problems for the*incompressible fluid flow**: * 1. *Driven cavity (2D) *: Consider a square cavity with sides of unit length and kinematic viscosity ν = 1/1000. No-slip boundary conditions are imposed on each edge of the square, except at the upper edge where the velocity is set to u = (1, 0). 2.*Pressure-driven channel flow (2D)* : The geometry of the channel is the unit square [0,1]^2 and the kinematic viscosity is ν = 1/8. No-slip boundary conditions are applied to the velocity at the upper and lower walls, and Neumann boundary conditions are applied at the inlet and outlet. Dirichlet boundary conditions are applied to the pressure at the inlet and outlet, with p = 1 at the inlet and p = 0 at the outlet. The initial condition is u = (0, 0) for the velocity. 3. *Taylor–Green vortex (2D)* : We consider the Taylor-Green vortex which is a periodic flow with exact solution given by u(x, y, t) =(cos(πx)* sin(πy)*exp(−2tνπ^2), cos(πy) *sin(πx)*exp(−2tνπ^2)), p(x, y, t) =− 0.25*(cos(2πx) + cos(2πy))*exp(−4tνπ^2), on the domain [-1,1]^2. The kinematic viscosity is set to ν = 1/100. Periodic boundary conditions are imposed in both the x and y directions. For discretization, I have used a pure space-time Galerkin finite element scheme (with trapezoidal time-stepping). My code works well for the first two problems and my solutions are pretty close to the exact solutions. But for the third problem (Taylor-Green vortex) somehow, my solution is completely off and I am unable to understand the reason for it. Can you please help me figure out what I maybe doing wrong ? I have attached my code for the third test problem. In case you need more information, please let me know. Any kind of help is really appreciated. Thank you. Kind regards Kamal Sharma Department of Mathematics, University of Hamburg, Germany
On Wed, Nov 17, 2021 at 6:26 AM Kamal Sharma <kamal.sharma@uni-hamburg.de> wrote:
Hi everyone,
My name is Kamal and I am a PhD student in the University of Hamburg, Germany. My PhD project deals with the simulation of coupled atmoshpere-ocean models.
I want to use Firedrake to simulate my models and therefore to get accustomed with the software I have been using it for the past couple of months to solve some test/tutorial problems.
At present, I am working on the following benchmark problems for the* incompressible fluid flow* * : *
1. *Driven cavity (2D) *: Consider a square cavity with sides of unit length and kinematic viscosity ν = 1/1000. No-slip boundary conditions are imposed on each edge of the square, except at the upper edge where the velocity is set to u = (1, 0).
2.* Pressure-driven channel flow (2D)* : The geometry of the channel is the unit square [0,1]^2 and the kinematic viscosity is ν = 1/8. No-slip boundary conditions are applied to the velocity at the upper and lower walls, and Neumann boundary conditions are applied at the inlet and outlet. Dirichlet boundary conditions are applied to the pressure at the inlet and outlet, with p = 1 at the inlet and p = 0 at the outlet. The initial condition is u = (0, 0) for the velocity.
3. *Taylor–Green vortex (2D)* : We consider the Taylor-Green vortex which is a periodic flow with exact solution given by
u(x, y, t) =(cos(πx)* sin(πy)*exp(−2tνπ^2), cos(πy) *sin(πx)*exp(−2tνπ^2)), p(x, y, t) =− 0.25*(cos(2πx) + cos(2πy))*exp(−4tνπ^2),
on the domain [-1,1]^2. The kinematic viscosity is set to ν = 1/100. Periodic boundary conditions are imposed in both the x and y directions.
For discretization, I have used a pure space-time Galerkin finite element scheme (with trapezoidal time-stepping). My code works well for the first two problems and my solutions are pretty close to the exact solutions. But for the third problem (Taylor-Green vortex) somehow, my solution is completely off and I am unable to understand the reason for it. Can you please help me figure out what I maybe doing wrong ? I have attached my code for the third test problem. In case you need more information, please let me know. Any kind of help is really appreciated. Thank you.
Since you have the exact solution, did you plug that in and check that your residual is close to 0 for it?
Thanks, Matt
Kind regards
Kamal Sharma
Department of Mathematics, University of Hamburg, Germany _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
-- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
participants (2)
- 
                
                Kamal Sharma
- 
                
                Matthew Knepley