 The basic idea is to make a variational ansatz for the wavefunction with free parameters, plug it into the free energy, and minimize the energy with respect to the free parameters.Several numerical methods, such as the split-step Crank–Nicolson and Fourier spectral methods, have been used for solving GPE.There are also different Fortran and C programs for its solution for the contact interaction and long-range dipolar interaction.