20 votes

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 ...
user avatar
12 votes
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 ...
user avatar
11 votes

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 ...
user avatar
  • 519
11 votes

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). ...
user avatar
9 votes
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 ...
user avatar
8 votes

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 ...
user avatar
8 votes

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 ...
user avatar
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 ...
user avatar
  • 1,606
7 votes

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 ...
user avatar
  • 171
7 votes
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 ...
user avatar
6 votes

Is there a bound on the number of edges, facets, and elements in a 3D simplicial mesh in terms of the number of mesh nodes?

The complexity of simplicial tessellations in $\mathbb{R}^{d}$, for $d>2$ is, unfortunately, not linear. In general, a simplicial tessellation $\mathcal{T}(X)$ for $n$ vertices $X\subset\mathbb{R}^...
user avatar
6 votes
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.
user avatar
6 votes
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 ...
user avatar
  • 2,961
6 votes
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 ...
user avatar
6 votes

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 ...
user avatar
6 votes

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 ...
user avatar
  • 161
5 votes
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 ...
user avatar
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 ...
user avatar
  • 2,961
5 votes
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 ...
user avatar
  • 2,983
5 votes
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 ...
user avatar
  • 128
5 votes

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 (...
user avatar
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 ...
user avatar
5 votes

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 ...
user avatar
  • 1,902
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 ...
user avatar
  • 326
4 votes

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., ...
user avatar
4 votes

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} +...
user avatar
  • 2,961
4 votes

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 ...
user avatar
  • 261
4 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 (...
user avatar
4 votes
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., ...
user avatar
4 votes

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 ...
user avatar
  • 2,106

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