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

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 ...
23
votes
4answers
1k views

When is a high order method useful for computational fluid dynamics simulations?

Many numerical approaches to CFD can be extended to arbitrarily high order (for instance, discontinuous Galerkin methods, WENO methods, spectral differencing, etc.). How should I choose an ...
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 \...
18
votes
4answers
544 views

Which methods can ensure that physical quantities remain positive throughout a PDE simulation?

Physical quantities like pressure, density, energy, temperature, and concentration should always be positive, but numerical methods sometimes compute negative values during the solution process. This ...
17
votes
6answers
14k views

How to get started with OpenFOAM for CFD

I'm looking at using OpenFOAM for solving basic internal flows in CFD. What is the best way to get started, and could anyone please point me to a good online reference to go to with any questions I ...
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 ...
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 ...
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 ...
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 ...
13
votes
1answer
352 views

CFD: Does order of time stepping scheme affect steady state solution? If yes why?

I am trying to solve Ideal MHD equation using semi discrete methods, ENO spatial reconstructions and TVD RK time stepping. I am getting different steady state solutions with different temporal order. ...
12
votes
1answer
3k views

Pressure as a Lagrange Multiplier

In the incompressible Navier-Stokes equations, \begin{align*} \rho\left(\mathbf{u}_t + (\mathbf{u} \cdot \nabla)\mathbf{u}\right) &= - \nabla p + \mu\Delta\mathbf{u} + \mathbf{f}\\ \nabla\cdot\...
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 ...
12
votes
3answers
2k views

finite volume method: unstructured mesh vs octree adaptation + cell cutting

I'm working with the OpenFOAM C++ Computational Continuum Mechanics library (it can deal with fluid-solid interaction, MHD flows...) which uses arbitrary unstructured meshes. This was driven by the ...
12
votes
2answers
840 views

What are some good data-types for unstructured cell-centered FVM CFD code?

I'm interested in an advice for efficient data structures for cell browsing in unstructured cell-based finite volume CFD. One example that I encountered (in dolfyn cfd code) goes like this (I'll show ...
12
votes
1answer
2k views

Dirichlet-Neumann boundary condition solution becomes unstable - Pressure Correction Method

