Solving a system of PDEs and defining equations

I want to solve a system of equation with one PDE which is heat-diffusion equation and one ODE which is Arrhenius equation:

eq = [ρ*Cp*Dt(T(t,x,y)) ~ kx*Dxx(T(t,x,y)) + ky*Dyy(T(t,x,y)) - H*W*Dt(c(t,x,y)),
    -Dt(c(t,x,y)) ~ A*c(t,x,y)*exp(-E/(Rc*T(t,x,y)))]

I want to determine T and c.
for this system, The Temperature in the ODE is the average temperature in the whole domain and c is a function of time only.
My problems are:

  1. How can I implement or define the average Temperature for the second equation (instead of T which is computed for each node)?
  2. When I write c(t) I get error and the error vanishes when I define it as c(t,x,y)
  3. I got a boundary condition which is conduction-convection balance:

-kx*Dx(T(t,Le,y)) ~ h * (T(t,Le,y)- T_ext)
Le is the length of the domain which is on the right boundary.
Is defining the boundary condition like this ok since there is Temperature in it?

ps: Every parameter in the equation is constant except T and c.

  1. You might be able to do this by using an integral over the domain, look up the integral definition of the mean, and see the integrals section of the docs Solving PIDEs (Integrals) · MethodOfLines.jl
  2. I will have to check this out, can you post the code to reproduce in an issue?
  3. This BC is fine.
1 Like

Thanks for your reply.
It might be right but since the temperature is the output of the network, is it possible to do so?

if you are referring to 1, yes, absolutely. Give it a go and let me know if your run in to trouble.

1 Like