Hi all,
I have been trying to use Dedalus to model Fredericks Transitions in Liquid Crystals. The equation are written as below.
K*(lap(n_1))=\lambda*n_1
K*(lap(n_2))-1/2*Xa*H**2*n_2=\lambda*n_2
where at the boundaries 0 and L, n_1=1 and n_2=0
lambda is langrage parameter to enforce that the director field (n_1,n_2) is a unit vector. I made a lambda a problem variable and directly enforce the unit vector conditions. I have also tried to remove this condition and set lambda to 0, but this gets similar errors as I will describe below.
I have been able to solve this problem by using a parameterization and solving using bvp4c in MATLAB. This is the process (the parameterization) from Stewarts 2004 book in section 3.4.1. When I try to solve this problem in Dedalus I encounter an error.
I expect the solution to have a bifurcation after a critical magnetic field strength, but in Dedalus I am only getting the trivial solutions no matter the initial guesses. I want to use Dedalus to model more complicated liquid crystal simulations, so this is just to make sure I have something that is correct to start.
I have tried using my results from the matlab code as initial guesses. I have tried a director field where the angle is a quadratic polynomial with zeros at 0 and L and is equal to pi in the middle, also this is the initial guess I used in the matlab code notably for the non-trivial solutions. Then I have also tried a random normalized solution that satisfies the boundary conditions. All of these initial guesses either diverge as in the pert norm diverges, or the solution is the trivial solution when I expect the non-trivial solution. Note when I say trivial solution, what I mean is just a constant vector field.
Is there something that is glaringly wrong with the method I am using to solve problem? I have been trying a lot of things, but I have been stuck for a while. I have attached my code I am using.