# Thread: Conservation Law with Piecewise Source Term

1. ## Conservation Law with Piecewise Source Term

I am having some issue with a conservation law, where there is a step source term. Anyway, I have the following PDE
$\displaystyle u_t + a u_x = f(t,x), \quad u(x,0) = 0, \quad a >0$
$\displaystyle f(t,x) = \begin{cases} 1 & x\ge 0\\ 0 & \text{otherwise}\end{cases}$
Using method of characterstics and letting
$\displaystyle x(0) = \xi,\; t(0)=0, \hat{u}=u$
we have
$\displaystyle \dfrac{dt}{d\tau} = 1,\quad \dfrac{dx}{d\tau} = a,\quad \dfrac{d\hat{u}}{d\tau} = f(t,x)$
This implies that
$\displaystyle t = \tau,\quad \xi = x - at$.
From this point is where I get a little confused.
$\displaystyle d\hat{u} = f(t,x) d\tau$
Our ODE is piecewise
$\displaystyle d\hat{u} = \begin{cases} 1 & \xi \ge 0 \\ 0 & \text{otherwise}\end{cases}$.
So the solution to the ODE is
$\displaystyle \hat{u} = \begin{cases} \tau & \xi \ge 0 \\ 0 & \text{otherwise}\end$.
Which leads to the final solution
$\displaystyle \hat{u} = \begin{cases} t & x \ge at \\ 0 & \text{otherwise}\end$.

However, I know the solution is suppose to be
$\displaystyle u(t,x) = \begin{cases} 0 & x\le 0 \\ x/a & 0 < x < at \\ t & x \ge at\end$.

2. I am still working on this problem. So the problem seems to be the interpretation of the integral
$\displaystyle d\hat{u} = f(t, x) d\tau \Rightarrow \hat{u}(\tau,\xi) = \int_0^t\! f(s, \xi + as)\, ds \Rightarrow u(t,x) = \int_0^t\! f(s, x - a(t-s))\, ds$
Now evaluating this integral is messing me up. I definitely see that if $\displaystyle x \le a(t-s),\; u(t,x) = \int_0^t\! 0\,ds$ and $\displaystyle x \ge a(t-s),\; u(t,x) = \int_0^t ds$. So the part that is still not clear to me is how to get the interval $\displaystyle 0< x< at$ and then the $\displaystyle x/a$. This problem is making me feel quite dumb.

EDIT: One issue I am seeing is that when $\displaystyle s \in (0,t)$ I can't see which part of the piecewise function I am suppose to be using. Which of course corresponds to the interval $\displaystyle 0<x<at$.

Rankine

4. Except the Rankine-Hugoniot condition applies to Piecewise Initial Conditions. The RH Condition is necessary, because a jump in the initial conditions causes characteristics that cross, i.e. a shock wave. This is not what is happening here since all characteristics are parallel.

EDIT: BTW, Wikipedia has the worst explanation of the RH condition. Thank you for your suggestion though.

EDIT2: This problem really just boils down to evaluating that integral, which for some strange reason I am not getting.

5. I think you need to change your limits as you go. You've got the integral

$\displaystyle \displaystyle u(t,x)=\int_{0}^{t}f(s,x-a(t-s))\,ds$

$\displaystyle \displaystyle =\int_{0}^{t-x/a}0\,ds+\int_{t-x/a}^{t}1\,ds$

$\displaystyle \displaystyle =s|_{t-x/a}^{t}$

...

I think you need to work out the exact reasons why $\displaystyle 0\le t-x/a\le t.$

Generally, I would probably take the conditions $\displaystyle x<0,\;0<x<at,\;at<x$ separately. Then I think you could get the desired $\displaystyle u(t,x).$

Ultimately, the missing piece is breaking up the interval over which you're integrating into different pieces.

Incidentally, this is yet another problem where I'm really not sure what you're doing at the high level, but I might be able to help you with some small detail. This seems not infrequent with you!

6. Yeah, I always understand the concept, but get stuck on the details. This is something I have dealt with since I was an undergrad. I am still not seeing how to evaluate this integral. I guess I am having issues with breaking it into its intervals. Unfortunately, this is due tomorrow and I fear I won't figure it out by then. Oh well.

7. First take $\displaystyle x<0.$ Then how does the interval $\displaystyle s\in[0,t]$ break up? Recall that $\displaystyle a>0.$

Now, $\displaystyle t-s>0,$, so $\displaystyle a(t-s)>0>x.$ Therefore, the integrand is always the zero function, right? I mean, you have to have $\displaystyle x<a(t-s),$ which implies that the second argument of function $\displaystyle f$ is negative, implying $\displaystyle f=0.$ Therefore, the integral is zero. So much for the first region.

For the second region, assume $\displaystyle 0<x<at.$ How does $\displaystyle x$ compare with $\displaystyle a(t-s)$ as you vary $\displaystyle s$? Could you have $\displaystyle x=a(t-s)?$ For $\displaystyle s\in[0,t],$ you get $\displaystyle a(t-s)\in[0,at],$ so at some point, you will have equality. Hence, you get the integral I mentioned in my last post, which evaluates to $\displaystyle t-(t-x/a)=x/a,$ as required.

Finally, for the third region, assume $\displaystyle at<x.$ Then $\displaystyle a(t-s)<at<x$ for all $\displaystyle s$. It follows that the integral is

$\displaystyle \displaystyle\int_{0}^{t}f\,ds=\int_{0}^{t}1\,ds=t .$

This is precisely the $\displaystyle u(t,x)$ required.

Make sense?

8. Ahh, I guess I just didn't understand what you meant. Thank you. I think I am just too tired.

9. You're welcome!