- #1

- 68

- 4

## Main Question or Discussion Point

Hello. I have some questions regarding the equation:

[itex] k\frac{\partial}{\partial x}\left( u\frac{\partial (u-r(x,t))}{\partial x} \right) = \kappa \frac{\partial u}{\partial t}[/itex].

u is positive. r(x,t) is given as an input.

I have implemented this non-linear diffusion equation using backward Euler time stepping and a spatial scheme as if it were a standard diffusion equation : [itex] \frac{\partial}{\partial x}\left( u\frac{\partial u}{\partial x} \right) \approx \frac{1}{\Delta x}\left[u_{i+1/2}\frac{u_{i+1}-u_i}{\Delta x}- u_{i-1/2}\frac{u_{i}-u_{i-1}}{\Delta x}\right][/itex].

Now, my numerical solution works. But not as good as I was hoping. I want it to work over longer time-periods than I am allowed to with my numerical solution within any reasonable time. When trying to use the solution for these kinds of time-periods, the integral over u is not conserved(In my case: The total amount of oil changes during simulation). I hypotize that it is due to the oil front(where u goes from u>0 to u=0). At each timestep I put all the nodes with negative u values to 0 to get a stable and non-negative solution. Some times, in order to make my solution work better, I have to increase the number of spatial nodes, to get a better resolution for the front.

I am thus looking for better schemes to implement my equation. Accuracy is not important, but stability and conservation of u is(At least more or less. The integral of u is allowed to vary with say 10-20% if it is a really long simulation)

Questions:

1. Is there any way to change the problem into one that is more convenient to solve numerically by, say, a change of variables, or applying a transform to the equation? I have been looking at the Kirchhoff transform, to transform the diffusion equation to a linear one. Would that be applicable to this problem?

2. Which numerical scheme would you use to solve the equation, if solving it as is?

Thanks :)

[itex] k\frac{\partial}{\partial x}\left( u\frac{\partial (u-r(x,t))}{\partial x} \right) = \kappa \frac{\partial u}{\partial t}[/itex].

u is positive. r(x,t) is given as an input.

I have implemented this non-linear diffusion equation using backward Euler time stepping and a spatial scheme as if it were a standard diffusion equation : [itex] \frac{\partial}{\partial x}\left( u\frac{\partial u}{\partial x} \right) \approx \frac{1}{\Delta x}\left[u_{i+1/2}\frac{u_{i+1}-u_i}{\Delta x}- u_{i-1/2}\frac{u_{i}-u_{i-1}}{\Delta x}\right][/itex].

Now, my numerical solution works. But not as good as I was hoping. I want it to work over longer time-periods than I am allowed to with my numerical solution within any reasonable time. When trying to use the solution for these kinds of time-periods, the integral over u is not conserved(In my case: The total amount of oil changes during simulation). I hypotize that it is due to the oil front(where u goes from u>0 to u=0). At each timestep I put all the nodes with negative u values to 0 to get a stable and non-negative solution. Some times, in order to make my solution work better, I have to increase the number of spatial nodes, to get a better resolution for the front.

I am thus looking for better schemes to implement my equation. Accuracy is not important, but stability and conservation of u is(At least more or less. The integral of u is allowed to vary with say 10-20% if it is a really long simulation)

Questions:

1. Is there any way to change the problem into one that is more convenient to solve numerically by, say, a change of variables, or applying a transform to the equation? I have been looking at the Kirchhoff transform, to transform the diffusion equation to a linear one. Would that be applicable to this problem?

2. Which numerical scheme would you use to solve the equation, if solving it as is?

Thanks :)

Last edited: