Replies: 1 comment
-
The derivative operator |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am solving a simple 1-D time-dependent PDE as follow ($a$ and $b$ are pre-defined coefficients):
$$\frac{\partial u}{\partial t} = a \frac{\partial u}{\partial x} + b T,\ t \in [0, T],\ x \in [0, L].$$
The initial and boundary conditions are given by:
$$u(t=0) = f(x), u(x=0) = g(t).$$
In simplest form,$f(x)$ and $g(t)$ can be constants.
Following is my code snippet. However, I couldn't find a easy way to implement the boundary conditions ONLY on one side of axis$x$ , namely $x=0$ . Consequently, results went diverged.
Do you have any suggestions to fix the problem?
Beta Was this translation helpful? Give feedback.
All reactions