- **OpenFOAM Running, Solving & CFD**
(*https://www.cfd-online.com/Forums/openfoam-solving/*)

- - **mixed inflow/outflow downstream boundary condition question**
(*https://www.cfd-online.com/Forums/openfoam-solving/90731-mixed-inflow-outflow-downstream-boundary-condition-question.html*)

mixed inflow/outflow downstream boundary condition questionMany of the simulations that I run have mixed inflow/outflow at the downstream boundary of my domain, and I'm trying to figure out the correct choice of downstream/outflow boundary conditions on the different field values (U, p, k, epsilon).
I have looked through most of the tutorials and currently specify the following for the downstream/outflow boundary: for U: type pressureInletOutletVelocity; value uniform ( 0 0 0 ); inletValue uniform ( 0 0 0 ); for p: type fixedValue; value uniform 101325; for k: type inletOutlet; value uniform 0.06; inletValue uniform 0.06; for epsilon: type inletOutlet; value uniform 25.46; inletValue uniform 25.46; However, I have found that in some cases (not all cases) I get solution divergence occurring at the outflow boundary where the flow is coming in (i.e. an inflow at the outflow boundary). [NOTE: in these divergent cases I have checked that the grid quality is good; I have lowered relaxation factors for steady-state runs, or Courant numbers for time-accurate runs by orders of magnitude and the divergent behavior persists.] Now, when I look at the choice of boundary conditions (see above) I note that they are "well-posed" mathematically for a true outflow boundary: one variable specified (pressure) and the remainder are extrapolated. However, they are not well-posed mathematically for inflow at the outflow boundary. For inflow at the outflow boundary, there should be one variable extrapolated (ideally the outward running characteristic) and the remainder specified, but with my choice of BCs, I have all variables specified. So, I'll start out with two questions... 1) has anyone else experienced similar phenomena as described above (i.e. divergent solution at the outflow boundary when the boundary flow is mixed inflow/outflow)? 2) Does anyone have any suggestions as to appropriate boundary condition choices available in the current distribution of OpenFOAM (I'm using OpenFOAM 2.0.0 and 1.7.1) so that I have consistent, well-posed boundary conditions for a mixed inflow/outflow? (just as another note... I did switch the pressure boundary condition to "outletInlet", which does represent a reasonably well-posed BC, and my prior-divergent solution was nicely stabilized and ran just fine. My concern with this choice of BC is that the downstream pressure, which I want specified at a fixed value, can now drift.) Thanks. Phil :) |

I think I found the problem.
It looks like I needed to use the "totalPressure" boundary condition for pressure at the outflow boundary. When I do this, my current runs appear to stabilize nicely at the outflow boundary, and I get the expected behavior of the pressure at the outflow boundary. Phil :) |

Dear Phil,
I am currently faced with the problem of what settings for "open atmosphere" boundaries. I have followed your settings regarding U, P, k and epsilon, i.e.: U = pressureInletOutletVelocity p = totalPressure k = inletOutlet epsilon = inletOutlet However for some reason I get a build up of velocity, k, epsilon, alphat and mut at the extremities of my domain. Could you please comment on suitable settings for T, O2, N2, H2, mut and alphat as well? A detail description of my scenario can be found below (post 4): http://www.cfd-online.com/Forums/ope...tml#post505532 Many thanks, James |

Quote:
Sorry, but I haven't looked at this thread in some time. Don't know if you've solved your problem already, or moved on. However, here is what I use for BCs on the other field variables... alphat: wall {type compressible::alphaWallFunction; Prt 0.85; value uniform 0;} pressure_inlet {type calculated; value uniform 0.0;} pressure_outlet {type calculated; value uniform 0.0;} mass_flow_inlet {type calculated; value uniform 0.0;} T: wall {type zeroGradient;} pressure_inlet {type inletOutlet; inletValue uniform 298.0; value uniform 298.0;} pressure_outlet {type inletOutlet; inletValue uniform 298.0; value uniform 298.0;} mass_flow_inlet {type inletOutlet; inletValue uniform 298.0; value uniform 298.0;} For whatever species (e.g. O2, N2, H2, etc. Where X.xxxx is whatever appropriate numerical value for the mass fraction): wall {type zeroGradient;} pressure_inlet {type inletOutlet; inletValue uniform X.xxxx; value uniform X.xxxx;} pressure_outlet {type inletOutlet; inletValue uniform X.xxxx; value uniform X.xxxx;} mass_flow_inlet {type inletOutlet; inletValue uniform X.xxxx; value uniform X.xxxx;} For "mut" or "nut": (I'll use "mut" as the example) wall {type mutkWallFunction; Cmu 0.09; kappa 0.41; E 9.80; value uniform 0.0;} pressure_inlet {type calculated; value uniform 0.0;} pressure_outlet {type calculated; value uniform 0.0;} mass_flow_inlet {type calculated; value uniform 0.0;} For completeness, I'll include what I use for U, p, k, epsilon... U: wall {type fixedValue; value uniform (0 0 0);} pressure_inlet {type pressureInletVelocity; value uniform (0 0 0);} pressure_outlet {type pressureInletOutletVelocity; value uniform (0 0 0); inletValue uniform (0 0 0);} mass_flow_inlet {type flowRateInletVelocity; massFlowRate constant X.xxxx; value uniform (0 0 0);} p: wall {type zeroGradient;} pressure_inlet {type totalPressure; value uniform XXXXXX.x; p0 uniform XXXXXX.x; U U; phi phi; rho none; psi thermo:psi; gamma 1.4;} pressure_outlet {type totalPressure; value uniform XXXXXX.x; p0 uniform XXXXXX.x; U U; phi phi; rho none; psi therm0:psi; gamma 1.4;} mass_flow_inlet {type zeroGradient;} k: wall {type compressible::kqRWallFunction; value uniform X.xxxx;} pressure_inlet {type fixedValue; inletValue uniform X.xxxx; value X.xxxx;} pressure_outlet {type inletOutlet; inletValue uniform X.xxxx; value uniform X.xxxx;} mass_flow_inlet {type fixedValue; inletValue uniform X.xxxx; value uniform X.xxxx;} epsilon: wall {type compressible::epsilonWallFunction; Cmu 0.09; kappa 0.41; E 9.80; value uniform X.xxxx;} pressure_inlet {type fixedValue; inletValue uniform X.xxxx; value uniform X.xxxx;} pressure_outlet {type inletOutlet; inletValue uniform X.xxxx; value uniform X.xxxx;} mass_flow_inlet {type fixedValue; inletValue uniform X.xxxx; value uniform X.xxxx;} |

All times are GMT -4. The time now is 09:26. |