2 years ago

#43436

test-img

K.defaoite

Can I use periodic boundary conditions for `U` but not for `p`?

I am trying to numerically compute the drag force around a cylinder due to pressure-driven flow. Here is a crude diagram:

diagram

I am using OpenFOAM v2012 (the openfoam.com version, not the openfoam.org version).

For the top and bottom walls, as well as the obstacle in the middle, I have noSlip boundary conditions for U and zeroGradient boundary conditions for p. However for the inlet on the left and the outlet on the right, I would like to have a periodic boundary condition for U, but instead of a periodic boundary condition for p I would instead like to have a pressure drop across the channel of 100. (This comes from dividing the atmospheric pressure, which is roughly 100 000 pascals, by the density of water, which is 1 000 kg/m^3. This is because the p file is not really the pressure, it is actually the pressure divided by the density, sometimes called p bar.)

However when I tried to implement this, I received the error

--> FOAM FATAL IO ERROR: (openfoam-2012 patch=210618)
inconsistent patch and patchField types for
    patch type cyclic and patchField type fixedValue

file: /home/killian/foam_run/cylinder_2/0/p.boundaryField.inlet at line 25 to 26.

It appears OpenFOAM is not letting me mix my metaphors. Does anyone know a way around this? I have tried other BCs for U and p but I am running into issues where the solution is blowing up after some time.

Would appreciate any help.

numerical-methods

openfoam

fluid-dynamics

0 Answers

Your Answer

Accepted video resources