Fenics for parabolic PDE

Could you clarify the problem you are trying to solve? For instance:

  • What is the meaning of “Pt” and “Delta” in your PDE?
  • What is “gamma”? (i.e. a scalar constant, a scalar function, a matrix constant)
  • What domain is your problem defined on? Are you using a UnitSquareMesh for your example code only, or is [0,1] \times [0,1] the domain you wish to study?
  • What are the boundary conditions for P?
  • Is u defined correctly? (At the origin, \log{\left(x_1^4 + x_2^4\right)} = \log 0 is NaN, which will seriously affect your finite element solution.)

If you haven’t yet, please read through Read before posting: How do I get my question answered?

In particular, it helps if you format equations using dollar signs (“$”) just as in LaTeX:

produces

Additionally, you should surround your code with backticks (`) to make it easier to copy and paste. Single backticks, i.e. `import fenics` produce in-line code: import fenics. Triple backticks produce code blocks:

produces

from fenics import *

import numpy as np
1 Like