Some Problems about the Boundary Conditions in OpenFoam
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 
Hi Why,
there are many types of BC, right. But they are all set in the fieldvariables in your first timedictionary. A simple pipe for example would have a inlet, outlet and fixed walls, when you defined the boundaries right during meshgeneration. In the timedictionary /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 subdictionary 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 OFUserGuide chapter 5.2 especially page U133 bye Axel 
Hi,Axel.
Thank you for your help. However, I tried to set new boundary conditions (BCs) again and recalculate 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 
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 
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 pressureboundary 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 datfile. 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 
normal velocity
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. 
fixed value + alternating BC boundary condition = ??
Hi Folks,
i am running a case with reactingFoam. I use steady BC, but the BC vary with each time Step :eek:.. WHHYYY ?? My BC are: Code:
pressure: 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.31962e20 0.308472 65.1918 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 ! 
hi openfoamers
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? 
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?! } 
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) 
urgent help
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 2D symmetric nozzle which surface has been created in StarCD 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 
Hi to all
Someone know how velocity is obtained from pressure in pressureInletOutletVelocity? thank to all 
Boundary condition for sphere in OpenFOAM
1 Attachment(s)
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 Xdirection 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 
normal velocity
Is there possibility in openfoam to specify outlet velocity as normal ?

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. 
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 Best regards, Bruno 
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? 
Quote:
Code:
convertToMeters 0.000001; Code:
( 
changed the data file as suggested and still tcath is fixed at the initial value/ value in groovyBC.
:( 
OK, run this command:
Code:
checkMesh constant Code:
Checking geometry... 
All times are GMT 4. The time now is 18:29. 