Hi all and happy new year
I have set up a pressure induced flow based on ex_navierstokes14.m whereas I changed the shape function for the pressure to second order (sflag 2), since otherwise, no solution is computed. This works fine with rather low pressure values. With increasing values for the pressure difference and higher flow velocities, I need to change the solver to openfoam since the standard one doesn't converge anymore. Furthermore, i want to anyway run a turbulent simulation eventually. Using the openfoam solver and having sflag2 as shape functions I get the following error: Error using featool openfoam: only constant or linear discretizations supported. By changing the shape function back to first order, openfoam can start but won't calculate any sensible result (it actually runs only for 0.6 seconds and everything is zero) So how can a pressure induced flow properly be solved with openfoam? Thanks! |
Administrator
|
Finite Volume based codes and solvers such as OpenFOAM typically use either edge/face centered and/or cell centered degrees of freedom. The solution components/degrees of freedom are typically interpolated when imported into FEATool. Although it is technically possible to use higher order interpolations, there is very little (accuracy) to gain from this as the resulting OpenFOAM solutions are cell centered and therefore piecewise constant in each cell. The available solution spaces when using the FEATool-OpenFOAM solver interface have therefore been limited to constant and linear discretizations.
Regarding pressure driven flows, FEATool translates boundaries with prescribed pressure as "zeroGradient" for the velocities and "fixedValue" for the pressure. According to the linked post [1] this might not be appropriate for these types of flows where it is suggested to set the tangential velocities to zero. Although this type of boundary condition currently isn't supported in FEATool, you could export your OpenFOAM case files (using the "Export" button in the OpenFOAM Solver settings dialog box), manually edit the boundary conditions and run the OpenFOAM simulation externally (with for example "simpleFoam/pimpleFoam -case path_to_case_directory"). Alternatively, if your problem allows for it, it might be better to manually implement an algebraic turbulence model in FEATool as done in the linked post [2]. [1]: Proper velocity boundary conditions for modeling pressure-driven flow in OpenFOAM [2]: Custom Implementation of an Algebraic Turbulence Model in FEATool Multiphysics
|
This post was updated on .
Do you think it is possible to manually implement the mentioned turbulent model from [2] with the attached geometry?
Here, the distance to the wall is not as easily computed as in the referenced model... CFD_Model_LeonRobers.PNG The turbulent calculation with OpenFOAM using velocity boundary instead of an induced pressure works fine. Is it valid to say that the lower the pressure loss between inlet and outlet the lower is also the channel resistance? Last but not least: The residual values for k, epsilon, Uy, Ux, p do not all reach values below 10^-4 (which I read would be the minimal convergence criteria) before they start to increase and then finally converge again (see both pictures). However, they do "temporary" converge when they reach a value below 10^-3 or at approximately 500 iterations. Is it valid to set the convergence residual value to 10^-3 or will this then result in completely wrong data? Especially the pressure has already reached a value below 10^-6 and this is the only quantity I plan to use... Convergence_one.PNG Convergence_2.PNG Thanks and have a nice weekend |
Administrator
|
Dear Leon,
Please find some answers to your questions below. It certainly is possible, but you would have to write a custom function to calculate the wall distance. Not that difficult but it would take some work (and care to exclude contributions from boundaries that are not walls such as in/out-flow boundaries). Feel free to try the alpha version of FEATool v1.12 which has included this functionality, but note that there may be bugs, issues, and missing features due to the alpha state. FEATool Multiphysics v1.12 ALPHA Download Link I believe the flow or hydrodynamic resistance is usually defined as R_h = Q/dP where Q is the flow rate, and dP the pressure difference. So it should be inversly proportional to the pressure drop for a given flow rate. One could probably say that your simulation has converged for the grid size used. Typically if a simulation will not converge it could indicate that the mesh is to coarse, or not resolved enough in certain areas, such as boundary layers and recirculation zones. Or it could simply indicate that a simulation will not converge towards a steady state and is instationary in nature. |
Free forum by Nabble | Edit this page |