12
votes
Accepted
Motivation behind Collocation Method
I would not insist on demanding a geometrical meaning from Galerkin methods in general. There is a connection, but it becomes less meaningful as you extend it further and further. (In a sense, it ...
7
votes
Accepted
Don't we care about the numerical diffusion in the diffusion term?
We have the following problem:
$$\frac{\partial u}{\partial t}+v\color{red}{\frac{\partial u}{\partial x}}-\nu\color{blue}{\frac{\partial^2u}{\partial x^2}}=0 \tag{*}$$
The function $u$ may represent ...
7
votes
Accepted
How do I integrate a function defined over an arbitrary area?
Instead of directly integrating over the area, it is often more convenient
to use the
divergence theorem to replace the area integral with an integral over the
boundary edges.
The divergence theorem ...
7
votes
Why do we have to resort to Higher order schemes for solving the 1-D advection equation/ continuity equation?
There is a difference between the requirements for a hyperbolic pde like
$$
u_t + a u_x = 0
$$
and for a purely parabolic pde like
$$
u_t = u_{xx}
$$
Suppose the solutions are smooth and you ...
6
votes
What is numerical damping in the context of time-dependent FEM solvers?
It is quite straightforward to demonstrate this for implicit Euler (aka backward Euler) on a scalar example. Consider the initial value problem
$$\dot{y}(t) = i \alpha y(t), \ y(0) = 1$$
with solution
...
6
votes
How to separate text from the paper on a black and white page?
I believe the best approach here is to use a threshold based on the local average brightness of the image. Setting the threshold to be 90% of the mean value of the 11x11 grid surrounding each pixel ...
5
votes
Accepted
Finite difference recursion and higher order
Short answer: yes (in exact arithmetic).
You'll have to use the centered difference formula evaluated at $x \pm \frac{1}{2}\delta x$, like this:
$$
u_x = \frac{u(x + \frac{1}{2}\delta x) - u(x - \...
5
votes
what is the difference between non-conformal and conformal?
The concept of $p$-nonconforming meshes can also apply to continuous FEM, not just DG. For continuous FEM, continuity is enforced by enforcing a single set of degrees of freedom on a face shared ...
5
votes
Are FEM or DGFEM methods based on integrals or PDEs?
Basically, you have the following set of derivations:
Strong form of the PDE -> Finite differences
Integral form of the PDE -> Finite volumes
Weak (variational) form of the PDE -> Galerkin methods (...
5
votes
Accepted
Building minimization optimization problem for 2nd-order elliptic PDE
For the particular equation you are solving (called the minimal surface equation), the functional you are trying to minimize is
$$
J(u) = \int_\Omega \sqrt{1 + |\nabla u|^2} \; dx.
$$
You can find ...
5
votes
Accepted
Residual norm of PDE discretization: correspondence in the continuous problem?
TLDR
If you're using scalar products in FEM/FVM discretizations, use the mass-matrix scalar product, not $\ell_2.$
or
If you're solving FEM/FVM systems with Krylov methods, precondition with the ...
5
votes
Accepted
Discretization with non-constant matrix containg entries form unknown vector
You can't. Nonlinear systems of equations are in general not solvable exactly. What you need to do is to use a method to solve nonlinear systems, of which there are of course quite a lot:
A simple ...
5
votes
Accepted
Projection method FVM poisson part, adding source term
The smooth solution turned out to have BC's applied in the following way:
Walls and inlet: $\frac{\partial p}{\partial n}=0$
Outlet: $p=0$
Actually thought that we need only one value of P to pin, not ...
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. ...
4
votes
Finite difference discretization on a circle
The expressions you are using for eigenvalues and eigenfunctions are wrong (as per Wolfgang Bangerth's comment); therefore the results you are getting are not meaningful at all.
There are analytic ...
4
votes
Accepted
Why have specialised upwind schemes been developed to solve hyperbolic equations?
To elaborate on Wolfgang's answer: since hyperbolic PDE semi-discretizations with centered differences have purely imaginary eigenvalues, they are only neutrally stable. For linear problems (e.g., ...
4
votes
Why have specialised upwind schemes been developed to solve hyperbolic equations?
Central differencing schemes are not stable if you have advection dominated problems. There really was no other trivial [1] alternative to developing upwind schemes.
[1] There are a few other ...
4
votes
Is there Von Neumann stability analysis for 9-point laplacian like we have for the 5-point Laplacian?
There are actually a few different 9 point stencils in use, but they can all be written as a linear combination of the standard and skewed 5 point stencils. Performing the usual von Neumann analysis ...
4
votes
Accepted
Flux sign and face normal confusion in finite volume method
When dealing with conservation laws like your case, you can often make use of the divergence theorem (as you did). You can then express the fact that the total mass within your integration region is ...
4
votes
Accepted
Dividing a continuous domain into small squares; how to perform storage and querying?
After doing some quick research, I am convinced that the interviewer was looking for an answer related to one of the data trees. Depending on the application, one might be better than the others, but ...
4
votes
Accepted
Can I use Q0 finite elements when there are gradients involved?
Depends on the details.
If you think about the traditional $H^1$ conforming formulation with the bilinear form $(\nabla \phi, \nabla v)$ it obviously cannot work because the stiffness matrix would be ...
3
votes
Accepted
Stability in discretization of a PDE
Analogous equations are considered in different applications e.g. stationary advection equation with right hand side. Looking to your equation through this view, you should try one-sided finite ...
3
votes
Accepted
PDE - Conservative form, conservative methods and discrete conservation
I know this topic well for some class of PDEs, so I try to give you a general answer with one example from applications I am familiar with.
1.) Conservative form of PDE - this notion is used when ...
3
votes
Accepted
upwind schemes for solving inviscid euler equations
Do I definitely need to know the eigenvectors/eigenvalues of the system if I need to use an upwind scheme for such flow?
No, it is certainly not necessary to use the full eigenstructure of the system,...
3
votes
Combining trapezoidal rule with upwind scheme
I would recommend to try a second order accurate upwind scheme. There are many of them. Let me show two of them, I use them for solving nonstationary advection equation when the solution is ...
3
votes
Three steps of pde numerical solution and nonlinear equation
Linearization and discretization can be switched. The linearization then happens in function space, where a Newton method can be employed based on the Fréchet derivative of the differential operator.
...
3
votes
Accepted
Discontinuous Galerkin FEM : Control points are mid-points of edges instead of nodes
For the discontinuous Galerkin method, the choice of control points is entirely unimportant because they conceptually lie in the interior of the cell (even if they are physically on the boundary of ...
3
votes
Accepted
Problems with deriving an equation for a finite-difference scheme given in the journal paper
Initially, the equation (6) is derived from equation (4):
$$
F_e\Phi_e-F_w\Phi_w=D_e(\Phi_E-\Phi_P)-D_w(\Phi_P-\Phi_W)
$$
under the central differencing approximation $\Phi_e=(\Phi_P+\Phi_E)/2$, $\...
3
votes
Discretization Error amplification instead of stagnation to machine precision
Yes. This behavior is to be expected and normal. When you are computing with a small value for $\mathrm dx$ then, to compute the difference quotient, you are subtracting two numbers that are nearly ...
3
votes
Accepted
Discretisation of logarithmic derivative: Deriving the formula
This should be coming from a chain rule (assuming $M$ is a function of $t$, $t_A<t_B$):
$$
f(t)=\frac{d \log\big(M(t)\big)}{d \log t} = \frac{d\log\big(M(t)\big)}{dt}t=\frac{dM(t)}{dt}\frac{t}{M(t)...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
discretization × 175finite-difference × 48
pde × 46
finite-volume × 39
numerics × 34
finite-element × 23
fluid-dynamics × 18
boundary-conditions × 15
numerical-modelling × 11
poisson × 10
hyperbolic-pde × 9
python × 8
nonlinear-equations × 8
stability × 8
time-integration × 8
navier-stokes × 8
computational-physics × 7
matlab × 6
computational-geometry × 6
error-estimation × 6
fourier-analysis × 6
elliptic-pde × 6
linear-algebra × 5
ode × 5
advection-diffusion × 5