- **OpenFOAM Running, Solving & CFD**
(*https://www.cfd-online.com/Forums/openfoam-solving/*)

- - **include #createPhi.H**
(*https://www.cfd-online.com/Forums/openfoam-solving/116291-include-createphi-h.html*)

include #createPhi.H2 Attachment(s)
Hello world,
I am new to this forum, to OpenFoam, and to C++. So my question is most probably very basic, but I would really appreciate your help. My geometry is a cube in which I have inserted a cylinder (see attached picture). The cube is a porous medium. The boundary conditions are : fixed pressure on the bottom face and on the circle (base of cylinder) and zero flux everywhere else. Now my program gives me the velocity field (U) and the pressure field (P) in all the cube. I want to calculate the flow (the one either exiting from the circle or entering into the bottom face) which is defined by integral(U.n) on the desired surface, where n is the vector normal to the surface. so I thought about including #createPhi.H in my createFields.H and then simply using : patchIntegrate phi <patch name> but it doesn't work. it says : "Integral of phi over patch uniformPressure[0] = 0" and when I check the file where phi is written down in, I get : dimensions [0 3 -1 0 0 0 0]; internalField uniform 0; boundaryField { uniformPressure { type calculated; value uniform 0; } cercle { type calculated; value uniform 0; } fixedWalls { type calculated; value uniform 0; } } Any ideas, suggestions..? Thank you ! |

All times are GMT -4. The time now is 01:24. |