# SimpleFOAM results way off from measurements and analytical calculation

 Register Blogs Members List Search Today's Posts Mark Forums Read

December 13, 2016, 09:07
SimpleFOAM results way off from measurements and analytical calculation
#1
New Member

Dennis
Join Date: Oct 2016
Posts: 11
Rep Power: 9
Hello!

Currently I'm using simpleFOAM on certain pipe configurations to determine the pressure loss in the pipe. While I got converged simulations and all, I did some verification with available measurements for a certain pipe configuration and the simpleFOAM results (pressure drops) were way higher than the measurements! And with this I mean at least 10 times higher (about 3 bar in stead of 0.2 bar). Or in p/rho: about 300 m2/s2

In order to determine the pressure loss I set the outlet pressure at 0, with zeroGradient at inlet. There is a certain velocity at the inlet and zeroGradient at the outlet. I'm initially interested in steady state solutions only.

Then I started to make some simple geometries with SALOME and ANSYS to run simpleFOAM simulations with these and do some basic pipe pressure loss calculations by hand to compare them with. But as soon as some reduction in the pipe diameter occurs, the pressure drop from the simulations increases drastically. For example, a pipe with conical mid-section gradually going from 0.044 m diameter to 0.022 m diameter has a pressure loss of nearly 6 bar when taking water with inlet velocity of about 8 m/s. Doing some quick hand calculations (from the German VDI) gives about 0.05 bar, which also is more in line with measurements.

Now I have looked into quite some things which didn't came out with a more reasonable result:
- The laminar case has more or less the same results (in order of magnitude). So the problem is not in the turbulence model I guess
- Using the same geometry with ANSYS CFX also gives a pressure loss which is about the same order of magnitude of the OF simulation.
- I also played around with the fvSchemes and fvSolver, but as expected this didn't change much in the pressure drop itself, mostly in required time and whether there is convergence or not.
- checkMesh checks out and I, and if not I remake the mesh of course.

My initial conditions are as follows (assuming kEpsilon model):
Epsilon
Code:
```internalField   uniform 0.322;

boundaryField
{
inlet
{
type            fixedValue;
value           uniform 0.322;
}
outlet
{
}
walls
{
type            epsilonWallFunction;
value           uniform 0.322;
}
}```
k
Code:
```internalField   uniform 0.0139;

boundaryField
{
inlet
{
type            fixedValue;
value           uniform 0.0139;
}
outlet
{
}
walls
{
type            kqRWallFunction;
value           uniform 0.0139;
}
}```
p
Code:
```internalField   uniform 0;

boundaryField
{
inlet
{
}

outlet
{
type            fixedValue;
value           uniform 0;
}

walls
{
}

}```
U
Code:
```internalField   uniform (0 0 0);

boundaryField
{
inlet
{
type            fixedValue;
value           uniform (8.345 0 0);
}

outlet
{
}

walls
{
type            fixedValue;
value           uniform (0 0 0);
}

}```
It would be really helpful if someone could take a look at this and see if I have something wrong for my initial conditions or case setup. I find it really strange the pressure drops so drastically and 5 bar is way to much for a 0.25m long pipe which gradually decreases in diameter, for example. It's also not an overly complex case (at least the simple geometries I tried).

Attached are my schemes and solution files (as .txt) as well as an example of the simpler geometries I'm trying at the moment.

I'm more or less out of ideas where the problem lies, also because this behavior shows in the laminar case where there aren't a lot of variables...

Cheers,
Dennis

Or maybe I'm interpreting the results from OF and ANSYS wrong. I looked into this quite a bit, but ANSYS gives pressure already in Pa and I checked this for OF...
Attached Images
 pipe1.jpg (48.6 KB, 12 views)
Attached Files
 fvSchemes.txt (1.6 KB, 3 views) fvSolution.txt (1.8 KB, 3 views)

December 14, 2016, 03:07
#2
New Member

Dennis
Join Date: Oct 2016
Posts: 11
Rep Power: 9
Forgot to mention, the behavior for changing the viscosity is also not really what I'd expect. I've attached the results for a range of kinematic viscosity.

Anyone maybe got a clue on what I might be doing wrong?
Attached Images
 viscosityHistory.png (8.1 KB, 9 views)