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.

146 questions
1
vote
1 answer

What is causing this 2D fluid simulation to hang?

I attempted to build a fluid simulator based off the architecture of Jos Stam's book, The Art of Fluid Animation, only I'm using node.js and canvas-sketch. I think I can finagle it to work, it's just that when I run it as shown below, it hangs. No…
1
vote
0 answers

Can I use periodic boundary conditions for `U` but not for `p`?

I am trying to numerically compute the drag force around a cylinder due to pressure-driven flow. Here is a crude diagram: I am using OpenFOAM v2012 (the openfoam.com version, not the openfoam.org version). For the top and bottom walls, as well as…
K.defaoite
  • 103
  • 1
  • 8
1
vote
0 answers

Getting different results when using pgfortran vs. gfortran for same exact problem

In a computational fluid dynamics solver I have written, I am getting a different result based on the compiler I use. When I compile this code using gfortran with the following flags: -ffree-line-length-512 -Ofast -march=native, I get the "correct"…
1
vote
0 answers

GPU Viscoelastic Fluid Sim

I am trying to implement this paper for viscoelastic fluid simulation - http://www.ligum.umontreal.ca/Clavet-2005-PVFS/pvfs.pdf - to run on the GPU (using iOS Metal). The paper uses a particle-based method, with spring interactions between local…
luko
  • 33
  • 4
1
vote
0 answers

Nonlinear differential equation, How can I solve this numerically with matlab?

https://i.stack.imgur.com/6x1ju.png I have to solve f"'+(4a^2+Re*f)f'=0 where a and Re is constant but variable. There are three BCs, f(1)=0,f(-1)=0 , ∫F(∅)d∅=1(integral -1 to 1) Now I had an idea to change ∫F(∅)d∅=G(theta)(integral 0 to theta),…
1
vote
1 answer

Warning when adding Brownian force in COMSOL Multiphysics

I want to add a Brownian Force to my COMSOL simulation. Unfortunately, I get the warning shown below and I do not understand how to get rid of it. I am unsure what "second-order wall extrapolation" means. Moreover, I cannot find the "Wall accuracy…
1
vote
1 answer

Python - Plot showing Empty

I am trying to plot the following: #Time for t in np.arange(1,10,1): #Raidus for r in np.arange(1,5,1): #Velocity in theta direction V = C/r*(1-np.exp(-r**2/(4*v*t))) print(r,V) #Vorticity Z =…
RSM
  • 227
  • 2
  • 11
1
vote
0 answers

Streamlines in Mathematica

Can someone suggest a better way to solve for streamlines in Mathematica? P.S. StreamPlot is not providing accurate results. Here, velocity is u[x,y] i + v0[x,y] j. p0x[x] is the pressure gradient. The last line in the code is taking too long to…
1
vote
0 answers

how to define the flow model and volume model in Modelica components?

I am learning how to build a thermo-fluid model with Modelica, I notice that in order to reduce the nonlinearity, it is recommended to use two different models: flow model and volume model, here is the explanation I found in a commercial library,…
Jack
  • 1,094
  • 6
  • 16
1
vote
1 answer

Exactly what equation is solved by python fluidsim (object oriented CDF solver)

I have a question about the fluidsim python package. I would like to use the fluidsim program for my research. After reading the documentation, it is not clear what equation exactly the fluidsim.solvers.ns2d.solver algorithm solves (I would be…
1
vote
1 answer

Boundary conditions for stokes flow around a sphere using FiPy

I have tried to solve the Stokes flow around a sphere using FiPy. To do that, I chose a cylindrical 2-D mesh (since my problem is axisymmetric). The z-axis passes through the center of the sphere, and the size of the mesh is Lr x Lz. The boundary…
1
vote
1 answer

Replacing number by variable or loop in Scheme (Fluent) doesn't work

I'm using the ANSYS Fluent program for CFD simulations. This program allows some partial automation of the simulation setup using a so-called Journal File, and I just came to know that this Journal File is written in Scheme. Unfortunately I never…
1
vote
1 answer

how to fix my python code to plot a figure?

My code is exiting with code 0 so there is no mistakes in my code, but it is still running without plotting the flow over the cylinder I wanted to have, can someone help me fix this problem? import sympy as s import matplotlib.pyplot as plt …
1
vote
1 answer

Disappearing internal boundary conditions in Lattice Boltzmann simulation

I am using Electron with TypeScript to prototype some fluid simulation code, using the Lattice Boltzmann algorithm, which will eventually go into a game. So far, I have been using static boundary conditions (with simulation calculations only…
Logan R. Kearsley
  • 682
  • 1
  • 5
  • 19
1
vote
1 answer

Lattice Boltzman WebGL translation results in NaNs everywhere

I came across this implementation of Lattice Boltzmann fluid solver from this blog which goes over its implementation. I decided I wanted to translate this to ShaderToy with webgl. Instead of computing each step necessary for equilibrium, the…
Krupip
  • 4,404
  • 2
  • 32
  • 54