find a numerical solution for partial derivative equations

73 Views Asked by At

I am quiet new to partial derivative equations. Now, I have met a partial derivative equation, where the function is continuous but piece-wise. Suppose u is a continuous but piece-wise function of x and t. u is partial in each piece-wise c.

$u(x,t) = \left\{ \begin{array}{l} u_1(x,t) \qquad for \quad (x,t) \quad in \quad [0,l_1) \quad X\quad [0, \infty) \\[2ex] u_2(x,t) \qquad for \quad (x,t) \quad in \quad [l_2,l_3) \quad X\quad [0, \infty) \\[2ex] u_3(x,t) \qquad for \quad (x,t) \quad in \quad [l_3,l_4] \quad X\quad [0, \infty)\end{array} \right.$, where

$u_1(l_1,t) = u_2(l_1,t),\quad u_2(l_2,t) = u_3(l_2,t),\quad u_3(l_3,t) = u_4(l_3,t)$

$u_1(x,t),u_2(x,t)$, and $u_3(x,t)$ are all unkown.

And the partial derivative equation is:

$\frac{\partial u} {\partial t} = a_1^2 * \frac{\partial^2 u} {\partial x^2}$ for all (x,t) in $[0,l_1) \quad X \quad [0,\infty)$

$\frac{\partial u} {\partial t} = a_2^2 * \frac{\partial^2 u} {\partial x^2}$ for all (x,t) in $(l_1,l_2) \quad X \quad [0,\infty)$

$\frac{\partial u} {\partial t} = a_3^2 * \frac{\partial^2 u} {\partial x^2}$ for all (x,t) in $(l_2,l_3) \quad X \quad [0,\infty)$

$a_1,a_2,a_3$ is known constant.

$u_1(l_1,t) = u_2(l_1,t),\quad u_2(l_2,t) = u_3(l_2,t),\quad u_3(l_3,t) = u_4(l_3,t)$

$u(0,t) = g_1(t)$ which is known.

$u(l_4,T) = g_2(t)$ which is also known.

However, how to find the numerical solution to this equation or where to find the solution? Will the numerical solution method to a piece-wise continuous partial differential equation be different to the numerical solution method to an normal partial differential equation?

1

There are 1 best solutions below

3
On

If we have the heat equation

$$\frac{\partial u}{\partial t} = k \frac{\partial^{2} u}{\partial x^{2}} \tag{1} $$ with boundary conditions

$$BC1: u(0,t) = 0 \\ BC2: u(L,t) = 0 \\ IC : u(x,0) = f(x) \tag{2} $$

we can use a partial difference equation to approximate this

$$ \frac{u_{j}^{m+1} -u_{j}^{m}}{\Delta t} = k \frac{u_{j+1}^{m} -2 u_{j}^{m} +u_{j-1}^{m} }{(\Delta x)^{2}} \tag{3}$$

$$ u_{j}^{m+1} = u_{j}^{m} + s\bigg(u_{j+1}^{m} -2 u_{j}^{m} +u_{j-1}^{m} \bigg) \tag{4}$$ the $s $ becomes $\frac{k \Delta t}{(\Delta x)^{2}}$. It is a dimensionless parameter that is indicating stability. It is actually connected to the eigenvalues in the system.

enter image description here

We form a tridiagonal matrix like this.

Then we solve the system like this

$$ u^{m+1} = Au^{m} \tag{5} $$

The matrix $A$ raised to $m$th power describes how the initial condition influences the solution at the $m$th time step. This is just a really brief explanation. You should technically cover this in a class.