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–...
Steven Roberts's user avatar
6 votes
Accepted

Continuous vs discontinuous space-time FEM

More concretely, it can be shown that discontinuous Galerkin (dG(r)) schemes lead to strongly A-stable time stepping schemes and continuous Galerkin (cG(r)) schemes are A-stable time stepping schemes, ...
Julian Roth's user avatar
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 $$\...
Daniel Shapero's user avatar
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 ...
Chris's user avatar
  • 151
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 ...
Wolfgang Bangerth's user avatar
5 votes
Accepted

Time discretisation after splitting a 4th order equation

The introduction of $w$ is just a reformulation of your initial problem. If you use (2), this means that you make the 4th-order diffusion term explicit, which may potentially lead to stability issues. ...
Laurent90's user avatar
  • 1,808
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. (...
Wolfgang Bangerth's user avatar
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 ...
ekkilop's user avatar
  • 221
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 ...
knl's user avatar
  • 2,076
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 ...
Dimitar Slavchev's user avatar
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 ...
Thijs Steel's user avatar
  • 1,558
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 ...
Wolfgang Bangerth's user avatar
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 ...
Bill Barth's user avatar
  • 10.9k
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)$ ...
Anton Menshov's user avatar
  • 8,652
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 ...
spektr's user avatar
  • 4,228
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 ...
nluigi's user avatar
  • 277
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. ...
spektr's user avatar
  • 4,228
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 ...
Wolfgang Bangerth's user avatar
3 votes

Continuous vs discontinuous space-time FEM

The closest answer that I know to your question is that different choices of basis and test functions are going to have different stability properties. In some cases, you can show that the Galerkin-in-...
Daniel Shapero's user avatar
3 votes
Accepted

Where am I making a mistake in solving the heat equation using the spectral method (Chebyshev's differentiation matrix)?

The answer is quite simple: You have to set the Neumann boundary condition $u_x(-1,x)=0$ explicitly Add following line (fifth line): ...
ConvexHull's user avatar
  • 1,290
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 ...
nicoguaro's user avatar
  • 8,490
2 votes

Trying to compute the error from comparing two arrays

I would highly suggest that you use the norm functions in numpy via ...
Kyle Mandli's user avatar
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/...
Tyler Olsen's user avatar
  • 1,522
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 ...
EMP's user avatar
  • 2,079
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
Wolfgang Bangerth's user avatar
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 ...
MPIchael's user avatar
  • 2,792
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 ...
Lutz Lehmann's user avatar
  • 5,974
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}. $$ ...
Wolfgang Bangerth's user avatar
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 ...
Steven Roberts's user avatar
2 votes
Accepted

Objective function for PDE-constrained boundary control problem in cylindrical coordinates

There are a couple of questions here, some of which pertain specifically to the geometry and input data for your problem and some have more to do with PDE-constrained optimization in general. Some of ...
Daniel Shapero's user avatar

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