Help with 1D Burger's Equation

Hi everyone,

I’m working on a final project for my Finite Element Analysis course, and I need help setting up a time-dependent 1D Burgers’ equation using FEniCSx with linear Lagrange elements and backward Euler time stepping.

The equation is:

\frac{\partial u}{\partial t} + u \, \frac{\partial u}{\partial x} = \nu \, \frac{\partial^2 u}{\partial x^2}

x\epsilon[-5,10], t\epsilon[0,10]
with:

  • Initial Condition u(x, 0) = \exp\left(-\frac{x^2}{2}\right)
  • Boundary conditions: homogeneous Neumann, i.e., \frac{\partial u}{\partial x} = 0 at both ends
  • Diffusion coefficient: \nu = 0.1, also to be repeated with \nu = 1.0 and \nu = 0.01

Goals:

  • Use CG1 elements
  • Apply backward Euler time integration
  • Handle nonlinearity (possibly using NewtonSolver with NonlinearProblem)
  • Save the solution at each full second until T = 10 s
  • Perform a mesh independence check (e.g., using solution at t = 0.5 s)

Questions:

  1. What is the best way to implement the nonlinear convective term u , \frac{\partial u}{\partial x} in FEniCSx?
  2. Is NonlinearProblem with NewtonSolver sufficient, or should I perform manual fixed-point (Picard) iteration?
  3. Are there any example demos in FEniCSx that are close to this setup?
  4. Should I worry about stability or CFL conditions despite using implicit time stepping?

Any tips, example links, or general advice would be hugely appreciated!
Thanks in advance!``

This is not a forum where people are supposed to do your homework for you. Please make an effort of trying to set up the code and show us what you managed to write, and then someone may be willing to help you.

2 Likes

There are many tutorials available for DOLFINx, including:

1 Like