Solving Wigner time evolution as in xmds2

Hi everybody!

I am quite new in fenics with a background in physics. I am trying to solve the time evolution of Wigner function as in the worked-out example of xmds2 (http://www.xmds.org/worked_examples.html#wignerarguments) - Wigner Function.

am facing two issues in doing it in fenics:

  1. Converting to weak form: e.g., how to work with terms like x*d^3W/dx^2dy

  2. Writing the expression: unlike the examples given in fenics website and the books, the equation has x and y terms (and maybe terms like x^2 and xy, to be generalized) and mixed derivatives. How to write such terms?

Any help will be appreciated.

Thanks in advance!
Akira Kaneda
Tohoku University
Japan

Concerning your second question, partial derivatives can be written as Dx(u, 0), Dx(u, 1).
A good source for these things is the ufl manual:
https://readthedocs.org/projects/fenics-ufl/downloads/pdf/latest/