CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   flow simulation with only delta pressure known (https://www.cfd-online.com/Forums/openfoam-solving/174437-flow-simulation-only-delta-pressure-known.html)

enginpower July 12, 2016 09:15

flow simulation with only delta pressure known
 
Hi all,
I'm not new to OpenFoam but I don't have much experience on it. I followed a lot of tutorials but this case seams to be particular

I have to simulate a flow through a 'pipe' knowing just the difference of pressure between inlet and outlet.

I'm using simplefoam solver but I'm a bit confusing how to set the boundary conditions. All configurations I tried, diverge.

The pipe has a trasversal surface with a lot of holes that has the function of a narrowing of the flow. I set all the obstacles as wall patches. No problem with the mesh, and also checkMesh command gives the OK.
Thus the geometry has simply an inlet, an outlet and a wall. Really I know only the pressure conditions on the inlet and the outlet, and not the velocity. My problem is how to set these boundary conditions. I'm a bit confused if to use 'zeroGradient' or 'calculated' on the inlet/outlet. For the second I got also an error
Code:

gradientInternalCoeffs cannot be called for a calculatedFvPatchField
    on patch inlet of field U in file "./pipe_250/0/U"
    You are probably trying to solve for a field with a default boundary condition.

    From function calculatedFvPatchField<Type>::gradientInternalCoeffs() const
    in file fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C at line 199.

FOAM exiting

The fluid is water, so incompressible, steady and turbolent.

I hope you can help me making me clear how to best set the boundary condition and avoid the solver diverges. Moreover if I need to set some values for k, omega and epsilon, as I did basing on some supposition, how to calculate them? I just know the pressure and not the velocity. How to do that? Maybe I'm just confusing the phenomena or doing some flow wrong assumptions.

Here is the files of the variables. It returns the error reported above.


Thanks so much for who wants to help me!!

enginpower July 15, 2016 04:34

:confused::confused::(

No one has any solution or suggestions?

Thanks

highpressuretube July 18, 2016 04:35

My best guess would be an iterative approach. You make a flow velocity guess, and calculate a delta pressure. Than adapt your velocity guess according the calculated delta pressure and calculate a new delta pressure. Adapt as many times as you need to get close to your delta pressure.

Regards,
K.

dybuk July 18, 2016 09:52

You can set pressure difference by using totalPressure on inlet and fixedValue on outlet for pressure BC. Also remember to use appropriate BC for velocity.Try zeroGradient or some fancy BC like pressureDirectedInletVelocity on inlet and inletOutlet or zeroGradient (if you allow the backflow) on outlet .

enginpower September 20, 2016 11:34

I'll try the iterative process. I hope...

Persia September 20, 2016 14:37

B.C. for velocity components.
 
Pressure-driven flow is known to cause instability in OpenFOAM. This document explains why and shows how to avoid it:

https://www.researchgate.net/publica...ow_in_OpenFOAM


All times are GMT -4. The time now is 02:35.