|
[Sponsors] |
July 26, 2022, 14:26 |
Fast Fluid Dynamics - Pressure Field
|
#1 |
New Member
Join Date: May 2021
Location: Athens, Greece
Posts: 28
Rep Power: 5 |
Greetings to all people in this forum!
I am facing a rather strange problem and I thought I'd ask for general advice/opinions. I am a Computational Fluid Dynamics developers. I currently work on two solvers: -- a "traditional" CFD solver -incompressible with artificial compressibility- -- a Fast Fluid Dynamics solver (FFD) (incompressible, see below) Both solvers are Finite Volume and utilize unstructured meshes. These two solvers share the whole data structure and input files etc. Only the iterative part is different. The CFD solver has the whole process of gradients/fluxes/viscous fluxes/RHS-LHS/linear system solution (using Roe Riemann solvers etc -all and all a typical CFD solver-). For anyone that is not familiar, Fast Fluid Dynamics is an different approach to solving the Navier-Stokes equations, which has increased computational speed and reduced accuracy. The seminal paper that first presented the approach is the following: https://www.ljll.math.upmc.fr/~frey/...e%20fluids.pdf It is mainly geared towards video games and other applications where a fast and "realistic-looking" field is desired, and accuracy is not that important. Based on the paper, the FFD solver solves the velocity field using first order approximations and then computes the pressure field in order to satisfy the continuity equation via the pressure gradient (kinda like a SIMPLE algorithm). It does not have Riemann solvers or anything like that. Just first order upwinding and first order gradients. My problem: The CFD solver has been compared and validated against many experimental data. This includes Velocity Fields, Temperature Fields, Pressure Fields, and various other related quantities (vorticities, Reynolds Stresses etc). The FFD solver is able to produce realistic velocity and temperature fields when compared to the CFD solver and the experimental data. Since it utilizes lower order schemes, it has reduced accuracy. This is expected. To get the same accuracy, one needs to utilize finer meshes. For finer meshes and simple cases, for example lid driven cavity or buoyant cavity which are both classic cases, the two solvers produce similar velocity and temperature fields. The deviations are not significant. However, the produced pressure field is very different. Qualitatively, the pressure contour has the same characteristics. High pressure and low pressure values appear on the same locations. The FFD solver, however, produces a pressure field that has pressure values that are an order of magnitude lower than the CFD. My question: How is this possible? Shouldn't a similar velocity field produce a similar pressure field? I know that the two approaches are different, the differences are depicted in the velocity and temperature fields which have minor deviations when compared to the CFD solution. However, why do I get a pressure field that is so vastly different? I know that my question is very general, I am just looking for hints on where to start troubleshooting. --- For example, let's assume a simple poiseuille flow between two plates as described here: http://www.columbia.edu/cu/gsapp/BT/...os/plates.html If I run the simulation with the CFD solver, using the velocity profile of the analytical solution as inflow and static pressure equal to 0 as outflow, I will get the exact pressure gradient of the analytical solution when the simulation converges: 0.324 Pa/m The FFD solver will give the same velocity field (with small deviations), but will yield a pressure gradient of 0.05 Pa/m! With velocity field that is only 2-3% different than the CFD solution! --- Any ideas on where to start are welcome. I know my question is unique and very general, I am hoping to get some general ideas on what I could look for. It does not make sense to have a velocity field that produces a vastly different pressure field. Something is wrong. |
|
July 26, 2022, 17:14 |
|
#2 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,897
Rep Power: 73 |
I think you have to compare the gradient of the pressure field. In your FFD method, the “pressure” is just a potential function that must enforce the divergence-free condition. The solution of the pressure equatio. is determined up to an arbitrary function of time. Using the comparison of the gradient of the solution you could better check the two codes.
|
|
July 26, 2022, 18:52 |
|
#3 |
Senior Member
-
Join Date: Jul 2012
Location: Germany
Posts: 184
Rep Power: 14 |
Your problem is neither unique nor very general. You simply suffer from a fundamental problem of understanding.
FMDenaro already addressed the main problem. The pressure field in your FFD is unique up to a constant value and can simply be choosen arbitrarily. |
|
July 27, 2022, 05:16 |
|
#4 | |
New Member
Join Date: May 2021
Location: Athens, Greece
Posts: 28
Rep Power: 5 |
Quote:
I kinda figured what you express: that the two pressure fields are not actually referring to the same quantity. However, the pressure gradient is also different. :/ If I solve the poiseuille flow as an example, I will set the pressure as 0 at the outlet and the velocity profile as inlet. The corresponding pressure gradient must converge to the analytical value. It does on the CFD solver. It does not on the FFD solver. So neither the pressure field, nor the pressure gradient correspond to the CFD values. And it makes sense, since I set outflow pressure as 0 in both solvers. With 0 outflow pressure, in order to retrieve the same pressure gradient I need the solver to produce the same inflow pressure. Since the FFD solver produces an inflow pressure that is an order of magnitude lower, the gradient cannot be the same. |
||
July 27, 2022, 05:23 |
|
#5 | |
New Member
Join Date: May 2021
Location: Athens, Greece
Posts: 28
Rep Power: 5 |
Quote:
Well, it is always good to try and understand new things. I kinda figured out that the FFD algorithm only cares for the divergence-free condition. Therefore the solved "pressure" only needs to satisfy that. However, I could not for example discern why the FFD algorithm is different from a basic SIMPLE algorithm that also solves a pressure poisson equation in order to define the pressure correction. The only difference I can point out is that SIMPLE solves for the pressure correction and not for the pressure. Is this the whole story that kinda sums it up? |
||
July 27, 2022, 05:49 |
|
#6 |
Senior Member
|
Are you saying that the two codes actually use the exact same routines? Because from the linked papers I can't see how the FFT in the FFD solver can be applied to the unstructured case.
Also, while I am no expert in fast solvers for gaming, nowhere in the paper I see any verification. Which is ok, given the peculiarity of the solver and its goal. But I don't understand why you expect the FFD solver to be accurate. The FFD solver uses a very specific fractional step approach that is different from the SIMPLE one. They could or not give the same pressure, but the FFD approach is specifically meant to produce a divergence free velocity field after the previous sequence of steps, which might or not be accurate theirselves, not necessarily a time accurate pressure field. If you really want to compare them, my suggestion is to try the FFD solver using a very small time step and/or study the differences between the two solvers as a function of the time step. |
|
July 27, 2022, 06:36 |
|
#7 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,897
Rep Power: 73 |
Quote:
Last check: compute the final divergence of the velocity in each cell and verify. |
||
July 27, 2022, 11:46 |
|
#8 | |
New Member
Join Date: May 2021
Location: Athens, Greece
Posts: 28
Rep Power: 5 |
Quote:
The iterative parts are different. They use the same post-processing routines (parameter/mesh input, flowfield output), so they can utilize the same mesh and input files. The FFD solver is adapted to a finite volume scheme on unstructured meshes. It is not difficult to do. For instance, there are some examples that have implemented an FFD scheme on OpenFOAM: Liu et al (2016) Implementation of a fast fluid dynamics model in OpenFOAM for simulating indoor airflow To be clear, I do not expect the FFD solver to be fully accurate. I expect more of an approximate solution. What I wonder is why the velocity field is kinda accurate (on the basis that it is an FFD simulation) and the corresponding pressure field is not and is very far off from the CFD pressure field. If everything was equally off, I wouldn't be surprised. What surprises me is that it is easy for the algorithm to produce a "realistic" velocity field, and it simultaneously produces a vastly different pressure field. Your last paragraph is most probably spot on; since the FFD algorithm uses an explicit time marching algorithm, it requires very small timesteps in order to produce a pressure field that matches the results from CFD. Given the nature of the algorithm, it can run with very high timesteps and not blow up. However, perhaps one should not expect to also have the correct pressure levels at high timestep values. |
||
July 27, 2022, 11:58 |
|
#9 | |
New Member
Join Date: May 2021
Location: Athens, Greece
Posts: 28
Rep Power: 5 |
Quote:
In that case, all walls are viscous walls. Therefore, all boundary conditions for pressure are zero gradient. In that case, the velocity and temperature fields are comparable to those from the CFD solver (and with OpenFOAM). The pressure field is very different. Qualitatively, it has the same characteristics. The pressure values, however, are an order of magnitude lower. See my above reply, though; the FFD solve uses an explicit scheme and perhaps requires very small timestep values in order to produce a pressure field that is comparable to the CFD pressure field. I am talking at least 2/3 orders of magnitude smaller. |
||
July 27, 2022, 11:58 |
|
#10 |
Senior Member
|
The point is that this kinda means nothing in quantitative terms. Have you ever seen how rubbish a first order solution can look while still being quite there in terms of formal accuracy?
So, in the end, you have two codes. There is only one way to test them: they either reduce the errors with grid and time steps or they don't. If they do, the solutions will eventually match for sufficiently fine steps. If they don't, anything else is just pictures which, however, kind of are the whole point here. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mass flow in is not equal to mass flow out | saii | CFX | 12 | March 19, 2018 06:21 |
''unknown radialModelType type Gidaspow'' PROBLEM WITH THE BED TUTORIAL | AndoniBM | OpenFOAM Running, Solving & CFD | 2 | March 25, 2015 19:44 |
buoyantPimpleFoam - pressure field | Fabf | OpenFOAM Running, Solving & CFD | 2 | February 17, 2015 05:02 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
Problem with rhoSimpleFoam | matteo_gautero | OpenFOAM Running, Solving & CFD | 0 | February 28, 2008 07:51 |