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/)
-   -   Atmospheric BCs for domain with a single boundary serving as both the inlet & outlet (https://www.cfd-online.com/Forums/openfoam-solving/244101-atmospheric-bcs-domain-single-boundary-serving-both-inlet-outlet.html)

Newtonian July 21, 2022 14:07

Atmospheric BCs for domain with a single boundary serving as both the inlet & outlet
 
Greetings all,

I am trying to simulate a horizontal rotating blade inside a vertically-oriented cylindrical domain. I'm using simpleFoam solver and K-epsilon turbulence model, and using MRF around the blade which is located near the bottom of the cylindrical domain. The bottom of the cylindrical domain is a no-slip wall serving as the ground, and the sides and top of the cylindrical domain serve as both the inlet and the outlet (simultaneously). The trouble I am having is with specifying the velocity and pressure boundary conditions for this flow boundary because it serves as both the inlet and the outlet, rather than having the conventional setup with separate inlets and outlets. Ideally this flow boundary should resemble atmospheric conditions in which flow can go both directions across the boundary. I do not want to specify any type of inlet velocity because I want the flow to be entirely induced by the rotation of the blade.

I have performed this exact simulation in Ansys Fluent and it is quite simple: setup the same system using "pressure outlet" boundary condition for the flow boundary with total gauge pressure=0, no need to specify velocity BCs. Fluent then computes flow out of the pressure outlet and reverse flow into the domain through the pressure outlet, and all is well. Not so straightforward in OpenFOAM however :(
----------------------------------------------------------------

The problem is that there is no standard BC for "pressureOutlet" compatible with reverse flow like there is in Fluent. There are two ways I know of to set a constant pressure at the boundaries. The first is you can set the static pressure using fixedValue and the second is you can set the total pressure at the boundary using totalPressure. I have tried both = 0, but I think totalPressure makes more sense because then you are controlling both the static and dynamic pressure at the boundary.


Either way, the problem then arises with the corresponding velocity condition specified at the boundary; once again I don't want to force the airflow using an input velocity at the boundary, and so therefore if a velocity needs to be specified, it must be zero. However, this leads to another issue:

There are several BCs for velocity that nearly work but require a velocity specification in one direction (which I must set as zero). The inletOutlet condition will set velocity to zeroGradient for flow coming out of the domain, but will assign velocity=0 for flow coming into domain, which doesn't make sense. On the other hand outletInlet will assign velocity zeroGradient for flow coming into domain, which makes sense, but will assign velocity=0 for flow coming out of domain, thus blocking reverse flow and invalidating continuity. zeroGradient becomes unstable when reverse flow occurs. pressureInletOutletVelocity will assign zeroGradient for flow coming out of domain, and will compute and assign a velocity to flow coming into domain based on the flux in the direction normal to the patch. It seems to me that this would be the best option, however, I can not seem to make this work either.

It seems that no matter what I try (over the past many days now), the continuity residual diverges toward infinity. In some setups continuity will diverge very quickly, other times it will run for 75-100 timesteps or so before diverging. However, when it runs for 75-100 timesteps before continuity diverges, all other residuals remain relatively constant around 1 up until the continuity divergence point.

I sincerely appreciate any help, and thanks in advance!


All times are GMT -4. The time now is 13:01.