Hello erevyone,

I am contacting you to try to get some answers about a problem related to a squared variable.

Indeed, I put here my simplified program with simple constants A, B, C etc and the variable c1 and the test function c2.

The variational form is :

The corresponding code is :

problem first(c1,c2) =

int2d(Sh)(c2*c1*c1/dt)

- int2d(Sh)(c2*c1*c/dt)

+ int2d(Sh)(R*c1*(dx(c1)*dx(c2)+dy(c1) dy(c2)))*N*(dx(c1)

+ int2d(Sh)(ES

*dx(c2)+dy(c1)*c1

*dy(c2))*c1*c1)*

- int2d(Sh)(RF/N- int2d(Sh)(R

*D*grad(c2)‘

*grad(S))*

- int2d(Sh)(ES

- int2d(Sh)(E

*F*c1*grad(c2)’*grad(S))

+ on(1,c1=C0)

+ on(2,c1=C0)

+ on(3,c1=C0)

+ on(4,c1=C0)

I don’t understand why the code doesn’t accept the variable c1 to the square.

Would someone be able to answer me or give me a hint?

To give more details, at first, I started with a simple problem and it worked very well.

The simple model was with a variational form like :

So, as you can see, this simple code had no square variable c1*c1 :

problem first(c1,c2) =

int2d(Sh)(c2*c1/dt)
- int2d(Sh)(c2*c/dt)

+ int2d(Sh)(R*(dx(c1)

*dx(c2)+dy(c1)*c1

*dy(c2)))*

- int2d(Sh)(RF/N- int2d(Sh)(R

*D*grad(c2)’*grad(S))

+ on(1,c1=C0)

+ on(2,c1=C0)

+ on(3,c1=C0)

+ on(4,c1=C0)

Thank you in advance for your response,

Lisa