Hello,
I’m a new Freefem user;
I’d like to solve the following equation
∂∆φ/∂t+∂φ/∂x ∂∆φ/∂y-∂φ/∂y ∂∆φ/∂x=0
begin φ a scalar potential;
I implemented the weak formulation of the problem using the freeFEM syntax, unfortunately during the execution the following error appears
problem turbu(Phi,u,Psi,uu)=int2d(Th)(uPsi/dt+gradPzgradu(Phi,u) ([dx(Phi), -dy(Phi)][dy(u), dx(u)]) erro0ýlr operator * <10LinearCombI7MGauche4C_F0E>, <10LinearCombI7MGauche4C_F0E>
List of choices…
I tried different ways without to reach a right solution but It seems that the problem comes from the macro definition;
please, could anybody give me some help?
Thanks a lot for the time
Best Regards
Giulio
Ps> I’m including below the implemented FreeFEM code
int bottom=1;
int right=2;
int top=3;
int left=4;
int L=2.*pi;
int n=60;
real dt=0.1;
real T=1.;
//Domain calculation
border b1(t=0,L){x=t; y=0; label=bottom;};
border b2(t=0,L){x=L; y=t; label=right;};
border b3(t=L,0){x=t; y=L; label=top;};
border b4(t=L,0){x=0; y=t; label=left;};
// Mesh definition.
mesh Th = buildmesh(b1(n)+b2(n)+b3(n)+b4(n));
plot(Th);
//Space definiton.
fespace Vh(Th,P1b);
Vh Phi, Psi;
fespace Uh(Th,P1);
Uh u, uu, uold=0;
//Macro Definition
macro gradPzgradu(Phi,u) ([dx(Phi), -dy(Phi)]*[dy(u), dx(u)]) //
//Weak Formulation
problem turbu(Phi,u,Psi,uu)=int2d(Th)(uPsi/dt+gradPzgradu(Phi,u)Psi)-int2d(Th)(uoldPsi/dt)+int2d(Th)(uuu-dx(Phi)*dx(uu)+dy(Phi)*dy(uu));//+on(1,2,4, Phi=0.01,u=0)+on(3, Phi=0.02,u=0);
//plot(u,value=1);
for(real t = 0; t < 0.02; t += dt){
uold = u; //equivalent to u^{n-1} = u^n
turbu; //here the thermic problem is solved;
plot(Phi);
}