I’m studying the Swift Hohenberg model with only the linear term of the potential. I see that a tutorial is proposed here (https://rveltz.github.io/BifurcationKit.jl/dev/tutorials2/#Snaking-in-the-2d-Swift-Hohenberg-equation-1) but for the moment I’m not interested to analyze the bifurcation, I wish only to solve the model. My idea was to use DifferentialEquations.jl to solve the equation, but maybe I’ve made some mistakes…
Here my definition of the problem:
function F_sh(u, p) @unpack l, L1 = p return -L1 * u .+ (l .* u) end X = -lx .+ 2lx/(Nx) * collect(0:Nx-1) Y = -ly .+ 2ly/(Ny) * collect(0:Ny-1) # define parameters for the PDE Δ, _ = Laplacian2D(Nx, Ny, lx, ly) D = 10 #L1 = D*(I + Δ)^2 p = (l = -0.1 , L1 = D*(I + Δ)^2) u0=rand(100,100) tspan = (0.0,100.0) prob = ODEProblem(F_sh,u0,tspan) sol = solve(prob, saveat =[0.2,25.0,50.0,99.0])
(I used the Laplacian construction with sparse matrix used in the SH tutorial).
Thank you for the help, I’m very new to Julia, so every comment is welcome!