|
[Sponsors] |
Some Problems about the Boundary Conditions in OpenFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 4, 2010, 10:29 |
Some Problems about the Boundary Conditions in OpenFoam
|
#1 |
Member
Join Date: Jun 2009
Posts: 34
Rep Power: 17 |
Dear all,
How many kinds of boundary conditions (BCs) in OpenFoam? What are they? And how can I denote them in a BCs file of OpenFoam? The above are some general problems I want to know. However, I faced a specific problem in practice. When I calculated the 2D flow over a 2D cylinder, I did not how to denote the boundary conditions for the cylinder wall and the external boundary which enclose the physical domain, though I knew the meaning of these BCs mathematically and how to set them in commercial software. In particular, how can I set pressure BC for a wall in OpenFoam, if there is no need to set value pressure or pressure gradient to the wall in advance? And how can I set velocity BC for a pressure outlet boundary, if there is no need to set value velocity to it in advance? Thanks in advance! Why |
|
January 5, 2010, 16:56 |
|
#2 |
New Member
Axel Tietjen
Join Date: Dec 2009
Location: Hamburg, Germany
Posts: 19
Rep Power: 17 |
Hi Why,
there are many types of BC, right. But they are all set in the fieldvariables in your first time-dictionary. A simple pipe for example would have a inlet, outlet and fixed walls, when you defined the boundaries right during mesh-generation. In the time-dictionary /0 must be for example the file of the pressure variable: /0/p In that file there is a entry for the initial state: internalField uniform 100000;and a sub-dictionary for the boundaries: boundaryFieldFor the velocity at the inlet, there is a BC called pressureInletOutletVelocity which calculates the velocity depending on the pressure. Take a look at the OF-UserGuide chapter 5.2 especially page U-133 bye Axel |
|
January 7, 2010, 07:48 |
|
#3 |
Member
Join Date: Jun 2009
Posts: 34
Rep Power: 17 |
Hi,Axel.
Thank you for your help. However, I tried to set new boundary conditions (BCs) again and re-calculate my problem with icoFoam solver. In these cases, OpenFoam could not conduct calculation correctly. I read the chaper you suggested, and I have some questions. Firstly, there is one kind of boundary, on which mathematically just one quantity is needed to set, for example, just velocity is needed to set and pressure will be calculated by the velocity field. How can I set this kind boundary condition for pressure and velocity boundary files in OpenFoam, i.e. p file and U file? The second question is about the selection of the solver in OpenFoam. Do you think I am right if I choose the icoFoam solver for the problem of fluid flow over a 2D cylinder, which is a classical external fluid flow problem? If not, which one solver would you like to suggest to me? Thanks. Why |
|
January 7, 2010, 13:10 |
|
#4 |
Member
Join Date: Dec 2009
Posts: 46
Rep Power: 16 |
yes , me too , i have the same problem ,, I have a velocity data and i want to put them in the inlet of my domain as a boundary condition
any one can help thanks |
|
January 7, 2010, 22:57 |
|
#5 |
New Member
Axel Tietjen
Join Date: Dec 2009
Location: Hamburg, Germany
Posts: 19
Rep Power: 17 |
Hello Why,
I don't know if it would help a lot, but I show you the way I solved it at my problem: A chamber with only one inlet, where the pressure raises over time. The pressure-boundary is in the file "p" There used the timeVaryingUniformFixedValue to get the pressure growing over time. It loads the file "inlet_p.dat", which I created in this syntax:dimensions [1 -1 -2 0 0 0 0]; This file needs a strikt format, I think. So don't insert extra spaces or something like that. Just time and pressure.( The keyword outOfBounds says what to do when you enter a timestep which is not listet in the dat-file. There "warn" will hold the last value of the specified range and give you a warning message. Other options are error, clamp and repeat. Then I defined my "U"-file in this way: ThepressureInletOutletVelocity can also be used when the flux can change direction, when you are shure that you will always have a inflow, the pressureInletVelocity would do it either.dimensions [0 1 -1 0 0 0 0]; I don't know why there must be specified a value for the inlet, because it's calculated, but it won't run without. I hope I was able to point you in the right direction about that. Good luck! Axel |
|
February 8, 2010, 07:35 |
normal velocity
|
#6 |
Member
hamdi
Join Date: Mar 2009
Posts: 75
Rep Power: 17 |
hello,
I try to determine the normal velocity at each point on the boundary which declared as zerogradient, how can I do that? Thanks in advance. |
|
February 8, 2010, 11:57 |
fixed value + alternating BC boundary condition = ??
|
#7 |
Senior Member
Join Date: Dec 2009
Posts: 112
Rep Power: 17 |
Hi Folks,
i am running a case with reactingFoam. I use steady BC, but the BC vary with each time Step .. WHHYYY ?? My BC are: Code:
pressure: inlet { type fixedValue; value uniform 100000; } T: inlet { type fixedValue; value uniform 296; } U: inlet { type fixedValue; value nonuniform List<vector> 100 ( (0 0 67.552) (0 0 67.77) (0 0 67.035) (0 0 65.8686) (0 0 64.7974) (0 0 63.5496) (0 0 61.7962) (0 0 59.7163) (0 0 57.5885) (0 0 54.9667) (0 0 50.2231) (0 0 36.2949) (0 0 0.315833) (0 0 6.57834) (0 0 7.44999) (0 0 7.96628) (0 0 8.26225) (0 0 8.49278) (0 0 8.65498) (0 0 8.76455) (0 0 8.83736) (0 0 8.88867) (0 0 8.932) (0 0 8.97775) (0 0 9.03216) (0 0 9.0771) (0 0 9.2) (0 0 9.2) . . . ) ; } Species: C3H8 for r/R<1. "AIR" for r/R>1. When I check velocity with sample i get different results for each timstep: (I use sample from (0 0 0) to (0 0.15 0) which should be exactly my (2D) inlet) The Geometry is a box, with 2 adverce faces asigned the inlet and outlet, 2 adverse faces are declared empty, one face assigned symmetry and the other "wall"(here all BCs are assiged zeroGradient) One of my favourite results: (location Ux Uy Uz) Code:
0 2.31962e-20 -0.308472 65.1918 0.00015015 3.18149e-21 -0.0180087 67.4434 0.0003003 -9.95544e-36 1.46518e-16 67.481 0.00045045 0 0 66.9175 0.000600601 0 0 66.1129 0.000750751 0 0 65.2443 0.000900901 0 0 64.3746 0.00105105 0 5.15872e-16 63.3375 0.0012012 0 -3.35738e-16 62.151 0.00135135 0 -3.35738e-16 60.8089 0.0015015 0 0 59.3887 0.00165165 0 -6.66706e-16 57.9029 0.0018018 0 1.33341e-15 56.3505 0.00195195 0 0 54.0607 0.0021021 0 0 50.486 0.00225225 0 0 44.7908 0.0024024 0 0 32.4953 0.00255255 0 0 18.0146 0.0027027 0 0 9.53493 0.00285285 0 0 3.99707 0.003003 0 0 5.9627 0.00315315 0 0 7.18547 0.0033033 1.54684e-34 5.29596e-15 7.55476 0.00345345 0 0 7.83008 0.0036036 0 0 8.0389 0.00375375 0 0 8.19776 0.0039039 0 0 8.32852 0.00405405 -2.80758e-34 -4.26399e-15 8.4364 0.0042042 -2.80758e-34 -4.26399e-15 8.53066 0.00435435 2.75369e-34 -1.57786e-15 8.60796 0.0045045 0 0 8.67098 0.00465465 2.73743e-34 2.24416e-15 8.72545 0.0048048 0 0 8.76632 0.00495495 -1.36664e-34 -1.67595e-15 8.80503 0.00510511 0 0 8.8319 0.00525526 0 0 8.85877 0.00540541 0 0 8.87967 0.00555556 -2.68723e-34 5.9232e-15 8.89947 0.00570571 -2.61375e-34 7.59204e-15 8.91845 0.00585586 -2.61375e-34 7.59204e-15 8.93644 0.00600601 0 0 8.95444 0.00615616 -3.70648e-37 6.9118e-15 8.97396 0.00630631 -3.70648e-37 6.9118e-15 8.99351 0.00645646 0 0 9.01273 0.00660661 0 0 9.03147 0.00675676 0 0 9.05022 0.00690691 4.66049e-34 -3.62717e-15 9.07803 0.00705706 0 0 9.10858 0.00720721 0 0 9.13892 0.00735736 4.50919e-34 1.7008e-15 9.16062 0.00750751 0 0 9.18232 0.00765766 2.14111e-34 1.03588e-16 9.2 0.00780781 0 0 9.2 0.00795796 0 0 9.2 0.00810811 0 0 9.2 0.00825826 0 0 9.2 0.00840841 0 0 9.2 0.00855856 -4.06648e-34 5.09e-15 9.2 0.00870871 0 0 9.2 0.00885886 0 0 9.2 ..... .... .... 0.142492 0 0 9.2 0.142643 0 0 9.2 0.142793 0 0 9.2 0.142943 0 0 9.2 0.143093 0 0 9.2 0.143243 0 0 9.2 0.143393 0 0 9.2 0.143544 0 0 9.2 0.143694 0 -1.13922e-14 9.2 0.143844 0 0 9.2 0.143994 0 0 9.2 0.144144 0 0 9.2 0.144294 0 0 9.2 0.144444 0 0 9.2 0.144595 0 0 9.2 0.144745 0 -1.13922e-14 9.2 0.144895 0 -0.0605795 6.54958 0.145045 0 -0.130931 3.47163 0.145195 0 -0.201282 0.393675 0.145345 0 -0.271634 -2.68428 0.145495 0 -0.341985 -5.76223 0.145646 0 -0.412336 -8.84018 0.145796 0 -0.482688 -11.9181 0.145946 0 -0.553039 -14.9961 0.146096 0 -0.623391 -18.074 0.146246 0 -0.693742 -21.152 0.146396 0 -0.764093 -24.2299 0.146547 0 -0.834445 -27.3079 0.146697 0 -0.904796 -30.3858 0.146847 0 -0.975147 -33.4638 0.146997 0 -1.0455 -36.5418 0.147147 0 -1.11585 -39.6197 0.147297 0 -1.1862 -42.6977 0.147447 0 -1.25655 -45.7756 0.147598 0 -1.3269 -48.8536 0.147748 0 -1.39726 -51.9315 0.147898 0 -1.46761 -55.0095 0.148048 0 -1.53796 -58.0874 0.148198 0 -1.60831 -61.1654 0.148348 0 -1.67866 -64.2433 0.148498 0 -1.74901 -67.3213 0.148649 0 -1.81936 -70.3992 0.148799 0 -1.88972 -73.4772 0.148949 0 -1.96007 -76.5551 0.149099 0 -2.03042 -79.6331 0.149249 0 -2.10077 -82.711 0.149399 0 -2.17112 -85.789 0.14955 0 -2.24147 -88.8669 0.1497 0 -2.31182 -91.9449 0.14985 0 -2.38217 -95.0228 It does not go along with my understanding of "fixedValue" used for BC. When I use calcMassflow on that Patch i get corresponding(same cracyness) results. can anyone give me a hint on that, plz!? regards ! |
|
February 6, 2012, 12:58 |
hi openfoamers
|
#8 |
Member
|
i have doubt in my problem like that
I have pipe flow problem ok so i enter the fluid inside the pipe so i give the velocity inlet values now i know that at inlet pressure is 1 pascal so and at the outlet pressure outlet condition is there so plz tel me at inlet how can i set the pressure? |
|
February 28, 2012, 10:28 |
|
#9 | |
New Member
Join Date: Sep 2011
Posts: 10
Rep Power: 15 |
Quote:
My case is i know inlet T, P...also outlet P.... Hoever i want to let the openfoam to calculate the Inlet Velocity ...I tried to use oulet { type pressureInletOutletVelocity; value uniform (0 0 0); } but i dont know if this information is enough?! } Last edited by yipiyaya8; March 8, 2012 at 17:45. |
||
December 23, 2012, 04:34 |
|
#10 | |
New Member
Gregory Paladin
Join Date: Jul 2012
Posts: 10
Rep Power: 14 |
Hi foamers !
Sorry to dig up this post, but i'm facing the same problem here.. I have a flame in the open, where i've imposed inlet velocity (because i have the velocity datas) and outlet pressure (atm. pressure, because it's in the open) At first i've put a zeroGradient condition on the outlet velocity, but my domain is too short so the solver can't respect both conditions, a zerogradient velocity and a pressure that still have a gradient at the outlet.. So it seems like i also have to let openfoam calculate outlet velocity based on the pressure gradient at the outlet. Anyway, does anyone knows why we can't just put a "calculated" type for the outlet velocity and (0 0 0) for initial value? I get Quote:
I've tried type pressureInletOutletVelocity and pressureInletVelocity types, but it doesn't change anything. (I use OF 2.0.x) Last edited by paladin; December 23, 2012 at 05:52. |
||
January 14, 2013, 01:15 |
urgent help
|
#11 |
Senior Member
Baris (Heewa)
Join Date: Jan 2013
Location: Japan
Posts: 130
Rep Power: 13 |
Hi eveybody,
I am the new user of the openFoam and nowadays tried to learn how i can use it. For one example i have used multiphase solver and apllied it to the 2-D symmetric nozzle which surface has been created in Star-CD and converted to OpenFoam. My question is that how can change the velocity values. You can see P and V BC are set as follow. Thanks in advance for help. object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0]; internalField uniform 300e5; boundaryField { Default { type totalPressure; U U; phi phiv; rho rho; psi none; gamma 1; p0 uniform 2e5; } Default_5 { type fixedValue; value uniform 1e5; } Default_10 { type zeroGradient; } } object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0]; internalField uniform (0 0 0); boundaryField { Default { type zeroGradient; value uniform (0 0 0); } Default_5 { type zeroGradient; value uniform (0 0 0); } Default_10 { type fixedValue; value uniform (0 0 0); } Default corresponds to Inlet default_5 ==> outlet Default?10==> walls |
|
April 11, 2013, 12:31 |
|
#12 |
Member
Join Date: Mar 2013
Posts: 98
Rep Power: 13 |
Hi to all
Someone know how velocity is obtained from pressure in pressureInletOutletVelocity? thank to all |
|
May 16, 2014, 13:55 |
Boundary condition for sphere in OpenFOAM
|
#13 |
New Member
sammasum
Join Date: May 2014
Posts: 5
Rep Power: 12 |
Hi,
I am trying to solve the sphere problem in the attachment. I have solved the problem with a fixedValue at the boundary but do not know what to do with this boundary conditions. The challenge in the boundary is the direction of the normal vector. if it is in the positive X- direction then have a value of +1 but if it in the negative X-direction then the value is -1. Similarly for Y and Z axis. FYI: The sphere is created from an .stl file and using blockMesh for a hexagon and the snappyHexMesh has been used to generate the mesh. Desperatly looking for help thanks claire |
|
July 8, 2014, 07:17 |
normal velocity
|
#14 |
New Member
Ireneusz Czajka
Join Date: Nov 2013
Posts: 6
Rep Power: 13 |
Is there possibility in openfoam to specify outlet velocity as normal ?
|
|
October 23, 2015, 07:41 |
|
#15 |
Member
Sandra
Join Date: Oct 2014
Posts: 58
Rep Power: 12 |
Did you get to figure this out?
I would like to set BC that are a function of space. Is there a way to set the BC with a function such that I do not have to write out the value at each mesh size. In other words, I want the code to be reusable. Thanks. |
|
October 31, 2015, 11:54 |
|
#16 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
@Sandra: I'm going to use part of the PM you sent me to answer your question, since the two topics are related: Quote:
Code:
tcath(pos().y) Code:
fields (y tc); Best regards, Bruno
__________________
|
||
October 31, 2015, 12:49 |
|
#17 |
Member
Sandra
Join Date: Oct 2014
Posts: 58
Rep Power: 12 |
I tries po().y and it didn't help.
IN my polyMesh, I have "convert to microns" but I input my data in meters just as in the blockMeshDict. Does it mean that I should use microns in my data file? |
|
October 31, 2015, 13:36 |
|
#18 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Quote:
Code:
convertToMeters 0.000001; Code:
( (0e-6 2.5) (25e-6 3) (35e-6 4) ) |
||
October 31, 2015, 17:46 |
|
#19 |
Member
Sandra
Join Date: Oct 2014
Posts: 58
Rep Power: 12 |
changed the data file as suggested and still tcath is fixed at the initial value/ value in groovyBC.
:-( |
|
October 31, 2015, 17:52 |
|
#20 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
OK, run this command:
Code:
checkMesh -constant Code:
Checking geometry... Overall domain bounding box (0 0 0) (0.1 0.1 0.01) |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Implementation of boundary conditions for FVM | Tom | Main CFD Forum | 7 | August 26, 2014 06:58 |
symmetry boundary conditions in cfx | lost.identity | CFX | 41 | May 22, 2013 08:21 |
LES of channel with cylic boundary mapping boundary conditions | Thomas Baumann | Siemens | 0 | August 24, 2009 10:53 |
compressible boundary conditions | vivian | Main CFD Forum | 8 | April 24, 2006 07:23 |
Boundary conditions? | Tom | Main CFD Forum | 0 | November 5, 2002 02:54 |