I am simulating incompressible flow over a cylinder at Reynold number of 500. I am solving navier stokes equation using pressure correction method. My solution becomes unstable after certain time (...
11
votes
4answers
310 views

How to create a random 3D domain representing a plant's root structure?

I would like to model laminar flow of water from roots to the stem of a plant. At the very end of the roots, the tubes vary from millimeter to centimeter scale in diameter and length. As we get closer ...
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 ...
11
votes
2answers
333 views

Do black-box preconditioners for matrix-free methods exist?

Jacobian-Free Newton-Krylov (JFNK) methods, and Krylov methods in general, can be very useful because they don't require explicit storage or construction of a matrix, only the results of matrix-vector ...
10
votes
5answers
5k views

Definition of incompressible flow

As all knows incompressible flow doesn't exist in reality, its an assumption introduced to simplify governing equations. We can not apply this assumption straightforward. Generally Mach number(M<0....
10
votes
2answers
2k views

Euler equations in 2d

As an assignment in college, I did a 1d simulation. The problem statement was to solve 1d shock tube problem involving compressible ideal gas as working fluid. For this problem, I solved system of ...
10
votes
1answer
245 views

Why do we have to rerun the CFD solver for higher Reynolds number?

I started to learn OpenFOAM from the Cavity tutorial which is provided at the web-site. When experimenting with different Reynolds numbers, in section "2.1.8.2 Running the code", tutorial says to ...
10
votes
1answer
375 views

CFL condition in Discontinuous Galerkin schemes

I have implemented an ADER-Discontinuous Galerkin scheme for the resolution of linear systems of conservation laws of the type of $\partial_t U + A \partial_x U + B \partial_y U=0 $ and observed that ...
10
votes
1answer
1k views

Optimal transport warping implementation in Matlab

I am implementing the paper "Optimal Mass Transport for Registration and Warping", my goal being to put it online as I just cannot find any eulerian mass transportation code online and this would be ...
10
votes
2answers
331 views

Connections between Differential Forms and the second order Finite Volume Method

Reading today about the theory of differential forms, I was left impressed how much it reminded me of second order Finite Volume Method (FVM). I'm struggling to figure out is thinking this way just ...
10
votes
1answer
981 views

Boundary conditions in fluid simulation

I'm working on a 2D fluid sim using vortex particles/"vortons" as described in Fluid Simulation for Video Games. Which I think is the same things as the "discrete vortex method". Basically you ...
9
votes
5answers
3k views

What is the simplest method for solving incompressible Navier-Stokes equations?

By "the simplest" I mean the simplest to learn and implement from scratch. I hope my question can more or less be answered.
9
votes
4answers
2k views

Fourier pseudo-spectral method and numerical dissipation

Performing a direct numerical simulation of isotropic turbulence with Fourier pseudo-spectral method (Orzag & Patterson, PRL, 1972) using FFT. For a background of the method, which is widely used ...
9
votes
1answer
233 views

Hybrid spatial schemes for CFD: any downside to blending versus switching?

Aside from extra computational cost due to having to compute both fluxes over a certain region, is there any downside to blend two flux evaluations for a hybrid scheme in a finite volume method? The ...
9
votes
1answer
1k views

What is the most accurate interpolation method for a 3D-flowfield on a structured grid?

I solve multi-species, compressible Navier-Stokes equations on a 3D structured grid. I have obtained a solution on a given grid (let's say a relatively coarse one). I want now to refine my grid and ...
8
votes
4answers
2k views

Is CFD used in animations / movies / art?

This is not a technical question, and is asked just out of curiosity. Are computational fluid dynamics (CFD) simulations used in animation movies? (something like shallow water equations, explosion ...
8
votes
2answers
7k views

Use of machine learning in computational fluid dynamics

Background: I have only built one working numeric solution to 2d Navier-Stokes, for a course. It was a solution for lid-driven cavity flow. The course, however, discussed a number of schemas for ...
8
votes
2answers
3k views

Mesh Independence Study: Is the Independent Mesh Really the Best One?

I am running a mesh independence study. I start with Mesh 1 and proceed up to Mesh 4, each time doubling the number cells in the mesh. In parallel, I am comparing my computational results to ...
8
votes
3answers
1k views

What are the differences between CFD simulations and realistic ocean/atmosphere model simulations?

The field of computational fluid dynamics (CFD) is dedicated to solving the Navier-Stokes equations (or some simplification of them). A subset of CFD, ocean and atmospheric models numerically solve ...
8
votes
3answers
8k views

Importance of the Time Step Value for the Accuracy of a Transient CFD Simulation

Overview My understanding is that one should use a time step $\Delta t < \frac{h}{v}$ (where h - smallest mesh element, v - velocity) to get an accurate result. But how important is this really ...
8
votes
2answers
1k views

Taxonomy of ILU preconditioners

I learned that for BiCGStab solver for sparse linear systems it's pretty much always necessary to use a preconditioner. I realized by now that choosing a good one is problem dependent. Surfing the ...
8
votes
4answers
387 views

Are there any general fluid dynamics frameworks?

Are there any frameworks that could be classified as "general computational fluid dynamics framework"? What I'm thinking of is a framework that's modular and extensible in order to allow the ...
8
votes
3answers
229 views

How to estimate the impact of small scale on large scale in fluid dynamics?

Assuming that a direct numerical simulation is performed, what is a good method for estimate the impact of small scale on large scale in fluid dynamics ? For example is it pertinent to compare two run ...
8
votes
2answers
4k views

structured grid and unstructured grid

I am new to the field of CFD. When should one go for structured grid and when should one go for unstructured? (Yes, it depends a lot on the geometry of the problem) More specifically, I want to know ...
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 ...
8
votes
1answer
524 views

Higher order Lax-Wendroff type scheme?

Suppose we want to solve a hyperbolic conservation law $u_t+f(u)_x=0$. I really like to use Lax-Wendroff, which reads $u_j^{n+1} = u_j^n -\frac{\Delta t}{\Delta x}(g(u_{j+1}^n,u_j^n)-g(u_j^n,u_{j-1}^...
8
votes
1answer
1k views

Finite difference coordinate transformation for spherical polar coordinates

I have part of a problem that is described by the momentum conservation equation: $\frac{\partial \rho}{\partial t} + \frac{1}{\sin\theta} \frac{\partial}{\partial \theta}(\rho u \sin \theta) =0$ ...
8
votes
1answer
495 views

Finite difference scheme for compressible nonisothermal flow in porous media

My challenge is to solve the following system of equations, which describe gas combustion in porous media: 1) Continuity $\varepsilon \frac{\partial \rho_g}{\partial t} +\frac{\partial}{\partial x} \...
8
votes
1answer
498 views

Time discretization of the variational formulation of the Navier-Stokes equation

I've asked this question on mathoverflow too. Let $T>0$ $I:=(0,T]$ $d\in\mathbb N$ $\Lambda\subseteq\mathbb R^d$ be nonempty and open, $$\mathcal V:=\left\{\phi\in C_c^\infty(\Lambda,\mathbb R^d):...
8
votes
0answers
402 views

Simple turbulence model appropriate for buoyancy-driven cavity like problem

Which turbulence model is suitable for resolving incompressible buoyancy-driven flow of a fluid within an cylindrical ampoule? I prefer turbulence model which is sufficiently simple so that fully ...
7
votes
4answers
191 views

In Matlab, how can I be consistent with units?

I am modeling some aerodynamics equations and am using meters / centimeters, kilograms, and seconds. I've heard that, "matlab doesn't know units". So, how can I make sure that it does? Just ...
7
votes
3answers
4k views

Tutorial for flow around a cylinder in FEniCS

I am continuing my dive into computational fluid dynamics. I would like to build a simple test case for modelling the flow around a cylinder in FEniCS and then continue to model turbulence in order 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 ...
7
votes
5answers
2k views

Open source codes for 2D instationary Navier Stokes equations

What open source tool can be recommended for solving 2D instationary Navier Stokes equations (in simple geometries, but with high Reynolds numbers)? Most packages I found, I'm not very lucky with. ...
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
339 views

Numerical solution of hyperbolic PDEs with nonconvex flux

In some hyperbolic PDEs the flux is nonconvex. One example is equations in magnetohydrodynamics. What are the complications in the wave structures of such problems? What general precautions one should ...