Use of function objects to terminate transient simulations
I'm running a free surface problem with the interFoam solver of OpenFOAM v1706.
Schematically, the geometry can be described as a cylindrical tank with an open surface at the top, an outlet duct on the side surface and a inlet on the bottom surface. From the inlet, I'm filling the tank only with water. From the outlet duct both air and water flow out, as in a water channel problem. The height of water adjusts itself such that it allows the amount of water introduced thought the inlet to flow out from the outlet duct. I'm running some transient simulations to reach the final water level which changes with the inlet flow. In general the time needed to reach the steady state is not known a-rpiori and I have to run many simulations. Therefore, I'd like to use the function objects in the controlDict to stop the simulation when some criteria are reached. For example, when the total water flow at the inlet at the outlet duct are equal and the outlet flow does not significantly change with time. I checked this link to get some ideas: http://www.openfoam.com/releases/ope...on-control.php And I came out with the following code: Code:
functions The problem is that I'm missing some information (lines with question marks), specifically: 1) what is the name of the field returned by inletFlux and outletFlux functionObjects on which I can operate (see the link for an example with forceCoeffs functionObjects)? 2) How to compute the difference of these two fluxes? Thank you for your suggestions, Luca |
Hello!
Did you manage to solve this conundrum? I have a very similar case at the moment. Thanks! |
All times are GMT -4. The time now is 19:00. |