8

It's easy to derive that equation from Fick's law. You have this diffusion equation as: $$\frac{\partial C}{\partial t} = D \nabla^{2} C$$ The mean square displacement weighted by the concentration profile is defined as: $$\langle r^{2}(t) \rangle = \int_{\Omega} |\vec{r}|^{2} C(\vec{r},t) d^{3} \vec{r}$$ The time-evolution of this mean square ...


5

First off, the PDE can be rewritten instead as $$\frac{\partial C}{\partial t} = \frac{\partial}{\partial x}C\frac{\partial C}{\partial x}$$ or, by applying the product rule in reverse again, as $$\frac{\partial C}{\partial t} = \frac{1}{2}\frac{\partial^2}{\partial x^2}C^2.$$ This equation is often referred to as the porous medium equation or the slow ...


5

Yes, the problem with mixed boundary conditions is well posed. What's not clear to me is this: Why do you approximate the derivative via the two-sides approximation? Shouldn't it be enough to just the following? $$ \frac{f_6 - f_{6-\Delta x}}{\Delta x} = 0. $$ In your animations, what is the size of $\Delta x$? Your curve looks very smooth, which can be ...


3

There is no reason to believe that two random fields with the same arithmetic mean would yield solutions that have anything to do with each other. In fact, for the case you consider, one might imagine that maybe the harmonic mean is actually a better indicator, but even that is unclear -- it could also be the geometric mean. Apart from this, you have to ...


2

In fact, your equation is a non-linear advection-diffusion. Due to the fact that your problem is time-dependent, it could be easily solved by finite-difference: $$\frac{\partial z}{\partial t} = -C (\sin(\omega t))^{m} x^{hm} n (\frac{\partial z}{\partial x})^{n-1} \frac{\partial^{2} z}{\partial x^{2}} -C (\sin(\omega t))^{m} x^{hm} h m x^{-1} (\frac{\...


2

It seems still you don't specify your boundary conditions explicitly despite the suggestion given in one of your previous questions. As far as I understand from your MATLAB code, your boundary conditions don't make sense at all. You have two Neumann boundary conditions at the left and right sides of your 1D domain: $$-D\frac{\partial C}{\partial x}|_{x=0} = ...


1

Take the first expression and start to reduce the $x$ values to $x_i$, \begin{align} \frac{u_{i+1}^n - u_i^n}{x_{i+\frac{1}{2}}} - \frac{u_i^n - u_{i-1}^n}{x_{i-\frac{1}{2}}} &= \frac{(x_i-\frac12Δx)(u_{i+1}^n - u_i^n) - (x_i+\frac12Δx)(u_i^n - u_{i-1}^n)}{x_{i-\frac{1}{2}}x_{i+\frac{1}{2}}} \\ &=\frac{x_i}{x_i^2-\frac14Δx^2}(u_{i+1}^n - 2u_i^n + u_{...


1

Problem well posed Your problem is well posed. On the discretization with Crank-Nicholson I am not familiar with MMS, and I wonder how you got that ungeneralised form of the diffusion equation. Anyways, as I understand it, you are using the Crank-Nicholson method to discretize the following differential equation: $\frac{\partial f}{\partial t} = x^2 \...


1

This comes from von Neumann stability analysis. You discretize the partial differential equation and look at the error equation, which is the difference between the exact solution to the finite difference approximation and the actual equation. You need the error to shrink in time, and if you assume that the error behaves like a fourier series, you can ...


Only top voted, non community-wiki answers of a minimum length are eligible