- 1,798
- 33
- TL;DR Summary
- How can you supply the boundary condition for the conservation of mass to a bar of time-dependent length?
Suppose I'm looking at a bar of length L(t) in 1D and I have the conservation of mass:
<br /> \frac{\partial\rho}{\partial t}+\frac{\partial}{\partial x}(\rho u)=0<br />
In order to make things easier, I make the change of variable x'=x/L(t) so that in this frame of reference, the length remains constant, and it will keep the numerics easier. The equation is then transformed into:
<br /> L^{2}(t)\frac{\partial\rho}{\partial t}-L'(t)\frac{\partial\rho}{\partial x'}+\frac{\partial}{\partial x'}(\rho u)=0<br />
Now when I do a method of lines numerical method I end up with the following:
<br /> \frac{d\rho_{i}}{dt}=\frac{L'}{2hL^{2}}(\rho_{i+1}-\rho_{i-1})-\frac{L}{2h}(\rho_{i+1}u_{i+1}-\rho_{i-1}u_{i-1})<br />
I thought about using the boundary condition:
<br /> \frac{\partial}{\partial x}(\rho u)=0<br />
but I don't know how to deal with \partial\rho/\partial x' on the boundary. Does anyone know?
<br /> \frac{\partial\rho}{\partial t}+\frac{\partial}{\partial x}(\rho u)=0<br />
In order to make things easier, I make the change of variable x'=x/L(t) so that in this frame of reference, the length remains constant, and it will keep the numerics easier. The equation is then transformed into:
<br /> L^{2}(t)\frac{\partial\rho}{\partial t}-L'(t)\frac{\partial\rho}{\partial x'}+\frac{\partial}{\partial x'}(\rho u)=0<br />
Now when I do a method of lines numerical method I end up with the following:
<br /> \frac{d\rho_{i}}{dt}=\frac{L'}{2hL^{2}}(\rho_{i+1}-\rho_{i-1})-\frac{L}{2h}(\rho_{i+1}u_{i+1}-\rho_{i-1}u_{i-1})<br />
I thought about using the boundary condition:
<br /> \frac{\partial}{\partial x}(\rho u)=0<br />
but I don't know how to deal with \partial\rho/\partial x' on the boundary. Does anyone know?
Last edited: