CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

InletOutlet condition with arbitrary direction

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   January 24, 2007, 04:43
Default Hi, I'm trying to to set fi
  #1
New Member
 
matteo cerutti
Join Date: Mar 2009
Location: Florence, Tuscany, Italy
Posts: 10
Rep Power: 8
matteoc is on a distinguished road
Hi,

I'm trying to to set fixedvalue/zerogradient depending on an arbitrary direction considered (surfaceScalarField S) and not on the phi direction (as inletOutlet goes)...
How can I say to Foam to take S in stead of phi?

thanks in advance, Matteo
matteoc is offline   Reply With Quote

Old   January 24, 2007, 07:07
Default Add an entry in your inlet out
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,758
Rep Power: 21
hjasak will become famous soon enough
Add an entry in your inlet outlet condition using the keyword phi to specify which field you wish to use as the flux. Thus:

farField
{
type inletOutlet;
value uniform 0;
inletValue uniform 1;
phi S;

}

Enjoy,

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   January 24, 2007, 09:33
Default thanks a lot, Hrvoje best r
  #3
New Member
 
matteo cerutti
Join Date: Mar 2009
Location: Florence, Tuscany, Italy
Posts: 10
Rep Power: 8
matteoc is on a distinguished road
thanks a lot, Hrvoje

best regards, Matteo
matteoc is offline   Reply With Quote

Old   January 25, 2007, 05:30
Default Sorry, an other problem ari
  #4
New Member
 
matteo cerutti
Join Date: Mar 2009
Location: Florence, Tuscany, Italy
Posts: 10
Rep Power: 8
matteoc is on a distinguished road
Sorry,

an other problem arises!

My code needs to update boundary values after the initialization! (iterative procedure within a single time step)

"fixedValue type" allows to overwrite boundary values and solve for the fvMatrix with the new ones, instead of those set in the "0/*" file.

setting "inletOutlet type", as suggested, even if the code updates boundary values before instancianting the fvMatrix, it seems not to use the updated values, but only the "olds" set in the "0/" file!!

I hope u'll understand the problem...
thanks in advance,
Matteo
matteoc is offline   Reply With Quote

Old   July 4, 2007, 04:39
Default Hi Matteo, just read your t
  #5
New Member
 
Peter Lakshmanan
Join Date: Mar 2009
Location: Dortmund, Germany
Posts: 2
Rep Power: 0
pidry is on a distinguished road
Hi Matteo,

just read your thread. If have encountered the same problem. Did you by chance find a solution and if so, would you like to share it?

Thanks in advance.

Peter
pidry is offline   Reply With Quote

Old   February 16, 2011, 02:30
Default
  #6
New Member
 
John Damnson
Join Date: Feb 2011
Posts: 15
Rep Power: 6
umassche is on a distinguished road
I'm trying to change the initial conditions of the cavity model in tutorials and use icoFoam solver. within the velocity file i'm changing both movingwalls type and fixedwalls type to inletOutlet (originally fixedValue) and icoFoam is crashing saying that it is undefined. here is the error message,


Reading field U



--> FOAM FATAL IO ERROR:
keyword inletValue is undefined in dictionary "./case2/0/U::boundaryField::movingWall"

file: ./case2/0/U::boundaryField::movingWall from line 25 to line 26.

From function dictionary::lookupEntry(const word&, bool, bool) const
in file db/dictionary/dictionary.C at line 395.

FOAM exiting

Can you help me?
umassche is offline   Reply With Quote

Old   February 16, 2011, 04:12
Default
  #7
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 12
Bernhard is on a distinguished road
The keyword inletValue is undefined in your 0/U file on the movingWall patch.

The error message is quite clear about that.
Bernhard is offline   Reply With Quote

Old   February 16, 2011, 04:19
Default
  #8
Senior Member
 
Matthias Voß
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 446
Rep Power: 11
mvoss is on a distinguished road
@ummashe
i assume you messed the definition for the patch movingwall and forgot to set the actual value for the inlet.
Should be smth like
inletValue uniform(1 0 0);

And btw. it´s pretty rude to post stuff multiple times asking the same and without regarding to the topic.
Just open a thread on you own topic.

neewbie
mvoss is offline   Reply With Quote

Old   May 31, 2011, 06:49
Default
  #9
New Member
 
Christoph Schwienheer
Join Date: May 2011
Location: Dortmund, Germany
Posts: 1
Rep Power: 0
ChristophS is on a distinguished road
Dear all,

i want to simulate a simple quadratic chamber with one inlet and two possible outlets. While the inflow is constant during the simulation, i want to switch between both outlets periodically.

That means, i have to switch my type of boundary condition for U at the outlets during my simulation between "zeroGradient" (outlet is open) and "fixedValue (= 0,0,0)" (outlet is closed).

I've been reading the post of Matteo about switching between zeroGradient/ fixedValue based on an arbitrary surfaceScalarField (eg. S) by using the inletOutlet Boundary condition.

So i specified the inletOutlet-BC for U and outletInlet-BC for p at the outlets, dependent on S.
Also I implemented into my code to switched S at the outlet boundarys between -1 and 1.
This is the point, were i am not sure if it is correct.

How does the inletOutlet boundary condition really work? Is it correct, that it will set the boundary to zeroGradient, if the flow goes out of the boundary? And does this mean, that the value of the flow field (eg. S or Phi) at this boundary is positive?
And if the flow field is negative, does the boundary condition switch to fixedValue?

The way, i implemented this (by switching S between -1 and 1) does not really close the outlet for S=-1 and open it for S=1 respectively. But it seams to have an influence on the Velocity at the boundary (compared to not manipulated boundaries).

So is it wrong to simply set the values for S to -1 or 1 respectively? Which values would make sense?

Is there another approach to "open" and "close" an outlet during the simulation without using the inletOutlet-BC?

thanks in advance for any help,
Christoph
ChristophS is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inletoutlet rengu OpenFOAM Running, Solving & CFD 7 June 8, 2015 03:02
Arbitrary inflow boundary condition Munikrishna Nagaram Main CFD Forum 0 February 23, 2009 12:03
Velocity Jump at InletOutlet cliffoi OpenFOAM Running, Solving & CFD 0 September 8, 2008 05:34
TwoPhaseEulerFoam and InletOutlet boundary condition hemph OpenFOAM Running, Solving & CFD 10 January 29, 2007 10:47
TwoPhaseEulerFoam and InletOutlet BC hemph OpenFOAM Bugs 0 January 29, 2007 05:57


All times are GMT -4. The time now is 22:20.