I am trying to solve the differential equation giving the ground states of a Bose-Einstein Condensate in 2D. I need to solve it in C/C++.
I have an equation that is as follows : (vn+1-vn)/dTau = 1/2* Laplacian (vn+1) - V*vn+1- beta * |vn|^2 * vn+1 + Omega * Lz * vn+1. It is the semi -implicit euler form of the differential equation. I want vn, for all n, vn begin the data of my bose-einstein condensate, i.e. the wave function. It is a function of x and y (2D) and of Tau which is the variable that I used to make the euler form. The wave function is the limite as Tau goes to infinity of v.
I have the Laplacian and Lz which are operators and can be put into a 2D Matric, as well as [vn|^2. V is a potential that would give a diagonal matrix. Therefore the probleme can be put into a matrix form :
Av*=b, with (v*/||v*||)=vn+1 ; b = vn/dTau and A = Identity/dTau - 1/2 * Laplacian + V+beta*|vn|^2 -Omega*Lz.
My issue is this : how do I solve this system, knowing that operators are applied to my function v at the next step. I can't juste isolate vn+1 in that equation and I juste don't know what to do.
I tried making matrices for all of those things but in the end the quadratic term is also a problem and I can't find a way out. Help please!