# Error operation in integration

**URL:** <https://community.freefem.org/t/error-operation-in-integration/293>\
**Category:** General Discussion\
**Created:** [March 7, 2020, 5:03am UTC](https://community.freefem.org/t/error-operation-in-integration/293 "2020-03-07T05:03:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sumantkr](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/sumantkr/32/2681_2.png) [@sumantkr](https://community.freefem.org/u/sumantkr)\
**Post date:** [March 7, 2020, 5:03am UTC](https://community.freefem.org/t/error-operation-in-integration/293/1 "2020-03-07T05:03:10Z")

</div>

Dear All,  
This is my code and unfortunately, I am getting the same error in integral line of problem.

Kindly suggest me to fix it,  
codes are given below.

/////////////////////////////////////////////////////////////////////////////////////////////////////

real dt=0.50;  
real tend =10;  
real phio= 0.1003, rhof=1000.0, cvf = 4200, kts=2.49, cvs=1000.0, rhos=2910.2;  
real qf=0.0, qs=0.0, cpf=4200, ktf=0.6, g=9.8, miu=0.2;  
real kt= (1-phio)_kts+phio_ktf;  
real RhoCv= (1-phio)_rhos_cvs+ phio_rhof_cvf;  
border C1(t=0,1) { x = 20_t; y= 0; }  
border C2(t=0,1) { x = 20; y = 20_t; }  
border C3(t=0,1) { x = 20 - 20_t; y =20; }  
border C4(t=0,1) { x = 0; y = 20 - 20_t;}  
mesh Th= buildmesh(C1(20)+C2(20)+C3(20)+C4(20));  
fespace Vh(Th, P1);  
Vh u,v;  
Vh uold,f;  
/_macro grad(u) (dx(u)+dy (u)) /  
problem prs(u,v) = int2d(Th) (  
dtkt_(dx(u)_dx(v)+dy(u)dy(v)) + RhoCv(u_v))

```
                        + int2d(Th) (dt*cpf*rhof*qf*v*(dx(u)+dy(v)))
                        - int2d(Th) (dt*qs*v)
                        - int2d(Th) (RhoCv*uold*v)
                        + on(C2, u=f)
                        + on(C4, u=473.15);

```

uold=0;  
real t=0;  
for(int i=0; i\<50; i++)  
{ uold =u;  
t=t+dt;

f= 473.15-10\*t;  
prs;  
plot(u, wait=0,fill=1, value=1);

}

---

<div class="post-metadata">

**Author:** ![AFourmont](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/afourmont/32/56_2.png) [@AFourmont](https://community.freefem.org/u/AFourmont)\
**Post date:** [March 12, 2020, 8:47am UTC](https://community.freefem.org/t/error-operation-in-integration/293/2 "2020-03-12T08:47:25Z")

</div>

This is because you have a mistake in your weak formulation

---

<div class="post-metadata">

**Author:** ![sumantkr](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/sumantkr/32/2681_2.png) [@sumantkr](https://community.freefem.org/u/sumantkr)\
**Post date:** [March 12, 2020, 9:24am UTC](https://community.freefem.org/t/error-operation-in-integration/293/3 "2020-03-12T09:24:17Z")

</div>

Thanks for identifying the error,

can we implement the boundary condition of time variable.

like f= 20+30\*t; in Neumann BC or Dirichlet BC, and that would change regularly with time increment.
