Hi there, I am trying to solve a system of 4 coupled PDEs on a square. The boundary is divided into 4 edges:
def C1(x):
return x[0] > 1.0-DOLFIN_EPS
def C2(x):
return x[1] > 1.0-DOLFIN_EPS
def C3(x):
return x[0] < -1.0+DOLFIN_EPS
def C4(x):
return x[1] < -1.0+DOLFIN_EPS
The system of equations are given by
F1 = inner(grad(f1),grad(v1))*dx + ((f1*f1+f2*f2-1.0)*f1 - (f3*f3-f4*f4))*v1*dx
F2 = inner(grad(f2),grad(v2))*dx + ((f1*f1+f2*f2-1.0)*f2 - f3*f4)*v2*dx
F3 = inner(grad(f3),grad(v3))*dx + ((f3*f3+f4*f4-1.0)*f3 - (f1*f3+f2*f4))*v3*dx
F4 = inner(grad(f4),grad(v4))*dx + ((f3*f3+f4*f4-1.0)*f4 - (f2*f3-f1*f4))*v4*dx
F = F1 + F2 + F3 + F4
The variational solver outputs 4 functions (f_1,f_2,f_3,f_4) and I want to know how to implement the following boundary conditions.
f_1=-1, \, f_2=0,\, \frac{\partial f_3}{\partial x}=0,\, \frac{\partial f_4}{\partial x}=0 on C_1,
f_1=1,\, f_2=0,\, \frac{\partial f_3}{\partial x}=0, \,\frac{\partial f_4}{\partial x}=0 on C_2,
f_1=-1,\, f_2=0,\, \frac{\partial f_3}{\partial y}=0,\, \frac{\partial f_4}{\partial y}=0 on C_3,
f_1=1,\, f_2=0,\, \frac{\partial f_3}{\partial y}=0,\, \frac{\partial f_4}{\partial y}=0 on C_1.