Pressure BC for interFoam

 Register Blogs Members List Search Today's Posts Mark Forums Read

May 6, 2014, 02:14
Pressure BC for interFoam
#1
New Member

Max
Join Date: May 2011
Location: Nuremberg
Posts: 17
Rep Power: 15
Hallo,
I am working on a simulation of a weir with interFoam. Therefore I need a fixed water level at the Outlet to control the actions right behind the weir.
With swak4Foam/groovyBC I can define the pressure on the Outlet to hold the water table on a certain hight:

outlet
{
type groovyBCFixedValue;
valueExpression "(pos().z<34) ? (1*9.81*(72-34)+1000*9.81*(34-(pos().z))) : 1*9.81*(72-(pos().z)) ";
}

also see the sketch.

Problem is that I can just define p_rgh and not the total pressure as a boundary condition.
Is there a way to get interFoam using p as a boundary condition instead of p_rgh in the 0/ folder?

Thanks a lot - Max
Attached Images
 20140506_080221.jpg (89.3 KB, 123 views)

 May 16, 2014, 05:00 #2 Super Moderator     Tobias Holzmann Join Date: Oct 2010 Location: Tussenhausen Posts: 2,708 Blog Entries: 6 Rep Power: 51 Hello Max, do you want to simulate a "hydraulic jump"? If yes, the hydraulic jump will be generated by itselfs and if you set up some BC so that you will have a certain water level below your hydraulic jump - i think - it is not physically correct. This water level should be controlled by your geometry design and the flowrate you have. Because this phenomena is a physical effect -> http://holzmann-cfd.de/index.php/sim...herSprungVideo There was a guy that made a similar simulation for "Nürnberg" I think and first he wanted to do it with BC. At least he was able to do it in a physical correct way (refining the mesh for example). Otherwise you can check out the "phaseHydrostaticPressure" or you can insert a wall at the outlet. But still - its not the physical way But at all - I have no idea if you want to simulate a hydraulic jump and therefor my hints are just for that case. e.g. Code: ``` | < outlet patch | < outlet patch | < outlet wall -------------| < outlet wall lower wall``` __________________ Keep foaming, Tobias Holzmann

 August 11, 2014, 09:29 #3 New Member   Join Date: Jul 2014 Posts: 22 Rep Power: 11 Hello Tobias, do you have more information about this guy or the simulation for "Nuernberg"?

 Tags boundary condition, interfoam, pressure, p_rgh, water level