11
votes
Periodic boundary condition for the heat equation in ]0,1[
The best way to do this is (as you said) to just use the definition of periodic boundary conditions and set up your equations correctly from the start using the fact that $u(0)=u(1)$. In fact, even ...
7
votes
Accepted
Do the class of PDEs that lack initial conditions have a name?
Such problems (sometimes called lateral Cauchy problems) are in general not well-posed (meaning they either lack a solution, or there are infinitely many of them, or the solution is unstable under ...
6
votes
Accepted
Type of Rosenbrock method by its coefficients
A search for the specific coefficients listed led me to the method ROS3PRL from
J. Sieber, Konvergenzanalyse und Numerische Tests für die Prothero–Robinson–...
5
votes
Accepted
Numerically solving a non-linear PDE
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
$$\...
5
votes
Help implementing finite difference scheme for heat equation
Don't worry about programming skills, everyone's a beginner at some point. It's a good start actually. I'm just going to give some hints assuming that this is an exercise. Actually, choward's answer ...
5
votes
"Optimal" domain partitioning in domain decomposition algorithms
We use domain decomposition because we want to exploit the power of more than one processor. As a consequence, the right question to pose is: "How do we need to partition the domain so that we ...
4
votes
Accepted
spurious oscillations Crank-Nicolson
The two problems you mention indeed have different roots. The first one is a consequence of numerical dispersion and the other one of numerical instability. Let me elaborate a little:
Problem #1:
The ...
4
votes
Algorithm suggestion for PDE - example: heat equation
You really don't want to solve the heat equation with an explicit time stepping scheme. You need to choose the time step so incredibly small that you won't make any progress towards the end time.
(...
4
votes
Accepted
1D FEM for nonlinear diffusion coefficient
You would need to linearize the problem. I prefer to do it before discretization but it's possible to do also after discretization. (I'm a bit skeptical of linearization after discretization because I ...
4
votes
Is there a simple way to add a sparse matrix to an LU decomposition of a dense matrix?
And just a few minutes after asking I found an answer. The procedure above is called "updating LU". This question has a nice generic answer with links to other more specific questions.
full ...
4
votes
Accepted
Is there a simple way to add a sparse matrix to an LU decomposition of a dense matrix?
There is another factorization you could consider: the Hessenberg upper-triangular reduction. It's usually used as a preprocessing step in the QZ algorithm, but it has other uses as well.
Consider the ...
4
votes
Accepted
Is this a diffusion equation, or something else?
This equation is a variation of the heat equation. The fractional derivative is a nonlocal operator, which implies that the equation has "memory": whereas in a traditional ODE (or time ...
3
votes
Accepted
Dirichlet boundary conditions in the 1D Heat Equation
No, you did not overlook anything. You actually have to know specific
$g_L(t)$ - boundary condition at the left boundary ($x=-1$)
$g_R(t)$ - boundary condition at the right boundary ($x=1$)
$\eta(x)$ ...
3
votes
Accepted
Implementation of 1D Advection in Python using WENO and ENO schemes
The confusion was the misleading variables $F_{j-1/2}$ and $F_{j+1/2}$ with f_left and f_right, which are completely different.
...
3
votes
Relation between Time dependent problem and advection diffusion
So after browsing the paper a bit, I think that the answer is essentially what Christian Clason stated in his comment.
It seems that the original question refers to the statement just above Equation (...
3
votes
Algorithm suggestion for PDE - example: heat equation
So you can solve this problem with an Explicit time stepping scheme, as nluigi mentioned, but it comes at a cost just as Wolfgang stated.
In the problem statement, the problem is formulated using an ...
3
votes
Accepted
Algorithm suggestion for PDE - example: heat equation
While i agree with Wolfgang that its best to choose Crank-Nicolson time stepping, i think it is incorrect to assert explicit time stepping results in 'incredibly small' time steps or even to suggest ...
3
votes
Accepted
Help implementing finite difference scheme for heat equation
So your first big issue is one you bring up in point (4), where you say you get the error 'u(0, t[m]) = 0 "can't assign to function call"'. You're trying to store data by assigning data to a function. ...
3
votes
Two-dimensional heat equation with Neumann boundary conditions: any hope to find an analytical solution?
Expanding (sort of) on @MPIchael's answer, you can pick any smooth function you like and plug it into the heat equation to give a problem to then work the other way. In numerical methods, we call this ...
3
votes
Accepted
Nondimensionalization of a multi-component chemical diffusion equation
The important part of $D$ are not its entries (because they depend on the choice of basis vectors you choose -- whether you work with concentrations of the three elements individually, or linear ...
2
votes
heat equation on bounded and unbounded domain
This question is more related with mathematics than Scientific Computing. But I will mention some things that come to my mind. I am not trying to be rigorous here, though.
You are mentioning more ...
2
votes
Trying to compute the error from comparing two arrays
I would highly suggest that you use the norm functions in numpy via ...
2
votes
Trying to compute the error from comparing two arrays
You can just do something to the effect of "$\mathtt{np.max(np.abs( BS - u ) )}$". This computes the $L_\infty$ norm of the error, which seems to be what you're after. It'll save you the heartache/...
2
votes
Stability condition for explicit time FEM for parabolic pdes
Well, boy, do I have the resource for you :-) Take a look at lectures 26 and 27 at
https://www.math.colostate.edu/~bangerth/videos.html
2
votes
Accepted
Heat Equation - PDE
I think that you just plot the wrong thing. The variable xmesh is the initial condition, not the value of x (in your particular ...
2
votes
How suitable is multigrid method for time-dependent PDEs?
This statement seems a bit reductive for what is a rather large and involved problem. But multigrid, although it was developed for and is ideal for elliptic problems, is still just about the best we ...
2
votes
Accepted
Backwards Difference Implicit Method for Nonlinear Parabolic PDE in Python
Let's reconstruct this from first principles:
Defining the ODE system
In the method-of-lines discretization you solve an ODE system $\dot U=F(U)$, $U=(U_0,U_1,...,U_{M+1})$, $U_k(t)=u(x_k,t)$, and ...
2
votes
Two-dimensional heat equation with Neumann boundary conditions: any hope to find an analytical solution?
TL DR:
$$u_1(x_1) = \cos(2\pi~(\frac{x_1}{L_1}) - \pi) + 1$$
$$u_2(x_2) = \cos(2\pi~(\frac{x_2}{L_2}) - \pi) + 1$$
$$u(x,t) = \exp(-a t) u_1(x_1) u_2(x_1)$$
How to construct it:
Sines and cosines are ...
2
votes
Accepted
3d schrodinger equation weak form
The solutions of the Schroedinger equation are complex-valued, so your inner product needs to be
$$
(u,v) = \int_\Omega \bar u(x) v(x)\; dx,
$$
and the norms then become
$$
\|u\| = (u,u)^{1/2}.
$$
...
2
votes
Accepted
Derivation of a parabolic PDE using Alternating Direction Implicit method
Yes, this is correct in the sense that it is second order in both time and space. It is not the only way to handle the $f(x, y, t)$ term, however.
From the equations you wrote, it appears that the ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
parabolic-pde × 100pde × 50
finite-difference × 32
boundary-conditions × 13
numerics × 12
finite-element × 11
matlab × 10
python × 8
stability × 7
advection-diffusion × 7
nonlinear-equations × 6
finite-volume × 5
convergence × 5
elliptic-pde × 5
diffusion × 5
numerical-modelling × 4
discretization × 4
linear-system × 3
method-of-lines × 3
space-time-galerkin × 3
fluid-dynamics × 2
ode × 2
iterative-method × 2
reference-request × 2
numpy × 2