|
[Sponsors] |
How to create a free surface application in Openfoam ? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 27, 2011, 23:29 |
How to create a free surface application in Openfoam ?
|
#1 |
New Member
Jindo
Join Date: Mar 2011
Location: Germany
Posts: 25
Rep Power: 15 |
i am new user of OpenFoam (1.7.1) and I want to creat a free surface application.
For example : in backward facing, I want to creat a free upper surface ? thank you ! phuchuynh |
|
July 28, 2011, 03:28 |
|
#2 |
Senior Member
|
Hello,
In my opinion the dam break case is a free surface application http://repo.or.cz/w/OpenFOAM-1.7.x.g...minar/damBreak http://repo.or.cz/w/OpenFOAM-1.7.x.g...erFoam/laminar or tank sloshing https://openfoam-extend.svn.sourcefo...ckFoam/tank3D/ but this is OpenFOAM-1.6-ext so have a look at interFoam or multiphaseInterFoam |
|
July 28, 2011, 14:55 |
|
#3 |
Senior Member
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 219
Rep Power: 21 |
Right. Just take one of the backward step example cases and tweak it to run with interFoam. Take a look at the damBreak tutorial for interFoam to see what files you need (e.g. you need to make an alpha1 field and may need to change the name of p to p_rgh).
You should be able to set the alpha1 fraction on the inlet to 1 and start with the volume empty and watch it fill up. You may have to tweak the outlet BC (perhaps like the top boundary on damBreak--although I am not sure if this will work correctly. There may be a better BC type for this sort of outlet (half-full liquid flow). Hope this is useful. |
|
August 2, 2011, 07:40 |
|
#4 |
New Member
Jindo
Join Date: Mar 2011
Location: Germany
Posts: 25
Rep Power: 15 |
Plsease
I want to creat a free surface application for solvers ..basic/scalarTransportFoam/pitzDaily. I replaced the words in library blockmeshDict " wall upperWall " by " patch atmosphere" ; in libray boundary and T , U " upper Wall " by "atmosphere " , But the result remains unchanged. So how do I do ? Plz ! help me ? thanks ! |
|
August 2, 2011, 10:51 |
|
#5 |
Senior Member
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 219
Rep Power: 21 |
Hi--
Sounds like all you have done is change the name of the boundaries. You need to change the names in constant/polyMesh/boundary (or rerun blockMesh with your modified blockMeshDict). You also must change the boundary conditions in the 0 directory. You will need to copy the alpha1 file from a damBreak case and change the BC names to match the new case. You will need to add an inlet (which will be type fixedValue) for the inlet. You'll need to update U and p (as p_rgh) as well. You will also need to copy the fvSolution and fvSchemes files from the damBreak case into the new one (alternatively, you can just copy the whole damBreak case and copy in your blockMeshDict from the back step case and start modifying from there). Does this make sense? If you make some changes and try to run the case and get some errors, don't give up, just take a look at what they say--usually they will tell you what is missing so you can make it work. Regards, Kent |
|
August 3, 2011, 15:34 |
|
#6 |
New Member
Jindo
Join Date: Mar 2011
Location: Germany
Posts: 25
Rep Power: 15 |
thank Kent for your interest to my topic !
I copied the alpha1, alpha1.org,p_rgh, U files form a damBreak/0 directory and to change the boundary conditions. I also copied the fvSolution and fvSchemes files from the damBreak case into the new case. However, appeared some errors Code:
--> FOAM FATAL IO ERROR: keyword SIMPLE is undefined in dictionary "/home/phucdaigia/OpenFOAM/root-1.7.1/run/tutorials/basic/scalarTransportFoamB/pitzDaily/system/fvSolution" file: /home/phucdaigia/OpenFOAM/root-1.7.1/run/tutorials/basic/scalarTransportFoamB/pitzDaily/system/fvSolution from line 22 to line 58. From function dictionary::subDict(const word& keyword) const in file db/dictionary/dictionary.C at line 456. FOAM exiting |
|
August 4, 2011, 10:32 |
|
#7 |
Senior Member
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 219
Rep Power: 21 |
Inlet on alpha1 should be:
type fixedValue; value uniform 1; and for U you need to specify a inlet flow velocity--right now it is (0 0 0). As for your error message, what solver are you trying to run? You should be running interFoam (but from the error message I am guessing you are not) which means in your system/fvSolution file it should say "PISO" where it now says SIMPLE. You should just copy the fvSolution, fvSchemes, and controlDict files from the damBreak tutorial for interFoam. You will also need the files from constant there too (transportProperties, turbulenceProperties, g). Hope this helps. |
|
August 9, 2011, 03:39 |
|
#8 |
New Member
Jindo
Join Date: Mar 2011
Location: Germany
Posts: 25
Rep Power: 15 |
Thank for your help ! I did as your request and received this result. However, I haven't seen any change of the free surface ?
Please, You can help me ? |
|
August 11, 2011, 17:07 |
|
#9 |
Senior Member
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 219
Rep Power: 21 |
Hi,
First of all, what are you plotting in your attached results? Looks like the velocity or pressure field not the volume fraction field (alpha). Also, unless you sent me an older version of the case, you did not make the changes I suggested. Here is what you need to do: - copy fvSolution, fvSchemes, and transportProperties from the damBreak tutorial for interFoam - for your setFieldsDict, change the patch for alpha1 to something useful such as box (-1 0 -1) (0 1 1);which will patch alpha1 into the inlet section - fix 0/p_rgh so it has frontAndBack instead of defaultFaces - I would also set 0/U on the inlet to be something smaller say (1 0 0) instead of 10 This will work with interFoam. I have tried it and attached is an animation of the results out to t=0.75s. As you can see, the outlet BC is a little wonky--basically, your outlet is not an outlet, but a wall and so stuff is flowing up the wall and out the top (never to return...). Good luck! |
|
August 11, 2011, 23:59 |
|
#10 |
New Member
Jindo
Join Date: Mar 2011
Location: Germany
Posts: 25
Rep Power: 15 |
Hi Kwardle,
I user OF 1.7.1. I sent you sent me an older version of the case, and my result was run as above. thanks ! |
|
August 12, 2011, 09:29 |
|
#11 |
Senior Member
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 219
Rep Power: 21 |
I tried this with interFoam in 1.7.x and see you are still missing PISO in fvSolutions which means you haven't made all the changes. Please see my previous post. This tells you exactly what changes you need to make to get this working with interFoam. Also, you will want to patch in alpha1 using setFields as I mentioned above so that the solution starts with a little liquid inside the inlet BC--if you don't do this, sometimes you can get screwy startup.
|
|
August 15, 2011, 05:22 |
|
#12 |
New Member
Jindo
Join Date: Mar 2011
Location: Germany
Posts: 25
Rep Power: 15 |
Hi kwardle !
I run the solver with interFoam, and the result appeared free surface. Thank for your help and Thank you very much ! PhucHuynh |
|
September 7, 2011, 13:29 |
|
#13 |
Member
|
Dear kwardle, Hi
thanks for your help in advance. I really learn a lot from your posts. I want to know how I can simulate free surface flow in circular pipe. What changes I should implement in setFieldDict to achieve this? Is there any files I should change( e.g. inlet in boundary field)? |
|
September 8, 2011, 03:49 |
|
#14 | |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24 |
Quote:
|
||
September 8, 2011, 07:31 |
free surface flow in pipe
|
#15 |
Member
|
Hi nima
Before involving in the funkySetfField I want to know how I can model free surface flow? I successfully solved the problem in this discussion. but I couldn't make free surface flow for this specific problem. what should I do in this smple 2D problem? |
|
September 8, 2011, 15:04 |
|
#16 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24 |
whats ur mean how?
for simulation of free surface flow, if you use interFoam, actually u are going to simulate a two phase flow and track interface between them. interFoam uses VOF method, in this method a scalar function (alpha) defines each phase! dam break case is discussed above can be found in tutorials, what else do u like to know? |
|
September 8, 2011, 15:46 |
free surface flow boundary condition
|
#17 |
Member
|
Dear nima
I didn't state my question clearly. I mean how i can change the inlet boundary condition to have free surface flow in pipe. It's better to see this picture. I intend to model it. |
|
September 8, 2011, 16:28 |
|
#18 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24 |
first
1) set up ur simulation geometry ( pipe and internal barrier) 2) for inlet : U : fixedValue P : zeroGradient alpha: fixedValue 0.5 or nonuniform with groovyBC for wall : U : fixedValue uniform (0 0 0) P : zeroGradient or bouyant pressure alpha : zeroGradient for Outlet: U : zero Gradient or outletInlet P : fixedValue alpha : zeroGradient 3) you can initialize field in time zero with funkySetFields |
|
September 12, 2011, 01:34 |
Outlet Pressure?
|
#19 |
Member
|
Dear Nima, Hi
I've done what you said for the case discussed in this thread ( two phase flow with the geometery of Pitzdaily problem). Fortunately It worked but I think pressure outlet for my case is not fixed value. The pressure above the surface in the whole system is atmospheric pressure. Viewing the results near the outlet confirms this claim. So what should I do? Should I implemet hydrostatic pressure? How? FS2-74.jpg FS2-82.jpg |
|
September 12, 2011, 09:56 |
|
#20 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24 |
use bouyantPressure in out let!
i guess it will consider the variation of pressure due to gravity direction! but im not sure if it does not work you can implement it easily with groovyBC. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Free Surface Ship Flow | timfranke | OpenFOAM Running, Solving & CFD | 322 | March 3, 2021 09:04 |
Superlinear speedup in OpenFOAM 13 | msrinath80 | OpenFOAM Running, Solving & CFD | 18 | March 3, 2015 05:36 |
free surface around a ship hull | Stephy | OpenFOAM Running, Solving & CFD | 12 | April 24, 2012 01:12 |
Porous media in free surface application | chiggins | OpenFOAM Running, Solving & CFD | 0 | July 3, 2008 11:25 |
Modeling Free Surface Flows | Elliot Schwartz | Main CFD Forum | 5 | August 25, 1998 21:03 |