Please help with a fluid solver ^_^

  • Thread starter Thread starter jojodi
  • Start date Start date
  • Tags Tags
    Fluid
AI Thread Summary
The discussion focuses on developing a computational fluid dynamics solver based on the Navier-Stokes Equations. The main challenge is calculating pressure at a specific point for the next frame after deriving the finite difference form of the equations. The user has shared their discretized equations but acknowledges potential mistakes in their formulation. There is a request for assistance, including pseudo-code, to clarify the procedure for pressure calculation. The conversation highlights the complexity of fluid dynamics modeling and the need for accurate discretization methods.
jojodi
Messages
3
Reaction score
0
I've been working for the last month trying to figure this out.
I am trying to produce a computational solver for fluid dynamics based on the Navier-Stokes Equations. I have derived the finite difference form of all the terms and worked out the operators, but I have been unable in finding any way to claculate the pressure at a given point in the next frame. If someone could explain or possibly show me some pseudo-code to the procedure, I would be appreciative.

Thanks in Advance,
Brandon
 
Mathematics news on Phys.org
hmmm.. bump?
 
I'll move this over to math perhaps someone there can help out.

Meanwhile, if you posted what you have for the discretized equations it may spur some conversation.
 
The equations for Navier-Stokes that I have been working on also have some problems as well now that I look at them. I assume I am using an incorrect order of operatins.

\frac{\partial \bold{u}}{\partial t} + \bold{u} \cdot \nabla{\bold{u}} = -\frac{\nabla{P}}{\rho} + \nu\nabla^2\bold{u}

Where \bold{u} is the fluid parcel velocity, \rho is the parcel density, and P is the pressure at that point.

I have discretized this (I'm sure with some mistake(s) :smile: ) to...

\frac{\bold{u}_{t+\delta}-2 \bold{u}_{t}+\bold{u}_{t-\delta}}{\delta t^2} + \bold{u} \cdot<\frac{\partial \bold{u}}{\partial x},\frac{\partial \bold{u}}{\partial y}>= -\frac{<\frac{\partial P}{\partial x},\frac{\partial P}{\partial y}>}{\rho} + \nu({\frac{\partial^2 \bold{u}}{\partial x^2}+\frac{\partial^2 \bold{u}}{\partial y^2}}) \bold{u}

then translates to (for the new frame) :

\bold{u}_{t+\delta}= \delta^2 ( -\frac{<\frac{\partial P}{\partial x},\frac{\partial P}{\partial y}>}{\rho} + \nu({\frac{\partial^2 \bold{u}}{\partial x^2}+\frac{\partial^2 \bold{u}}{\partial y^2}} - <\bold{u}\cdot\frac{\partial \bold{u}}{\partial x},\frac{\partial \bold{u}}{\partial y}>) \bold{u} ) + 2\bold{u}_{t}-\bold{u}_{t-\delta}

For each dimension:
(under construction :-p)
\bold{u}_{x,t+\delta}= \delta^2 ( -\frac{\frac{\partial P}{\partial x}{\rho} + \nu(\frac{\partial^2 \bold{u}}{\partial x^2} + \frac{\partial^2 \bold{u}}{\partial y^2} - \bold{u}\cdot\frac{\partial \bold{u}}{\partial x}) \bold{u} ) + 2\bold{u}_{t}-\bold{u}_{t-\delta}
 
Last edited:
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Thread 'Imaginary Pythagorus'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...
Back
Top