Please help with a fluid solver ^_^

  • Thread starter jojodi
  • Start date
  • #1
jojodi
3
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
 

Answers and Replies

  • #2
jojodi
3
0
hmmm.. bump?
 
  • #3
Integral
Staff Emeritus
Science Advisor
Gold Member
7,253
63
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.
 
  • #4
jojodi
3
0
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.

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

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

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

[tex]\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} [/tex]

then translates to (for the new frame) :

[tex]\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}[/tex]

For each dimension:
(under construction :-p)
[tex]\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}[/tex]
 
Last edited:

Suggested for: Please help with a fluid solver ^_^

  • Last Post
Replies
1
Views
368
  • Last Post
Replies
2
Views
339
  • Last Post
Replies
5
Views
422
  • Last Post
Replies
1
Views
219
  • Last Post
Replies
3
Views
482
  • Last Post
Replies
2
Views
341
  • Last Post
Replies
2
Views
400
  • Last Post
Replies
1
Views
330
  • Last Post
Replies
1
Views
390
  • Last Post
Replies
0
Views
452
Top