# Does rhoSimpleFoam solver impose a velocity field divergence free?

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

 June 17, 2021, 15:56 Does rhoSimpleFoam solver impose a divergence free velocity field? #1 New Member   Ahmhmd Join Date: Jun 2012 Posts: 4 Rep Power: 12 Hello everyone, I have been trying to run a 'compressible' simulation using rhoSimpleFoam, and I am still struggling with boundary conditions implementation. In my head 'compressible' means the velocity field has non-zero divergence, it means 'volume' is not constant. But apparently, rhoSimpleFoam is a pressure-based solver, and it uses SIMPLE algorithm for pressure velocity coupling. I think this means it solves an incompressible problem with varying density, am I correct? And therefore, it cannot capture flow discontinuities. From my understanding, compressible implies a density-based solver that obtains the pressure field from the thermodynamic model of the fluid. Moreover, I wanted to use free stream boundary conditions for both velocity and pressure, but I think they wouldn't work as they do in a density-based solver. Thanks! erinsam likes this. Last edited by MastaMinds; June 18, 2021 at 07:07.

 June 20, 2021, 13:08 #2 Senior Member   Join Date: Apr 2020 Location: UK Posts: 449 Rep Power: 11 rhoSimpleFoam is indeed a compressible solver (see discussion below) - it solves a continuity equation and allows for gas mixtures with differing densities, so the dilatation term (divU) can indeed be non-zero. You are right to note that it is a pressure based solver, though, and so is probably better targeted at lower Mach number, variable density flows, since I guess that density based solvers will be more efficient at high Mach#. As for the definition of "incompressible" - this seems to be used ambiguously. Many treat it as just a measure of flow compressibility effects or Mach number, i.e. whether flow/pressure perturbations result in significant density perturbations (When choose sensibleInternalEnergy or sensibleEnthalpy in thermophysicalProperties). Others use it to mean that divU = 0, i.e. constant density. OpenFOAM uses the latter, when classifying its solvers. MastaMinds likes this.

 Tags boundary conditions, compressible, incompressible solver, openfoam