# Tag Info

### What programming language should I choose and why?

You should definitely check out Julia. Julia is a programming language which is similar to Python or MATLAB but utilizes a strong type-inference algorithm + JIT in order to optimize code. If types can ...
Accepted

### Without positive definiteness, does an iterative solver work?

No, positive definiteness (and symmetry) are only precondition to using the Conjugate Gradient method. But there are plenty of other iterative methods such as MinRes and GMRES that can be used for ...

### What programming language should I choose and why?

What is it you want to achieve? If you want to develop methods/algorithms you might prefer a language that is flexible, and that you are familiar with. As you stated in your question, the Fortran ...
• 519

### What programming language should I choose and why?

Start simple. Learn Python. I have been paid to write programms for over forty years and I have used all the languages mentioned in other answers (except Julia - I had never heard of it before now). ...
• 211

### What are the conceptual differences between the finite element and finite volume method?

The basic difference is simply the meaning to be attached to the results. FDM predicts point values of any aspect of the solution. Interpolation between these values is often left to the imagination ...
• 994
Accepted

### Why is the FVM traditionally used in CFD, and FEM in computational structures?

The finite element method is actually quite widely used in fluid flow problems, for example for the Stokes and Navier-Stokes equations. The delineation between the methods is more along the following ...

### Why FVM can handle unstructured meshes while FDM cannot?

The difference between finite volumes and finite differences is really more about the form of the equations solved. In typical FV methods, the conservative form is ...
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 ...
• 1,616

### What programming language should I choose and why?

I highly recommend to anyone, regardless of background, learning both low-level, "fast" language (C, Rust, C++, Go) high-level scripting language (Python, MATLAB, Mathematica, R, bash) As a general ...
• 171
Accepted

### Is mesh orthogonality important for FEM?

Yes. The constants that appear in the interpolation estimates upon which finite element error estimates are based contain minimum and maximum angles of triangles/tetrahedra (or similar geometric ...
Accepted

### Finite Volume Method flux integration

You can't. You need to approximate the integral via quadrature and or other approximations. See the following section in the document you cite.
Accepted

### CFL condition in Discontinuous Galerkin schemes

The restrictive CFL of DG schemes typically comes from the combination of high order accuracy and a compact stencil (see this reference for example). The CFL depends on bounding the variational form ...
• 3,032
Accepted

### Why is the continuous Galerkin Finite Element Method a poor choice for the inverse problem for the Navier-Lame equation?

The issue with finite elements in the current context is not that you have a first order differential equation, but with the kind of first order equation you have. In general, finite element methods ...

### How to compute turbulent energy cascade

Of course, the Fourier transform is a linear operator. So, you have the kinetic energy defined as: $E(\mathbf{r}) = \frac{1}{2} \mathbf{u}(\mathbf{r}) \cdot \mathbf{u}(\mathbf{r})$. The Fourier ...

### What programming language should I choose and why?

You have some great answers already. I think there is no single answer to your question. What language(s) you choose to learn depends on what you intend to do. When I was a graduate student I too ...
• 161
Accepted

### Estimating the local compression/expansion ratio for a transformation on a point cloud

If you wish to know only the change in density you are interested in the dilatation or volumetric strain of the stress tensor associated with the transformation. If you also wish to know about the ...
• 4,551

### 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 ...
• 3,032
Accepted

### Spectral methods, Spectral Volume methods, Spectral Difference methods

"Spectral methods" usually means methods which make use of global basis functions. Fourier spectral methods use sine and cosine, and are used when you have periodic boundary conditions. Chebyshev ...
• 2,993
Accepted

### How to correctly define the flux in a finite volume method for Poisson's equation with a piecewise constant material

Taking the average will certainly work, but is recommended to take the harmonic mean to account for the changing conductivity: $k = \Big( \frac{1-f}{k_i} + \frac{f}{k_{i+1}} \Big)^{-1}$ If you ...
• 128

### Finite Difference and Finite Volume as special cases of Finite Element

A good example is if you use bilinear finite elements for the Laplace equation on a uniform mesh, and then approximate the integrals using the trapezoidal rule, then you get the usual 3-point stencil (...
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 ...

### What programming language should I choose and why?

Given what you've said, I would learn C++. For one, it allows you to use MPI and lots of libraries for FEM, such as Deal.ii (which all members of this forum are obligated to mention as per our ...
• 2,017
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 ...
• 354

### What does "strongly conservative" mean in the context of numerical methods?

Strong conservative in 1D usually means that the change in the solution is equal to the flux in minus flux out. For example, for Burgers' equation without source term, you can rewrite it as \$u_{,t} +...
• 3,032

### Add User-defined/custom differential equations in OpenFoam (CFD)

The whole point of the OpenFOAM (OF hereinafter) libraries is exactly what you are inquiring for: PDE mimicking programming for CFD using the FV framework. In order to do what you are asking, you ...
• 261

### The meaning of conservative discretization in Galerkin FEM and Discontinuous Galerkin

No. The statement means that the finite element method, without modifications, will lead to numerical solutions for conservation laws that violate many of the physically reasonable constraints (e.g., ...

### 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 (...
Accepted

### Initial Condition in a Numerical Problem

That depends on the equation you have, and on the situation you want to model. Imagine, for example, that you are considering the advection equation $$\partial_t u + c \partial_x u = 0,$$ i.e., ...

### Finite volume software packages

Have a look at Pyclaw. This library has been around for quite a while and is fairly robust. It offers: Implementations of several Godunov-type methods and Riemann solvers in 1/2/3D. Adaptive mesh ...
• 2,136