Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [fluid-dynamics]

The study of the properties of fluids and gases in motion

22
votes
2answers
3k views

A good finite difference for the continuity equation

What would be a good finite difference discretization for the following equation: $\frac{\partial \rho}{\partial t} + \nabla \cdot \left(\rho u\right)=0$? We can take the 1D case: $\frac{\partial \...
29
votes
3answers
1k views

Why is local conservation important when solving PDEs?

Engineers often insist on using locally conservative methods such as finite volume, conservative finite difference, or discontinuous Galerkin methods for solving PDEs. What can go wrong when using a ...
6
votes
1answer
2k views

computing turbulent energy spectrum from isotropic turbulence flow field in a box

I have my 3 dimensional velocity flow-field u, v and w at a given instant of time from DNS using pseudo-spectral method. I need to calculate the energy spectrum ( in Fourier space ) as a function of ...
4
votes
1answer
2k views

Comparison of Lattice Boltzmann Method vs Traditional Navier-Stokes based Methods

I have a choice of two options, analysing and implementing Lattice Boltzmann methods or traditional Navier Stokes based methods. I'm a CFD newbie and I have a rough idea (though not rigorous enough to ...
7
votes
3answers
468 views

C - OpenMP, MPI, Serial Program

I'm part of a Computational Science course and come from a non-programming background, so please forgive me my ignorance. I'm working on a set of code in C to numerically solve the Navier Stokes ...
6
votes
3answers
4k views

How to find QR decomposition of a rectangular matrix in overdetermined linear system solution?

While trying to find cell-centered gradients in finite volume method computation of incompressible fluid flow I get over-determined linear system. This is a well known "cell based least-square" ...
3
votes
1answer
280 views

Finite Elements Weak Formulation generalization

I am struggling with an equation that represents the Weak form of Galerkin method: $ \phi^{T}F(\textbf{u})\sim \int_{\Omega}^{ } \phi.f_{0}(\mathit{u},\nabla \mathit{u}) + \nabla\phi:f_{1}(\mathit{u},...
2
votes
2answers
335 views

In practice, what are the most useful ways to visualize 2d fluid flow, to tell what is happening in the simulation? Esp for verification and debugging

My simulation creates a 2d grid of vectors and scalars (EDIT of velocity, depth etc), at 60 frames per second. Is it correct? It looks sort of right... but who knows? How can I tell what's happening - ...
17
votes
2answers
3k views

Discontinuous Galerkin: Nodal vs Modal advantages and disadvantages

There are two general approaches to representing solutions in the discontinuous galerkin method: nodal and modal. Modal: Solutions are represented by sums of modal coefficients multiplied by a set of ...
15
votes
2answers
1k views

(how to) write simulations that run faster?

I have started using python as the programming language for doing all my assignments in CFD. I have a very little experience in programming. I am from mechanical engineering background and am pursuing ...
17
votes
2answers
3k views

Disadvantages of common discretization schemes for CFD simulations

The other day, my computational fluid dynamics instructor was absent and he sent in his PhD candidate to substitute for him. In the lecture he gave, he seemed to indicate several disadvantages ...
16
votes
5answers
2k views

Is there a good, easy-to-use, high quality open source CFD solver out there?

My thesis is on developing numerical methods for model reduction in combustion. I run my methods purely on the chemistry part of combustion simulations, and I have plenty of case studies for 0-D ...
3
votes
4answers
9k views

Estimating the Courant number for the Navier-Stokes Equations under differing Reynolds number regimes

I am familiar with the Courant-Friedrich-Lewy Condition in as far as it applies to the stability of explicit finite difference schemes for standard parabolic and hyperbolic PDEs. However, when ...
8
votes
2answers
4k views

simple MHD simulation code for (self) education and play with

I would like some super simple computational code for solving magnetohydrodynamics problems. High accuracy nor performance is not my concern. I wan't it just to visually explore qualitative behavior ...
7
votes
2answers
282 views

Stabilization of convection-dominated flow and turbulence modeling

Are stabilization techniques for convection-dominated flows like SUPG+PSPG, interior penalty methods, etc. able to handle turbulent flows without tubulence model being employed, at least up to some ...
12
votes
1answer
394 views

What spatial discretizations work for incompressible flow with anisotropic boundary meshes?

High Reynolds number flows produce very thin boundary layers. If wall resolution is used in Large Eddy Simulation, the aspect ratio may be on the order of $10^6$. Many methods become unstable in this ...
11
votes
3answers
897 views

Can compressible flow solvers be used to solve incompressible flow?

I know that incompressible and compressible flow solvers are specifically designed to solve different types of problems with different fluid properties/flow conditions. Clearly, among the advantages ...
6
votes
3answers
1k views

Is lattice Boltzmann suitable for simulation of incompressible Stokes flow?

We have a flow that is dominated by adhesion forces from the substrate and surface tension from the free surface. The material is nearly solid and at rest first, and gets a bit less solid by heating. ...
5
votes
3answers
2k views

Flow past a cylinder - Projection Method - Boundary Conditions

I plan to write a code that solves the flow past a cylinder and try to see the Von-Karman vortex street. I will solve the 2-D viscous, incompressible Navier-Stokes using the projection method. The ...
3
votes
2answers
1k views

GPU-enabled Lattice Boltzmann solvers?

Is anybody aware of any GPU-enabled Lattice Boltzmann solvers (preferably on C++/OpenCL and open-source) that would be recommended? I have found Advanced Simulation Library, but it seems to be very ...
2
votes
4answers
1k views

Why are upwind schemes stable in convection flow calculation?

It is well known that upwind schemes are stable when calculating convection flows with $|\text{Pe}|>2$, $\text{Pe}$ is the Peclet number. Why is that, and why is central difference unstable? Is ...
6
votes
1answer
609 views

ENO/WENO component-wise vs characteristic-wise

Can someone give some references to understand what's the differences between a component-wise and a characteristic-wise ENO scheme? If I'm right, the characteristic variables come from the ...
4
votes
2answers
178 views

Preconditioner for the GMRES method in the Uzawa algorithm

I'm trying to solve \begin{equation}\left\{ \begin{split} \frac{\partial u}{\partial t}+(u\cdot\nabla)u-\nu\Delta u+\frac1\rho\nabla p&=f\;\;\;\text{in }\Lambda\\ u&=0\;\;\;\text{on }\partial\...
4
votes
1answer
916 views

Effecient CFD programming techniques

I'm trying to make highly efficient CFD programming complex for solving combustion problems. I've finished writing core which realises mathematical model, and now I'm concerned about code performance. ...
3
votes
0answers
287 views

Euler Equation Eigensystem with Gravity in the Energy Flux

I am modifying a conservative form of the Euler equations with gravity in the energy flux (see previous question: Energy Conservation in Conservation Laws with Source Terms) for use in a Riemann ...
7
votes
1answer
169 views

A simple PDE solution question

I need to ask a question about partial derivatives. I want to solve this equation (steady state, one dimensional continuity equation): $$\frac{\partial (\rho u)}{\partial z}=0$$ which is equivalent to:...
7
votes
1answer
344 views

Potential flow around a non-symmetric obstacle using stream functions

I've seen that there is a way to use the finite differences method, on a cartesian orthogonal grid, to perform calculations on potential flow about an obstacle without using the Neumann conditions, ...
4
votes
1answer
2k views

Stability of numerical method for 1D Burger's equation

I am trying to solve 1D viscous Burger's equation numerically and I cannot apply von Neumann analysis because the equation is non-linear. How do I predict the stability criteria for my system? I also ...
4
votes
1answer
150 views

Numerical computation of the velocity in the steady Navier-Stokes equation

I've asked this question on Math.SE too. Let $d\in\left\{1,\ldots,4\right\}$ $\Lambda\subseteq\mathbb R^d$ be bounded, nonempty and open and $\partial\Lambda$ be Lipschitz $V:=\left\{u\in H_0^1(\...
3
votes
1answer
623 views

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

I am new to OpenFoam. And I am trying to add a set (user defined) of differential equations to OpenFoam. I want to solve this user defined set of equations at each time point in addition to standard ...
3
votes
3answers
690 views

Solving Stokes flow with walls using Oseen tensor

Introduction I've developed a code to solve for generalised, incompressible 2D Stokes flow $\eta \nabla^2 \mathbf{v} - \nabla p + \mathbf{S} = 0$ $\nabla . \mathbf{v} = 0$ where $\mathbf{S}$ can ...
3
votes
2answers
357 views

Energy Conservation in Conservation Laws with Source Terms

I'm wondering if anyone can help me understand energy conservation when using conservation law methods (i.e. Riemann solver, High-Resolution Wave-Propagation Methods) with the addition of source terms:...
2
votes
2answers
300 views

2d Euler manufactured solutions

Where can I find manufactured solutions for the 2d Euler equations, with the complete analytical terms, including the Jacobian of the source term ?
1
vote
0answers
55 views

Vortex Lattice Method: better basis than horse-shoe vortex?

I read several introductory texts about potential flow and vortex lattice method. Basically, it is fitting of some velocity field described by conditions on velocity at some control points using basis ...
1
vote
0answers
73 views

PDE discretization (via finite difference sheme) question

So after posting this question and reading all your comments I would like to make this new question (update). If you consider the three equations presented here: $$\frac{\partial \rho}{\partial t} +\...
0
votes
1answer
226 views

boundary conditions of linear advection problem

I am solving the 1D advection problem given by: $$\frac{\partial u}{\partial t}=-c\frac{\partial u}{\partial x}$$ where c is the wave speed, and u is the unknown field variable, and x and t are time ...