Are boundary conditions required between subdomains of 1D PDE?

195 Views Asked by At

I am using finite difference software to solve across 1D line from x=0 to x=1 (left Domain), and x=1 to x=2 (middle/central domain) and x=2 to x=3 (right domain). The only difference between domains is that the central domain posses a source term.

I have a Left hand domain where \begin{equation} u_t(x,t) - u_{xx}(x,t) = 0 \text{ where $x\in\mathbb{R}$ and $t>0$} \end{equation}

And then a domain in the middle \begin{equation} u_t(x,t) - u_{xx}(x,t) = S \text{ where $x\in\mathbb{R}$ and $t>0$ and $S>0$} \end{equation}

And then a third right hand domain:

\begin{equation} u_t(x,t) - u_{xx}(x,t) = 0 \text{ where $x\in\mathbb{R}$ and $t>0$} \end{equation}

Boundary conditions are required at the start and end of the 1D line.

Are boundary conditions required between the domains, or can I just change the value of S to be nonzero in the middle and have no boundary conditions surrounding the central subdomain? If there are no central subdomain boundary conditions is the solutions approximately correct? Does the same principle apply to 2D and 3D pdes?

1

There are 1 best solutions below

1
On

Note This is not intended to answer the question but to help understand the importance of regularization when solving differential equations using numerical schemes.


Assume we have a 2D grid with cartesian coordinates $(x,y)$ and for some reason we want to solve the function which minimizes the gradient of a scalar potential field $\phi(x,y)$ everywhere $$\min\int_\mathcal S \|\nabla \phi(x,y)\|_FdS$$ where dS is some small quadratic area element in $x$ and $y$. Given some boundary functions, say for example $\phi(x,y) = f(x,y)$ on $\mathcal C$.

Furthermore assume we make a discretization of our differential operators:

$$\nabla = \left[\frac \partial {\partial x},\frac \partial {\partial y}\right]^T : d_x = \left[\begin{array}{rr}1&-1\\1&-1\end{array}\right], d_y = \left[\begin{array}{rr}-1&-1\\1&1\end{array}\right]$$

finally we try to solve this with a big linear least squares problem:

$$\min\left\{\left\|\nabla \phi(x,y)\right\|_F^2+\left\|{\bf C}(\phi(x,y)-f(x,y))\right\|_F^2\right\}$$ Where C encodes the areas where the boundary function should hold (err.. the boundary, in other words).

Our first attempt, without any additional term, gives us a somewhat weird result..: (boundary areas $\mathcal C$ are inner circle and rectangular frame.)

enter image description here

We can see very visible chessboard patterns in the solution. However if we add a small regularizing term with filter $h = \left[\begin{array}{rr}-1&1\\1&-1\end{array}\right]$ we see we can get a much more naturally smooth solution:

enter image description here