fixedJump command in OpenFOAM

Problem Description

For two-dimensional Poiseuille flow, there are generally two ways to drive the flow, one is driven by body force, and the other is driven by pressure difference between inlet and outlet. Here we mainly explain the second method.

periodic boundary condition

For flows such as channel flow, we generally adopt periodic boundary conditions at the entrance and exit. In OpenFOAM, there are two commands, cyclic and cyclicAMI. Among them, cyclic requires that the entrance and exit grids are exactly the same, while cyclicAMI does not have this requirement.
Here, the significance of periodic boundary conditions is that the physical quantities on the inlet and outlet surfaces are exactly the same. In simple terms, that is, what flows out of the outlet continues to flow in from the inlet. The significance of using this boundary condition is mainly to simulate an infinitely long channel. In this case, there will be a problem. For the pressure p, if the inlet and outlet are exactly the same, there will be no pressure difference. Then how do we use the pressure difference to drive fluid flow?

Use the fixedJump command to set the pressure difference

In fact, the fixedJump command solves this problem. We can set a Jump amount so that the pressure at the inlet is equal to the pressure at the outlet plus a constant, so that a pressure difference can be generated. Its specific settings are in the p file under the 0 folder.

    inlet
    {
    
    
    type            fixedJump;
	patchType       cyclic;
	jump            uniform -0.001220377373900;
	value           $internalField;
    }
    outlet
    {
    
    
    type            fixedJump;
	patchType       cyclic;
	jump            uniform 0;
	value           $internalField;
    }

The above is a setting method, here we need to pay attention to two points:
1. The result we want is that the pressure at the inlet is greater, so we need to set a Jump amount, and we need to pay special attention to the negative sign here .
2. For the exit, our Jump amount can be set to 0

verify

Open the calculation example in Paraview, only open the inlet surface, and use tools to detect the upper and lower bounds of p on the inlet surface; as shown below
insert image description here

p i n l e t m a x = 0.0245446 ; p i n l e t m i n = − 0.00250727 p_{inletmax} = 0.0245446;\quad p_{inletmin} = -0.00250727 pinletmax=0.0245446;pin l t min _=0.00250727

The upper and lower bounds of p on the outlet surface are shown in the figure below
insert image description here
poutletmax = 0.0233242 ; poutletmin = − 0.00372764 p_{outletmax} = 0.0233242;\quad p_{outletmin} = -0.00372764poutletmax=0.0233242;poutletmin=0.00372764
可以计算出
Δ p i n l e t − o u t l e t m a x = 0.0245446 − 0.0233242 = 0.0012204 ; p o u t l e t m i n = − 0.00250727 + 0.00372764 = 0.00122037 \Delta p_{inlet -outlet max} = 0.0245446-0.0233242=0.0012204;\quad p_{outletmin} = -0.00250727+0.00372764 = 0.00122037 p _inletoutletmax=0.02454460.0233242=0.0012204;poutletmin=0.00250727+0.00372764=0.00122037

It can be seen that the desired effect has been achieved, and the pressure at the outlet of the inlet wall is a certain value, which is exactly equal to the value we set.

Guess you like

Origin blog.csdn.net/ambu1230/article/details/128690705