How to apply DiffEq for PDEs with a moving boundary?

Suppose we have the following diffusion equation

\frac{\partial\phi}{\partial t} = \frac{\partial^2\phi}{\partial z^2}

with initial condition

\phi(z, t=0) = 0.1

and a boundary condition at z=0

\frac{\partial\phi}{\partial z} = 0

and the other moving boundary at z=h(t)

\frac{\partial\phi}{\partial z}=10\,\phi(1-\phi).

The moving boundary is moving at a speed

\frac{dh}{dt} = -10\left[1-\phi(z=h(t), t)\right]

Which package can I use in DifferentialEquations.jl ecosystem to solve this kind of problem? How can I incorporate the moving boundary constraint? Thanks!

Does this require transforming the partial differential equation into a set of ordinary differential equations and applying DifferentialEquations.jl on the resulting semi-discrete (discrete in the space or variable z) system?
How do you intend to move the spatial mesh with the moving boundary?


can you not change of variables in order to make it a boundary condition at z=1 for example


Sounds like an interesting problem. As it stands, I don’t really understand the formulation though. If \phi(z,t=0)=0.1, then the solution to the diffusion equation will be constant for all t. Also, it seems that the second boundary condition is not consistent with the initial condition.

1 Like

The second boundary condition is derived from the conservation of \phi. Since the volume of the system is reducing as the boundary shrinks, \phi shall not be 0.1 anymore. furthermore, the \phi field will redistribute according to the diffusion equation.

I am also confused. It seems at t=0, according to the initial condition, \frac{\partial \phi}{\partial z} = 0 at z=h(0). But the second boundary condition gives \frac{\partial \phi}{\partial z} = 10*0.1*(1-0.1)=0.9 which is nonzero.

Do you mean make a change of variable such as \xi = z/h(t), so that \xi now is always in the range [0,1]?

There is a difference between making computations and existence / uniqueness results. By making computations, we assume existence.

About your issues regarding, boundary conditions, these are well known under the name of mild / strong solutions. I would say that you can only compute strong solutions numerically, you have to be more clever for mild ones.

To me, the problem is to define a Cauchy Problem \dot u = A(t)\cdot u associated with the PDE, in a state space E. If you take u=(\phi,h), we need to specify the state space for \phi. Note that E does not depend on time, hence you need to reformulate the problem to have that. I would take z = x\cdot h(t) with x\in(0,1). One issue is that you have to make sure that the dynamics of h makes it stay >0.

If you write \psi(x,t) = \phi(x*h(t), t), you get (I think)

\partial_t\phi=z\frac{\dot h}{h^2}\partial_x\phi + \frac{1}{h^2}\partial_x^2\phi, \quad \partial_x\phi(0,t)=0,\cdots


I can not understand what you mean by Cauchy Problem and the state space and I can’t find references for it by googling. But I get it that I should make a change of variable and solve that equation instead. I will try it tomorrow. Thanks!

for time dependent pde, the state space does not depend on time. The domain of the operator A(t) can

With boundaries that move you often have to change the mesh. The only case, that I know of, where you can avoid this by separating the domains using a new solution. This is often used for phase changes and call phase field method.

I wrote a finite volume solver with a special case for the boundary. I split the volume depending on the amount of phase change. In addition I merge the next cell to the boundary on case the volume gets to small.

Also Stefan Problem might be a good name to search for.

1 Like