# Tag Info

13

The CFL condition states that the "mathematical domain of dependence" must be (asymptotically) contained in the numerical domain of dependence. For hyperbolic problems, this provides a bound $\Delta t < C \Delta x$ that is useful at all resolutions. For a parabolic problem, it merely requires that $\Delta t \in o(\Delta x)$ in the limit $\Delta x \to 0$. ...

10

This phenomenon is often called "ringing" and plagues methods that are not $L$-stable. This can be seen in this motivating example from Hairer & Wanner (1999) "Stiff differential equations solved by Radau methods". Consider the equation $$\dot y = -50 (y - \cos t)$$ and apply explicit Euler with time step near the stability limit, implicit midpoint ...

8

Yes, for the heat equation Neumann boundary conditions all around the boundary is sufficient to maintain uniqueness of the solution. Whether you choose Neumann or Dirichlet conditions is dictated by the physical situation you try to model: if you know the temperature, then you need Dirichlet conditions; if you know the heat flux, then you need Neumann ...

8

It all boils down to finding the largest or smallest eigenvalue of the stiffness matrix. You can do that analytically for a uniform mesh, and you then arrive at the traditional formula $\tau \le ch^2$. For non-uniform meshes, the relationship between mesh size and eigenvalue is not obvious any more; in particular, there is no analytic formula for the ...

8

This makes no sense. Let us assume that $g(z)=0$ has exactly one solution $z=z^\ast$, then your boundary condition $g(u|_\Gamma)=0$ is equivalent to $u|_\Gamma=z^\ast$, i.e., a linear Dirichlet condition. On the other hand, if there are multiple solutions of $g(z)=0$, then you are saying that the value $u|_\Gamma$ could have multiple values, but this does ...

8

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 more strongly, periodic boundary conditions identify $x=0$ with $x=1$. For this reason, you should only have one of these points in your solution domain. An open ...

6

A two-point flux like this is not convergent if the mesh is not "orthogonal", in the sense that the edge/face between two cells is orthogonal to the line segment joining the cell centroids. If your mesh is orthogonal, you would use the distance between centroids for $h_{ij}$ above. If you would like a method to work on more general meshes within the cell-...

6

