In physics, fluid dynamics is a subdiscipline of fluid mechanics that deals with fluid flow—the natural science of fluids (liquids and gases) in motion.
Questions tagged [fluid-dynamics]
146 questions
25
votes
2 answers
Why does my water explode?
I am trying to implement the Clavet method for simulating fluids in JavaScript, so debugging is a nightmare, which is why I'm asking here, hoping that someone who has gone through the same thing will tell me what I'm doing wrong.
I have it working…

Alex
- 846
- 6
- 16
12
votes
2 answers
more efficient wind tunnel simulation in Pygame, using numpy
I am an aerospace student working on a school project for our python programming course. The assignment is create a program only using Pygame and numpy. I decided to create a wind tunnel simulation that simulates the airflow over a two dimensional…

Sami
- 125
- 8
11
votes
3 answers
Fluid Simulation "Blows Up"
The following fluid simulation is a translation of a paper by Stam. Something truly terrible has happened. Each time the program is run with a low DIFF=0.01, the values start off small and then rapidly expand, or "blow up". I have checked the math…

qwr
- 9,525
- 5
- 58
- 102
11
votes
2 answers
How are fluid simulations integrated into Rigid Body phisix engines?
1) Is there any proof that simulations that mix Rigid Body phisix and fluids (say SPH) can provide modeling for real world?
2) How does a frame of such mix work?
Say we have a woden swing inside a box with 2 difrent liquids (oil and water) and a…

DuckQueen
- 772
- 10
- 62
- 134
10
votes
5 answers
Fluid dynamic simulation, with obstacles
I'm trying to write a fluid dynamic simulator on the HTML5 canvas. I've found some real damn cool stuff on the internets that always look like a promising starting point, but they are all cell-based and use some crazy math.
I'd like to be able to…

So8res
- 9,856
- 9
- 56
- 86
10
votes
2 answers
Fluid simulation boundaries and advect
This fluid simulation is based off of a paper by Stam. On page 7, he describes the basic idea behind advection:
Start with two grids: one that contains the density values from the previous time step and one
that will contain the new values. For…

qwr
- 9,525
- 5
- 58
- 102
8
votes
3 answers
iPhone fluid simulation
Somebody know fluid engine for iphone?I need water and gases simulation.

Sergey Zenchenko
- 854
- 1
- 12
- 31
7
votes
1 answer
Odd behavior in fluid simulation when converting from my working shadertoy to unity compute shaders
I am trying to replicate my working 2d fluid shadertoy in a compute shader in Unity, with the hopes of moving it to 3D soon. When I replicate the algorithm the same way, I get some very weird behavior (seen in this video I took). I have tried to…

Turmolt
- 113
- 9
7
votes
1 answer
Strange oscillating ripples in my shallow water implementation
I've been trying to implement the shallow water equations in Unity, but I've run in a weird bug. I get these strange oscillating ripples in my water. I made some screenshot:
And a video you can find here:…

The Oddler
- 6,314
- 7
- 51
- 94
5
votes
1 answer
Multiple communicators in MPI
The background of this question is in some computational areas such as Computational Fluid Dynamics (CFD). We often need finer mesh/grid in some critical regions while the background mesh can be coarser. For example the adaptive refine mesh to track…

Yongxin
- 173
- 2
- 9
5
votes
1 answer
Discrete fluid "filling" algorithm for a height map
I am looking for an algorithm that will describe the transient behaviour of a fluid as it spreads across the surface of a height map. My starting conditions at t=0 are:
A 2D matrix of height values (H) of size [x, y]
A 2D matrix of fluid height…

Generesque
- 53
- 3
5
votes
2 answers
What is the most efficient (yet sufficiently flexible) way to store multi-dimensional variable-length data?
I would like to know what the best practice for efficiently storing (and subsequently accessing) sets of multi-dimensional data arrays with variable length. The focus is on performance, but I also need to be able to handle changing the length of an…

Michael Schlottke-Lakemper
- 8,763
- 6
- 35
- 61
4
votes
2 answers
Modeling of a heated pipe in Modelica/Dymola
I'm currently studying chemical engineering and for my Bachelor thesis, I'm supposed to model a heated pipe that can be used in a superheater by connecting two pipes via a heatport together. Even though I made a big effort on understanding how I…

Pascal Messmer
- 41
- 1
3
votes
1 answer
How to reverse the SweptVolume block?
I'm trying to simulate a simple case. One sweptVolume is connected to another one. Flange.b to flange.b like that:
When the pressure in the OilChamber is rising, the volume expands, and the piston moves out. (So far, all good and logical).
The…

Aleksandr Kozlenok
- 31
- 2
3
votes
0 answers
Lift and Drag for simple 2D 'flight sim'
I am looking for a library or algorithm that would allow me to add simple 'flight sim' capabilities to rigid bodies in a 2D world.
I've made a game as an art project, where virtual fish swim in a tank of water. I started off using Box2D/liquidfun…

stanged
- 31
- 3