# Solving a system of PDEs with an ODE

I want to solve the following system of equations which consists two PDEs and one ODE: \begin{align} \rho_t+v\rho_x &= 0; \newline Y_t+vY_x &= 0 ;\newline v_t &= -\frac{1}{(\int_0^1\rho dx)}\Big[-\frac{1}{3}\frac{1}{Fr^2}\int_0^1(\rho-1) dx +\xi v|v|\Big] \end{align} where $$\rho, Y, T$$ are function of $$(x,t)$$ and $$v$$ is a function of $$t$$. And $$\xi, Fr,v_0, a ,b,c,d$$ are real constants. I am going to solve the above system with the following initial conditions. for $$f$$ given function \begin{align} \rho(x,0) = f(x),\quad Y(x,0)=0,\quad v(0)=v_0 \end{align} and following boundary conditions \begin{align} \rho(0,t) &= 1 \quad \text{ if } v(0)>0\newline \rho(1,t) &= 1 \quad \text{ if } v(0)<0\newline Y(0,t) &= c \quad \text{ if } v(0)>0\newline Y(1,t) &= d \quad \text{ if } v(0)<0 \end{align}

It's clear that the first two advection equations and have analytical solutions but since the coefficient, $$v$$ depends on the time, I first try to solve the ODE for $$v_t$$ with Euler or Runge Kutta method and then solve the two PDE with the explicit upwind method. But still, I do not know if I'm solving it right. If anyone has a different idea of how to solve this system or has some comments on my approach I would really appreciate it.

• Have you given your idea a try? It seems sensible to me. Sep 14 at 12:02
• Are we talking about solving the ODE standalone first? How can you do it if there is $\rho(t)$ in the RHS of it? Sep 14 at 15:37
• You can solve the whole system in a fully coupled fashion, with the ODE RHS being formed by a proper discrete approximation of the integrals it contains. Or solve the ODE and the two PDEs in a staggered mannered (i.e. explicit coupling). Sep 14 at 19:25
• Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
– Community Bot
Sep 15 at 17:56