I am working on a simpleFoam flow through a nozzle as a comparison with Fluent. In Fluent I would set up the problem with a total pressure at the inlet, and a static pressure at the outlet to induce the flow through the nozzle.

The atmosphere boundary condition was the only one I could find that used a total pressure, so I used this at the inlet and a pressure outlet at the other end.

My first case was an inviscid flow in a pipe, which worked well with my setup (I did notice that the run-time was heavily dependent on the initial guess velocity throughout the domain, though). However, when I switch to the nozzle geometry I get blowups in both pressure and velocity after a short number of iterations.

Am I implementing the atmosphere boundary condition incorrectly? If so, is there another way to set a total pressure at the inlet? If anyone has any experience in how to set up a flow using a total pressure, I would appreciate any insight you might have. Thanks!

Not sure if you are speaking about Fluent's boundary conditions or about OpenFoam ones.

I'm not right now started with OpenFoam, althought wishing to have time to deal with it.

Nevertheless, you must be quite sure of the physics of your problem when puting presure boundary conditions at the inlet and outlet of a fluid domain.

A little presure difference can produce a supersonic flow, and if the solver is not ready to deal with such physics, it will certainly give bad results.

If this is you physical situation, switch to a compresible fluid model, use the temperature (or enthalpy) equation.

There is a subtle diference between, total presure and thermodynamic presure. Normally I would use total presure at both input and output, if the velocity can have significative or variable value at input or output. This is because you normaly know thermodynamic pressures at input and output when the fluid has no motion, far away from the input and output. The total presure BC, will in fact apply a lower thermodynamic presure using the Bernouilli equation, this is usually more realistic.

Puting a thermodynamic pressure BC will neglect the velocity effect in thermodynamic presure, as commented above.

Neverthless if the solver does not allow to use the the total presure BC at one end you can, and if the velocity effect in presure can be relevant at output, still put a computational funnel at the corresponding BC to put the BC farther away, abd giving it a shape compatible with the physics an so that the velocity gets lowered.

Still, depending on the solver, having an output without recirculation, can very interesting, to have realistic flows and to avoid numerical problems. This is more inportant if the BC is a total (thermodynamic + dynamic) presure BC.

I was having problems simulating a similar case. In Fluent I stablished total pressure at the inlet and static pressure at the outlet. So, I used the totalPressure BC in OpenFOAM and I got the same results. But I'm still in doubt, I don't know why the user must set the "gamma" value along with the totalPressure BC.