CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Simulation with closing valves (http://www.cfd-online.com/Forums/openfoam-solving/106613-simulation-closing-valves.html)

simpomann September 3, 2012 12:15

Simulation with closing valves
 
Hey,

I want to set up a 2 phase simulation (water running into a tank w. interFoam) with 2 difficulties and so far I have no idea how could they be realized.

1) I want to track pressure and alpha (amount of phase 1 and 2) in the outlet (a hole next to the inlet) and in case that a certain pressure value is exceeded, I want to quit the simulation or if possible: I want to stop the liquid pouring through the inlet.
I found this link useful: http://www.cfd-online.com/Forums/ope...ven-range.html , but how can I limit this condition to apply only to values of the outlet? (Does the surface of a patch have values in the point fields e.g. pressure?)
Or should I try the sampling utility? Can anyone tell me how could I access the data written by the sampleDict during the solver loop? I must admit that I also lack skills in C programming.

2) I also need a valve to close a pipe when it comes in touch with the liquid. How can this be done? I guess I need to track the alpha-Value in the beginning of the pipe, but how is it possible? For tracking I could define a plane cutting through the pipe and use the sampling utility, but how can I close the valve? The valve itself does not need to be modelled geometrically, so no dynamic mesh necessary, but how can I tell openFoam to quit moving air through the pipe?
Is there the possibility to "cut" the pipe with a boundary that can be switched to zero?

I hope you guys can help me out with advice and ideas.
Best thanks in advance!

gschaider September 3, 2012 14:22

Quote:

Originally Posted by simpomann (Post 380046)
Hey,

I want to set up a 2 phase simulation (water running into a tank w. interFoam) with 2 difficulties and so far I have no idea how could they be realized.

1) I want to track pressure and alpha (amount of phase 1 and 2) in the outlet (a hole next to the inlet) and in case that a certain pressure value is exceeded, I want to quit the simulation or if possible: I want to stop the liquid pouring through the inlet.
I found this link useful: http://www.cfd-online.com/Forums/ope...ven-range.html , but how can I limit this condition to apply only to values of the outlet? (Does the surface of a patch have values in the point fields e.g. pressure?)
Or should I try the sampling utility? Can anyone tell me how could I access the data written by the sampleDict during the solver loop? I must admit that I also lack skills in C programming.

2) I also need a valve to close a pipe when it comes in touch with the liquid. How can this be done? I guess I need to track the alpha-Value in the beginning of the pipe, but how is it possible? For tracking I could define a plane cutting through the pipe and use the sampling utility, but how can I close the valve? The valve itself does not need to be modelled geometrically, so no dynamic mesh necessary, but how can I tell openFoam to quit moving air through the pipe?
Is there the possibility to "cut" the pipe with a boundary that can be switched to zero?

I hope you guys can help me out with advice and ideas.
Best thanks in advance!

If you don't want to do any C++-programming yourself then I'd recommend swak4Foam (http://openfoamwiki.net/index.php/Contrib/swak4Foam). Especially point 2 is quite similar to an example from the presentation from the 6th Workshop (starting at slide 145) where an inlet is switched according to the alpha at some probe locations (adapting this to a sampledSurface should be quite easy with the information given in the presentation). For point 1: there is currently no clean way to stop the simulation but shutting the inlet works quite similar

simpomann September 4, 2012 04:18

tHi,

Thanks for the reply! Sounds exactly like what I am looking for.
Can you give me the name of the chapter or the author?
I downloaded this DVD for workshop nr 6 and now I have all the presentations in single files. I skimmed through it but I can't find it :(di

Edit: Found it, thanks a lot!


All times are GMT -4. The time now is 08:02.