|
[Sponsors] |
September 14, 2011, 13:10 |
inletOutlet example application
|
#1 |
Member
Rui Vizinho de Oliveira
Join Date: Sep 2011
Posts: 31
Rep Power: 15 |
Hello all, I'm new to openFoam and I need help besides that provided by the openFoam tutorials and UserGuide.
Can I have an example on how to apply an inletOutlet boundary condition on a far field like zone in order to analyse an airfoil? The files concerning this boundary condition are pressure "p" and velocity "U" at /0 folder. Best regards |
|
September 15, 2011, 04:54 |
|
#2 |
Senior Member
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 21 |
for something far field, take a look at the motorbike example under .../tutorials/simpleFoam/motorBike . It is similar to simulating an airfoil, but in this case you are using a motor bike in a wind tunnel so to say.
__________________
~roman |
|
September 15, 2011, 05:56 |
|
#3 |
Member
Rui Vizinho de Oliveira
Join Date: Sep 2011
Posts: 31
Rep Power: 15 |
Thank you romant !
B.r. Rui |
|
September 28, 2011, 14:23 |
|
#4 |
Member
Miles
Join Date: Sep 2011
Posts: 48
Rep Power: 15 |
Hi
I rebound on this question because I am a bit confused: in this tuto outletinlet is written: outlet { type inletOutlet; inletValue uniform (0 0 0); value $internalField; } Does that means: - if the velocity is directed inwanrd the domain, the velocity value will be set to zero - if it is directed outward the domain velocity is set to the internalfield value (I guess this is the value in the cell neigbouring the boundary face) I was under the impression that this BC was made to fix value to zeroGradient if the flow was going outward. So I do not understand why two values are given. Thanks |
|
September 28, 2011, 16:36 |
|
#5 |
Senior Member
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 21 |
Hej,
the mention of the internal field means that it is set to the original value that is stated under internal field at the beginning of the file. it is part of the macro substitution system of OpenFOAM. the value behind the keyword "internalField" at the beginning of the input file, can be used at any position by stating $internalField , this will be substituted at the call of the file and when written back into a file after the start file it will be the value that is stated at the internalValue field. as an example Code:
internalField uniform (0 0 0); outlet { type inletOutlet; inletValue uniform (0 0 0); value $internalField; } Code:
internalField uniform (0 0 0); outlet { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); }
__________________
~roman |
|
September 28, 2011, 17:14 |
|
#6 | |
Member
Miles
Join Date: Sep 2011
Posts: 48
Rep Power: 15 |
Hi,
thanks for your detailed answer. There are a few things that I still don't get. Quote:
- if it goes outward it would be a zerogradient set up? So why do you specify a value? - Do you know if there is any way to fix the value at a boundary face from to the one calculated in the neighbouring cell? Best regards, Miles |
||
September 28, 2011, 17:24 |
|
#7 |
Senior Member
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 21 |
i am not quite sure. i usually use this condition for outlet if i don't know if i have backflow. in this case i get inflow but not forced, but just drawn in by pressure differences.
your second question, it should be something like zeroGradient, since this will set the same value on the boundary as is in the neighboring cell.
__________________
~roman |
|
September 29, 2011, 10:45 |
|
#8 |
Member
Rui Vizinho de Oliveira
Join Date: Sep 2011
Posts: 31
Rep Power: 15 |
I think there should be a little more detail in the description of the BC functions, since there is so much people with the same doubts about what is the meaning of this particular BC or that BC, it should be included a little explanation of what these BC do...
Best regards. |
|
September 29, 2011, 13:12 |
|
#9 |
Member
Miles
Join Date: Sep 2011
Posts: 48
Rep Power: 15 |
Sorry guys
I am struggling on another subject (installation off SWAK4FOAM actually) I have read various things. Let's take a domain with an inlet_surf and an outlet_surf. We try to set P and U boundary conditions! inlet_surf { type inletOutlet; inletValue uniform (5 0 0); value uniform (0 0 0); } if the velocity goes inward (i.e. from the surface to the domain) the value (5 0 0) will be applied to the velocity vector if the velocity goes outward (i.e. from the domain to the surface) the velocity gradient in the normal direction to the face will be set to 0 let's now take the outlet surface outlet_surf { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } if the velocity goes inward (i.e. from the domain to the surface) the value (0 0 0) will be applied to the velocity vector if the velocity goes outward (i.e. from the domain to the surface) the velocity gradient in the normal direction to the face will be set to 0 For the pressure we want the exact opposite effect. So in order not to get confused with directions for outlet_surface one should better use a outletInlet BC. outlet_surf { type outletInlet; outletValue uniform 0; value uniform 0; } So if velocity goes outward at the exit (from the domain to the surf) the value 0 will be set to the pressure. Otherwise the normal gradient will be set to zero. This is what I have understood so far. A confusing thing is that in the usergude it is written: “inletOutlet Switches U and p between fixedValue and zeroGradient depending on direction of U” but this Bc works also for k or esplion etc... Please if you do not agree with my post do not hesitate to correct it. Than I will move it to a new poste “inletoutlet for dummies”. So if any beginner has the same concern he will have a quick and easy answer! Regards, Miles |
|
October 3, 2011, 07:51 |
|
#10 |
Member
Rui Vizinho de Oliveira
Join Date: Sep 2011
Posts: 31
Rep Power: 15 |
Superb Miles Davis !
But what is the meaning of "value" then ? What is it for? We have the inletValue to determine what happens when the velocity goes inward (i.e. from the surface to the domain) in the case of a inletOutlet B.C. and ZeroGradient is applied when the inverse happens. This "value" has some usefulness ? And what is the difference between inletOutlet and outletInlet B.C.'s ? Best regards Rui Oliveira |
|
October 3, 2011, 10:36 |
|
#11 | ||
Member
Miles
Join Date: Sep 2011
Posts: 48
Rep Power: 15 |
Quote:
Since I am still a OF dummy I am gonna quote the OF wiki "value: is used if no "valueExpression" is given. value: is used for the first timestep/iteration if "valueExpression" is specified. If "valueExpression" is specified without setting "value", 0 is taken for the first timestep/iteration. (might cause an fpe)" So "value" should be called "defaultvalue" or "initializing value" instead! Quote:
- inletOultet you test if the velocity is going inward (phi<0) and in this case you apply the inlet value you have specified. - outletInlet, is is the opposite: you test if the velocity is goint outward (phi>0) and in this case you apply the outlet specified value. Tell me if it is clear for you. so we can call the post "Inlet/oulet for dummies" Miles P.S.: Sorry to have applied the rule number one to lose somebody: introducing a new term in an explanation without any definition. phi is the flow rate through a face. so it is the dot product of vector velocity and face normal vector. In OF the normal vector for a boundary face points outward the domain. so if phi=vel*normal <0 : velocity is going inward the domain if phi=vel*normal>0: velocity is going outward the domain |
|||
November 12, 2011, 21:05 |
|
#12 |
Member
Shawn
Join Date: Oct 2011
Posts: 56
Rep Power: 15 |
I was thinking how this would work if I had a single circular (assume 2D) boundary and applied this conditon to it.
U: circularboundary { type inletOutlet; inletValue uniform (5 0 0); value uniform (0 0 0); } p: circularboundary { type outletInlet; outletValue uniform 0; value uniform 0; } So I would have a fixed velocity on some "inlet" cells and zero gradient on "outlet" cells; and fixed pressure some "outlet" cells and zero gradient on some "inlet" cells? I suppose this could be very confusing for the solver, and I don't know if these conditions are applied piecewise to each cell face or to the entire boundary as a whole. I can see that there would be problems where adjacent cells could have an inlet conditon and a zero gradient condition. |
|
December 14, 2012, 02:14 |
|
#13 | |
New Member
Qiang Zhou
Join Date: May 2010
Location: Eindhoven University of Technology
Posts: 28
Rep Power: 16 |
Quote:
Here is what I understand for inletOutlet BC as below. 1. The meaning for that “inletOutlet Switches U and p between fixedValue and zeroGradient depending on direction of U” is choosing fixedValue for p and U when the direction of U is inward (inlet), and zeroGradient when the direction of U is outward (outlet). 2. As for the outletInlet, the positions of fixedValue and zeroGradient is switched, e.g. fixedValue for p and U when the direction of U is outward (outlet). 3. inletValue is used to express the fixedValue. 4. Value is used as the initial value of BC at time 0. |
||
June 8, 2016, 05:35 |
|
#14 | |
New Member
Join Date: Mar 2016
Posts: 15
Rep Power: 10 |
Quote:
It's been a month that I am struggling with this BC and I think you are totally right. For a circular boundary some cells would have fixed velocity and some cells would have zero gradient boundary condition. Do you still agree with this statement? |
||
June 10, 2017, 17:57 |
:)
|
#15 |
Member
jeanpinto24@hotmail.com
Join Date: Feb 2017
Posts: 44
Rep Power: 9 |
Very good explanation!
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is Playstation 3 cluster suitable for CFD work | hsieh | OpenFOAM | 9 | August 16, 2015 15:53 |
inletOutlet b.c. | vaina74 | OpenFOAM Running, Solving & CFD | 5 | August 26, 2010 12:23 |
Others library application for OpenFoam 1.5 in Windows | lcnmy | OpenFOAM Installation | 2 | July 21, 2010 21:54 |
grep -r inletOutlet | smillion | OpenFOAM | 5 | May 31, 2010 06:21 |
RasInterFoam STRANGE RESULTS AT BOUNDARY | kumar2 | OpenFOAM Running, Solving & CFD | 8 | March 24, 2008 19:38 |