Questions tagged [fluid-dynamics]

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.

121 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
  • 789
  • 5
  • 13
11
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
  • 115
  • 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
  • 6,786
  • 3
  • 42
  • 72
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
  • 8,944
  • 8
  • 46
  • 82
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
  • 6,786
  • 3
  • 42
  • 72
10
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
  • 48
  • 6
  • 46
  • 109
8
votes
3 answers

iPhone fluid simulation

Somebody know fluid engine for iphone?I need water and gases simulation.
Sergey Zenchenko
  • 844
  • 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
  • 93
  • 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
  • 5,718
  • 2
  • 40
  • 86
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…
4
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
  • 141
  • 1
  • 7
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
  • 2
3
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…
3
votes
1 answer

How can I assign values to a surface in matlab?

I am trying to build a 3D CFD pipe flow model using MATLAB, and I am hoping to assign values (boundary conditions) on the pipe wall. I've tried building a pipe using the cylinder function: [X Y Z] = cylinder but this generates me several points on…
1
2 3
8 9