Hi everyone, I am currently using FreeFEM to model the kuramoto sivashinsky equation
u_{t}+\nu u_{xxxx}+u_{xx}+uu_{x}=0
with periuodic spatial and temporal boundary conditions. I am modeling this equation by differentiating u once and then modeling both the ux and uy derivatives. I am trying to use the convect function to handle the u_{t} and uu_{x} terms however I always arrive at the error message:
error operator ( <7E_Array>, , <10LinearCombI7MGauche4C_F0E>…
I am not sure what I’m doing wrong here and would appreciate any advice that could be given. The code I am working on is listed below. Thanks in advance!
\begin{verbatim}
real nu = 1;
real lambda = 25;
real dt = 0.05;
real epsu = 1e-6;
//mesh
mesh Th = square(50,50);
//fespace
fespace Vh(Th, P2b,
periodic = [[0,lambda],[0,lambda]]);
Vh u=sin(lambdapix)+sin(lambdapiy);
Vh ux = dx(u);
Vh uy = dy(u);
Vh v;
for(int n = 0; n<100; n++){
Vh uxold = ux;
Vh uyold = uy;
//problem
solve ksx(ux, v, init = n, solver = CG, eps = epsu)
= int2d(Th) (uxv)
//+ int2d(Th) (
//convect([dx(ux), dy(ux)], -dt, ux)v) //convect term causes crash
+ int2d(Th)(
dtnu/2(dxx(ux)*dxx(v)+dyy(ux)dyy(v)))
- int2d(Th)(
dt/2(dx(uxold)*dx(v)+dy(uxold)dy(v)))
- int2d(Th)(
dt/2(dx(ux)dx(v)+dy(ux)dy(v)))
+ int2d(Th)(
dtnu/2(dxx(uxold)*dxx(v)+dyy(uxold)*dyy(v)))
;
solve ksy(uy, v, init = n, solver = CG, eps = epsu)
= int2d(Th) (uy*v)
//+ int2d(Th) (
// convect([dx(uy), dy(uy)], -dt, uy)*v) //convect term causes crash
+ int2d(Th)(
dt*nu/2*(dxx(uy)*dxx(v)+dyy(uy)*dyy(v)))
- int2d(Th)(
dt/2*(dx(uyold)*dx(v)+dy(uyold)*dy(v)))
- int2d(Th)(
dt/2*(dx(uy)*dx(v)+dy(uy)*dy(v)))
+ int2d(Th)(
dt*nu/2*(dxx(uyold)*dxx(v)+dyy(uyold)*dyy(v)))
;
//solver here should be laplace u = gradient f where f is (ux,uy), after this I can plot u
solve ksu(u,v, init = n, solver = CG, eps = epsu)
= int2d(Th)(dx(u)*dx(v)+dy(u)*dy(v))
+int2d(Th)((dx(ux)+dy(uy))*v)
+on(1, u=sin(pi*lambda*x))
+on(2, u=sin(pi*lambda*y))
+on(3, u=sin(pi*lambda*x))
+on(4, u=sin(pi*lambda*y))
;
plot(u);
}
\end{verbatim}