Coriolis
• Member for 5 years, 8 months
• Last seen more than 3 years ago

You solve the 1D-advection equation with $c$ a constant velocity: $$\frac{\partial u}{\partial t} + c\frac{\partial u}{\partial x}=0~~~~~~~~(1)$$ When you discretize this equation (with an explicit ...

The integral function in MATLAB performs numerical integration. See the MATLAB help, it's straightforward to use. Actually, an analytical solution of your integral exists. The calculations are a bit ...

In short, you can recognize a conservative formulation if a divergence operator is involved in the equation. For instance, the mass conservation equation is naturally written in conservative form : $$... View answer 3 votes I don't remember exactly the formulation in finite-element but I believe you need to compute the determinant of the jacobian when you define the transformation between some element and the reference ... View answer Accepted answer 2 votes According to the way you defined your stencil in your picture, I think you made a mistake in your formula, that should be :$$ v_{i+1,j}=(0.1)v_{i,j-1}+(0.8)v_{i,j}+(0.1)v_{i+1,j}  You have switched ...

The numerical diffusion is not related to an equation specifically but is related to the way you discretize this equation. Depending on the discretization stencil you choose (upwind, downwind, ...

If your data are regularly spaced, you do not need an interpolation procedure, you can directly plot a contour through a contour or a pcolor command. That why I don't understand why you need to ...

I believe you cannot apply two boundary conditions at the same point. You need to choose between T2 and T3 for the top-left point for instance. The average might be acceptable but I'm not sure of the ...

As said above, the VTK legacy format is simple and straightforward and you should be able to write a subroutine to create the output file. However in your case, you are dealing with billions of nodes,...

If you want your PC to perform numerical simulations, the processor is clearly the first component you should paid attention to. For this kind of application, Intel i7 and Intel Xeon are often used in ...

When you run your program with the parameters you specified, you don't get the error, but the solution at time $t=10$. To compute an error, you need to compare the numerical solution to the ...

At line 473 of the source code you provided : contrl - is the actual driver of the package. This routine contains the strategy for nonlinear equation solving. This code is written in Fortran 77 so ...

This is more of a Stack Exchange or Programmer Exchange question, see : here for C language or PHP, Javascript or C++, and more generally. Try to avoid global variables. It's better for maintaining ...

In the same way you would do to implement a comparison with zero. For instance, in numerical solvers, one sometimes needs to check whether a value reaches zero. That is not feasible in a formal way ...

First, your time step dt is a matrix. That is not possible. Just below your calculate the number of required time step to reach tMax. You do not know that. You do not know how many time step you will ...

If the exact solution is unknown, then yes you have to take the smaller grid as reference. Then you run your simulation with different mesh size, each one varying by a factor 2 and you compute the ...

In (very) short : Because basically a computer is composed of multiple electronic devices that consistently switch between two states (see transistors). For a human, this can be idealized by a state 0 ...

Each method has its pros and cons. LBM ans NS solvers are both efficient and reliable. The no-slip condition may be important for physical meanings, otherwise it may be enough for you to solve Euler'...

What you mention is called hybrid parallelism. A cluster is composed of several nodes. A node is a group of sockets that share the same physical memory and a socket is a group of cores that we refer ...

From a strict programming point of view, a complex number is composed of a real part and an imaginary part, that is to say, two real values. So I guess that real arithmetic applies here, except for ...