# time-dependent nonlinear pde in fenics

I am interesting in solving the following nonlinear, time-dependent pde in 2 spatial dimensions (complex Gross-Pitaevskii eq):

$$i \frac{\partial \psi}{\partial t} = \left[ -\nabla^2 + (1-i \sigma)(|\psi|^2-1) \right] \psi$$

The goal is to find steady state solutions for the function $\psi(x,y,t)$, for different parameters $\sigma$. Here $\sigma$ is a positive real-valued parameter. The boundary conditions can initially be of the Dirichlet type, setting the function $\psi$ to zero on the contour of a square, but later on I plan to implement some absorbing BC (perhaps using the perfectly matched layer method?). I am also considering solving the equation in a different geometry later on, on a disk using polar coordinates.

For the time-dependence, I plan to use the Gryphon module of Erik Skare (https://launchpad.net/gryphonproject), which is basically a Runge-Kutta solver and for the spatial part Fenics.

So the question is, do you think this is feasible to do with Fenics, and if so, how would one proceed?

I would try pushing this form

V = VectorFucntioSpace(mesh, 'CG', 1, dim=2)
u = Function(V)
v = TestFunction(V)
sigma = Constant(0.1)

into nonlinear-poisson demo. But note that this would yield trivial solution if you start from zero field with zero Dirichlet.
• Actually, as initial condition I would like to take a vortex in the center, $\psi(r,0)=r e^{-\frac{r^2}{2 c^2}}e^{i \phi(r)}$, where the azimuthal angle $\phi(r)$ varies from 0 to 2$\pi$ around the vortex core. The natural way to do this would be to use polar coordinates, but I have no idea how to do that in Fenics.. – Andrei Jun 28 '13 at 8:29