Please help with a fluid solver ^_^

  • Thread starter jojodi
  • Start date
  • Tags
    Fluid
In summary, the conversation revolves around a person's attempts to create a computational solver for fluid dynamics based on the Navier-Stokes Equations. They have been working on deriving the finite difference form and operators, but are struggling with calculating the pressure at a given point in the next frame. They are seeking help and have shared their equations and progress with the hope of spurring further conversation and assistance.
  • #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
 
Mathematics news on Phys.org
  • #2
hmmm.. bump?
 
  • #3
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
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:

1. What is a fluid solver?

A fluid solver is a computational algorithm used to simulate the behavior of fluids, such as water or gases, in a virtual environment. It takes into account various physical properties and equations to simulate the movement and interaction of fluid particles.

2. Why is a fluid solver important?

A fluid solver is important because it allows scientists and engineers to study and understand the behavior of fluids without having to conduct expensive and time-consuming physical experiments. It is also used in various industries, such as aerospace and weather forecasting, to improve designs and make predictions.

3. How does a fluid solver work?

A fluid solver works by dividing a fluid volume into small computational cells and solving mathematical equations to determine the velocity and pressure of the fluid particles within each cell. These values are then used to update the position and properties of the particles in the next time step.

4. What are the limitations of a fluid solver?

One limitation of a fluid solver is that it relies on simplifying assumptions and numerical approximations, which may not accurately represent the complex behavior of real fluids. It also requires significant computational power and time to simulate large and detailed fluid systems.

5. What are some real-world applications of a fluid solver?

A fluid solver has many real-world applications, including weather forecasting, aerodynamics, oceanography, and special effects in the film industry. It is also used in the design of vehicles, buildings, and other structures to test their performance in fluid environments.

Similar threads

Replies
1
Views
2K
  • Mechanics
Replies
5
Views
3K
  • General Math
Replies
2
Views
1K
Replies
7
Views
1K
Replies
18
Views
1K
Replies
9
Views
3K
Replies
19
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
Replies
10
Views
4K
  • Classical Physics
Replies
2
Views
775
Back
Top