I'm going to write this as an answer although it doesn't directly answer the question. Plugging the second equation and the third equation into the first, and plugging the third into the second, together give: \begin{align} \frac{\partial^2 c}{\partial t^2} &= \frac{\partial^2}{\partial x^2}\frac{\partial c}{\partial t} + \frac{\partial b}{\partial ... 6 The solutions for the equation are in\psi \in \mathbb{C}^{3M}\times\mathbb{R}^+ \enspace .$$If the number of electrons is small enough you can just use any traditional method. Like a domain discretization method (Finite Difference, Finite Element, Boundary Element), or a pseudospectral method. Since solving this equation is not more difficult than ... 6 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 perturbations of the boundary conditions). For parabolic (or dissipative) equations, it makes sense to study the stationary limit (simply omit the term u_t in ... 5 On your first question: I assume that by "usual discretization matrix" you mean either the 3-point finite difference discretization in 1d, or what you get using linear finite elements. In either case, it's not actually the Crank-Nicolson scheme that determines this. It's true that for the two spatial discretizations mentioned above, the spatial error is O(h^... 5 As Jed says, limiters are not usually an efficient approach for parabolic/elliptic problems. WENO is much more expensive than simple piecewise-polynomial interpolation, so I would first try vanilla interpolation and see if you actually have oscillations. WENO is really designed for situations in which the solution is discontinuous; yours is not. In case ... 5 The sources you are looking at are all looking at hyperbolic problems. The issues are different for elliptic problems and "limiters" are generally not the preferred tool. I outlined some of the methods and tradeoffs in this answer. As for time integration, L-stability is the important property to prevent bad overshoots for parabolic systems. ... 5 I get u''=-n^2 u, and the condition holds with K=0. By the way, Kreiss' conclusion holds for any linear operator; no ellipticity must be assumed. 5 Parabolic PDE's such as those in the book can usually be solved using the Method of Lines. First you create some mesh for the x direciton. I will assume that you used some uniform spacing since the plots don't show any characteristics that show the need of non-uniformity. Next you recast your equations with only the time derviative on the left hand side ... 5 A nice reference for this is Chapter 10 of LeVeque's finite difference book. Of course, it only covers basic finite difference approaches, and there are plenty of others (all within the method of lines framework). The method of lines is indeed applicable in multiple dimensions, and two-dimensional problems are discussed in the reference just given. Most ... 5 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 is complete, this is just a rephrasing of his suggestions in, I hope, a more beginner friendly language. So, if you do accept an answer it should be his ;) Your ... 5 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$$\frac{\partial C}{\partial t} = \frac{1}{2}\frac{\partial^2}{\partial x^2}C^2.$$This equation is often referred to as the porous medium equation or the slow ... 4 Let$$A = \left(\begin{array}{ccccc} -2 & 1 \\ 1 & -2 & 1 \\ &&\ddots\\ &&1 & -2 & 1\\&&&1&-2\end{array}\right)$$be the standard Laplacian matrix. Your system can be written in traditional time-stepping form as$$u^{n+1} = \left(I + \frac{h}{(h')^2}A\right)u^n \doteq Mu^n,$$where$$u^n = \left(\begin{...

4

Your question may have multiple answers, depending on context. I will give a simple one, which completes and clarify the previous answer by Wolfang Bangerth, so I'm not claiming the bounty. Within a FEM approach you may in a first step discretize only the spatial domain: $$u^h(x,t) = \sum_i \eta_i(x) U_i(t)$$ so that \begin{...

4

As Hui pointed out above, to apply Neumann boundary conditions correctly you should utilize ghost points and extend your $n^{th}$ order discretisation stencil to your domain boundaries. Utilising forward/backward difference or extrapolation at the boundary will degrade your solution. Assuming a $2^{nd}$ order central difference scheme the Neuman boundary ...

4

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 PDE in question is non-dispersive, i.e. waves of any frequency and wavenumber will travel equally fast - at speed $a$. However, after discretisation, this is ...

3

Answer to question 1: If $A$ is a circulant matrix, then its eigenvectors are of the form $v_{j,w} = e^{ijhw}$; i.e., they are discrete Fourier modes. So Fourier analysis (or von Neumann analysis, as it's usually called) and eigenvalue analysis are equivalent if and only if you're dealing with a circulant matrix. Answer to question 2: The maximum ...

3

I don't know what exactly Thomee had in mind, but if you can't get solution at all for a discontinuous coefficient and a particular discretization scheme, you can smooth the coefficient on a lengthscale proportional to the mesh size $h$ and obtain a problem that's solvable. Then you make the smoothing distance go to zero as you refine the mesh and you obtain ...

3

Let's do the analysis by discretizing in space first, then in time (method of lines). First, we take some sequence of spatial discretizations $L^i, i=\{1,2,\dotsc\}$ approximating the continuous operator $L:u \to u_{xx}$. For the sequence of discretizations $L^i$ to be a convergent discretization, we need that the sequence be consistent and stable. Since the ...

3

It depends on how you define "projection" and what scheme you are using. But let's investigate the backward Euler method. There, you need to solve the following discrete problem in every time step: $$(v_h,U_h^n) + \Delta t (\nabla v_h, \nabla u_h^n) = (v_h, U_h^{n-1}).$$ The question is what to use in the first time step: Either $$(v_h,U_h^1) + \... 3 The Crank-Nicolson discretization of this equation will read$$ \frac{T^n-T^{n-1}}{\Delta t} = \frac 12 \left[ \partial_x \left((T^n)^{5/2} \partial_x T^n\right) + \partial_x \left((T^{n-1})^{5/2} \partial_x T^{n-1}\right) \right]  which is a nonlinear, time-independent, elliptic partial differential equation in $T^n$. The way to solve such ...

3

Yes, with Dirichlet boundary conditions you always have exponential convergence to the staedy state. Any PDE book will have a proof. For a nice explanation from a numerical perspective, see chapter 2 of LeVeque's FDM book.

3

You want to solve for 3 to 10 particle systems (3D per particle)? As far as I am aware, mean field theories do not work especially well for so few particles, but it seems there has been DFT work on diatomic molecules. Is this a system where Born-Oppenheimer is valid? If so, I might be inclined to expand the electronic wavefunction using a linear combination ...

3

Providing a whole detailed solution is out of the scope of this site, but asking for references is on-topic, so here is what I would suggest to get started: There are many good books on finite difference methods (for instance, "Finite Difference Methods for Ordinary and Partial Differential Equations: Steady-State and Time-Dependent Problems" by LeVeque, or ...

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