Pressure simulation seems wrong

I tried to simulate gas flowing through a pipeline. As seen in screenshots below, p seems underwhelming. I did a 3d and 2d simulation and they seem to agree with each other on the p distribution. The max ps do not agree though


If I use the Bernoulli principle, then the velocity should also have the same distribution. I then go check the velocity and it look quite strange. The gas does not flow according to this

What am I doing wrong?
Those run are named “2d-domain/run9” and “Incompressible-3/0.018”

Hi yapabox589,
I reviewed a few of the simulations and noticed the pretty consistent courant number error.
You may already be aware of this document on the Courant Number. I noticed there were several other references in the documentation section of Simscale when I typed in ’ Courant Number ’

Best of luck

3 Likes

There is a Courant Max and Mean. If I also set coarseness to 0, my mean is smaller than 1.0 (Like 0.16), but Courant max is 2.9. Does that matter?

Rerunning the simulation and the result looks pretty simlilar to when to Courant number is high

Dear @yapabox589, the maximum Courant number value you can set depends mostly on your solver, and temporal discretization method (implicit or explicit). There is plenty of theory about this topic, but for a good quality mesh and a good setup of the PIMPLE algorithm, you can run cases with Co values larger than 1.0. (and sometimes much larger).

Regarding your large pressure increase through the domain, first, you need to correctly represent a real problem in 2D. I have noticed you are using no-slip walls all around the duct. So you set a 20 m/s velocity but at the same time, constrain it to 0 m/s in each FV wall.

For 2D geometries, the front and back must be either empty or have symmetry BC’s (for this case I recommend empty).

For incompressible simulations, the pressure value is related to the velocity. In stagnation regions the pressure increases. As your fluid cannot flow at your prescribed value, the pressure increases through the channel.

I hope this helps.

2 Likes

Hi @jairogut, could you mark where that FV wall speed = 0 is? The only other place I can find speed is initial condition

Not sure I get it, empty BC is like having no BC at all?

Hi yapabox589,

Most of this FEA/CFD stuff goes way above my head, but I think I can answer the question raised…
"…could you mark where that FV wall speed = 0 is? "

Forgive me if this is already known and maybe you have solved the issue already, but stepping through this helps me think.

As you know, Boundary conditions (BC) are set up to inform the simulation on how the walls and surfaces are to be treated and this intern influences the resulting flows and the pressures. Quoting Simscale, In Simscale, a wall boundary condition is assigned to a face by primarily defining the behaviour of the flow velocity at that face. In a CFD simulation, a wall can be an internal surface or an external surface.

In general, for the current simulation type there are 3 main applicable options to choose from for setting boundary conditions for your side walls;

  1. Slip (No side wall friction)
  2. No-Slip (wall friction)
  3. Moving wall (can set velocity here, if required)
  4. Rotating wall (not applicable for this simulation)

Simscale are better at explaining this side wall friction for different conditions, you may have seen this already, I found it helpful, especially the first half of the document.

So going back to your question…
You have an inflow velocity at the inlet of 20m/s and if the 4 side walls were set to No-slip, the side walls therefore have ‘friction’. I think what you are aiming for is to see little to no pressure/velocity change as the ‘2D’ model has straight walls. If you don’t want any influence from the 4 side walls, this can only be achieved by setting the walls Wall1 to either have no friction or have them setup as moving walls.

The current settings show Wall 1 set to No-slip, so set this needs to change to either ‘Slip’ or to a ‘moving wall’ to 20m/s. My guess, both would work for your situation, but don’t take my word, run two simulations to verify.

image

All the best with your future simulations :slight_smile:

1 Like