Defining B.C. --> velocity profile
Dear Foamers,
I need to define Driver and Seegmiller velocity inlet profile for backward facing step. How can i write it in 0/U flie? |
Maysmech, groovBC is your friend:
http://openfoamwiki.net/index.php/Contrib_groovyBC but you can write the boundary condition by hand using octave. You have to specify a nonuniform field with one vector per patch face in the boundaryField section of 0/U. In this case you have to know the face center coordinates for each cell and the faces indexes. Faces in the patch are ordered by face indexes, so you have to write the boundary values in the same order. Regards. |
Quote:
your suggestions seems hard labor. is it other way to define B.C? |
Maysmech, there isn't a BC in FOAM that allows to load a profile directly putting the expression, this is the main objective of groovyBC. Because this tools is not included in original FOAM suite, you have to compile it. The other option is valid in all cases too, but more often used in simple ones.
Good luck. |
Quote:
if i want use 2nd option, how should i use it? i have less than 10 data for inlet. and i can expand it for inlet grids which has more than 200 grid with different sizes in excel software. where can i define inlet B.C. only for inlet and what should be its format? other B.C. have standard types(fixed value, symmetry and ...) Best, |
Maysmech, the only difficult thing with the second option is to know of index of patch faces. If the patch is meshed with an structured mesh, it probably be by row or column. For example if you have 20 faces in five rows of 4 faces each one, probably the numbering is 0-3 in the first row, etc.
This difficult appears due mesh info in /constant/polymesh doesn't include cells centers, this info is obtained on the fly at running time. Obviously you can obtain this info writing a simple tool. Supposing you would have only one patch with 2 faces, you have to fill the boundaryField section like this: boundaryField { inlet { type fixedValue; value nonuniform List<vector> 2 ( (0 0 1) (0 0 0.95) ); } } The velocity vector have to be calculated from coordinates and velocity profile function. Regards. |
Hi maysmech and santigo
use command writeCellcenters then use Cycellcenters then give velocity profile as santigo explained this will fix your problem. its bit lengthy process but an easier way. Regards Ambilpur Kiran |
kiran, I didn't know writeCellCentres command, it's good info. Strictly you need to know the faces center coordinates to calculate values in a patch. Is there a commando to do so? What is the other command you mentioned (Cycellcenters)?
Regards. |
Hi santiago
writeCellCenters command will generate three files namely Cx cellcenters, Cycellcenters and Czcellcenters in 0 directory. so in order to give velocity profile u need only Y cell centers so use Cycellcenters file to give the velocity vectors. so the problem is solved Regards Ambilpur Kiran |
Dear Kiran,
thank you very much for your help, The command you told is very useful to know about order, position and coordination of needed cells. i want to define inlet boundary conditions so i think i need boundary face coordinates and finding them becomes hard when grids have different sizes. Is it any idea to find them? |
Kiran
Quote:
Thanx. |
Quote:
|
Quote:
Regards. |
hi maysmech
use that command then it generates three files as i explained earlier. Open CyCellcenters file the scroll down u will find the cellcenters in the inlet, copy those to excel sheet. These are your y distance in the boundary layer equation (you can choose any boundary layer equation accordind to your requirement). (in fact these are the Y locations from the boundary eg from wall ) so simply write the formula(boundary layer equation) in the another column to calculate velocity at that cellcenter. The point where your velocity increases more than free stream or given inlet condition stop there and give the U~=(0.99u). similarly take the cells from bottom reverse the formula then do it(if mesh is same then take same number of cells from bottom if not do as i explained). this is what I can explain you at Maximum level. hope you will try to do this and solve your problem. Regards & Best of Luck Ambilpur Kiran |
I mostly agree, but the cy values bust be taken from inlet boundary, and the results in boundary of U too.
Regards. |
All times are GMT -4. The time now is 12:19. |