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

Pressure outlet boundary condition

Register Blogs Community New Posts Updated Threads Search

Like Tree18Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 23, 2007, 08:42
Default Hi all, I´m intending to do s
  #1
Member
 
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 17
rolando is on a distinguished road
Hi all,
I´m intending to do some turbomachinery calculations.
For that simulations I´m looking for an appropriate outlet boundary condition for the pressure. I´m looking for an alternative to the fixedValue condition.
I know something like a "mean pressure condition" for that kind of problem. Is something like that available in OpenFOAM?
Any other suggestions are welcome too.

Rolando
rolando is offline   Reply With Quote

Old   October 23, 2007, 08:53
Default Yeah, I know what you mean. I
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
Yeah, I know what you mean. I have implemented fixedMeanValue a while back and it behaves much better than "simple" fixed value. You can find it in the dev-version SVN:

fixedMeanValue boundary condition

The setup is straightforward: just add

type fixedMeanValue;
meanValue 3.3;


or similar.

Enjoy,

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

Old   October 23, 2007, 09:07
Default Thanks a lot Hrvoje, it seems
  #3
Member
 
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 17
rolando is on a distinguished road
Thanks a lot Hrvoje,
it seems to be what I am looking for.

Rolando
rolando is offline   Reply With Quote

Old   December 14, 2007, 14:22
Default Hrv, what exactly is the advan
  #4
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
Hrv, what exactly is the advantage when we use this 'fixedMeanValue' B/C instead of a constant static pressure at the outlet?

Thanks!
msrinath80 is offline   Reply With Quote

Old   December 15, 2007, 10:13
Default The advantage of fixedMeanValu
  #5
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
The advantage of fixedMeanValue boundary condition is a much smaller flow distortion on the boundary. Basically, you get the same behaviour as the fixed pressure outlter, but the local variation next to the boundary around the prescribed mean is picked up from the cells next to it.

If you want to see the effect, try any flow with the vortices leaving the domain through a pressure boundary, a stratified flow or something similar.

I now use fixed mean pressure almost exclusively in "real life" runs.

Enjoy,

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

Old   December 15, 2007, 15:37
Default Thanks Hrv. I check the differ
  #6
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
Thanks Hrv. I check the difference in my vortex shedding simulations and get back to you.
msrinath80 is offline   Reply With Quote

Old   December 20, 2007, 16:04
Default Hi Hrv, I added the fixedMe
  #7
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
Hi Hrv,

I added the fixedMeanValue folder from the svn repo onto my OF 1.4.1 installation and rebuilt libfiniteVolume.so. It went without any problems. However, when ever I try to use the B/C, I get this error:

--> FOAM FATAL ERROR :
gradientInternalCoeffs cannot be called for a defaultFvPatchField (actual type fixedMeanValue)
on patch poutlet of field p in file "/home/madhavan/square_cylinder/re1002d_refined_fmvbc/0/p"
You are probably trying to solve for a field with a default boundary condition.

From function defaultFvPatchField<type>::gradientInternalCoeffs( ) const
in file fields/fvPatchFields/basic/default/defaultFvPatchField.C at line 694.

FOAM exiting

Is there something else that I need to build?
msrinath80 is offline   Reply With Quote

Old   December 20, 2007, 16:29
Default You didn't rebuild it properly
  #8
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
You didn't rebuild it properly or you mis-spelled the name - the code picks up the default patch field instead.

Edit the ~/.OpenFOAM-1.4.1-dev/controlDict and set:

disallowDefaultFvPatchField 1;

If the code fails, it will give you the list of available patch fields. fixedMeanValue should be on the list and it probably isn't. For the record, you should have the following entry in Make/files:

$(derivedFvPatchFields)/fixedMeanValue/fixedMeanValueFvPatchFields.C

Also, check that the file actually compiled - touch it and try again. Then check you are picking up the right library... etc etc.

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

Old   December 20, 2007, 16:52
Default Problem solved! Thanks a lot H
  #9
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
Problem solved! Thanks a lot Hrv. I added the entry in Make/files and did a wmake libso finiteVolume and all was well
msrinath80 is offline   Reply With Quote

Old   May 11, 2009, 08:57
Default Question
  #10
New Member
 
parham momeni
Join Date: Mar 2009
Location: glasgow, uk
Posts: 25
Rep Power: 16
mcjicpm2 is an unknown quantity at this point
Hi
1-I did copy the files in this directory:
/home/sf/OpenFOAM/sf-1.5/applications/fixedMeanValue

2-then I did:

[sf@ls55cb1028 fixedMeanValue]$ wmakeFilesAndOptions
wmakeFilesAndOptions: Creating files
wmakeFilesAndOptions: Creating options

3- this happend:
wmake
SOURCE=fixedMeanValueFvPatchField.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/sf/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/sf/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/sf/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/fixedMeanValueFvPatchField.o
fixedMeanValueFvPatchField.C:42: error: redefinition of âFoam::fixedMeanValueFvPatchField<Type>::fixedMean ValueFvPatchField(const Foam::fvPatch&, const Foam:imensionedField<Type, Foam::volMesh>&)â
fixedMeanValueFvPatchField.C:42: error: âFoam::fixedMeanValueFvPatchField<Type>::fixedMean ValueFvPatchField(const Foam::fvPatch&, const Foam:imensionedField<Type, Foam::volMesh>&)â previously declared here
fixedMeanValueFvPatchField.C:57: error: redefinition of âFoam::fixedMeanValueFvPatchField<Type>::fixedMean ValueFvPatchField(const Foam::fixedMeanValueFvPatchField<Type>&, const Foam::fvPatch&, const Foam:imensionedField<Type, Foam::volMesh>&, const Foam::fvPatchFieldMapper&)â
fixedMeanValueFvPatchField.C:57: error: âFoam::fixedMeanValueFvPatchField<Type>::fixedMean ValueFvPatchField(const Foam::fixedMeanValueFvPatchField<Type>&, const Foam::fvPatch&, const Foam:imensionedField<Type, Foam::volMesh>&, const Foam::fvPatchFieldMapper&)â previously declared here
fixedMeanValueFvPatchField.C:71: error: redefinition of âFoam::fixedMeanValueFvPatchField<Type>::fixedMean ValueFvPatchField(const Foam::fvPatch&, const Foam:imensionedField<Type, Foam::volMesh>&, const Foam::dictionary&)â
fixedMeanValueFvPatchField.C:71: error: âFoam::fixedMeanValueFvPatchField<Type>::fixedMean ValueFvPatchField(const Foam::fvPatch&, const Foam:imensionedField<Type, Foam::volMesh>&, const Foam::dictionary&)â previously declared here
fixedMeanValueFvPatchField.C:96: error: redefinition of âFoam::fixedMeanValueFvPatchField<Type>::fixedMean ValueFvPatchField(const Foam::fixedMeanValueFvPatchField<Type>&, const Foam:imensionedField<Type, Foam::volMesh>&)â
fixedMeanValueFvPatchField.C:96: error: âFoam::fixedMeanValueFvPatchField<Type>::fixedMean ValueFvPatchField(const Foam::fixedMeanValueFvPatchField<Type>&, const Foam:imensionedField<Type, Foam::volMesh>&)â previously declared here
fixedMeanValueFvPatchField.C:111: error: redefinition of âvoid Foam::fixedMeanValueFvPatchField<Type>::autoMap(co nst Foam::fvPatchFieldMapper&)â
fixedMeanValueFvPatchField.C:111: error: âvirtual void Foam::fixedMeanValueFvPatchField<Type>::autoMap(co nst Foam::fvPatchFieldMapper&)â previously declared here
fixedMeanValueFvPatchField.C:123: error: redefinition of âvoid Foam::fixedMeanValueFvPatchField<Type>::rmap(const Foam::fvPatchField<Type>&, const Foam::labelList&)â
fixedMeanValueFvPatchField.C:123: error: âvirtual void Foam::fixedMeanValueFvPatchField<Type>::rmap(const Foam::fvPatchField<Type>&, const Foam::labelList&)â previously declared here
fixedMeanValueFvPatchField.C:131: error: redefinition of âvoid Foam::fixedMeanValueFvPatchField<Type>::updateCoef fs()â
fixedMeanValueFvPatchField.C:131: error: âvirtual void Foam::fixedMeanValueFvPatchField<Type>::updateCoef fs()â previously declared here
fixedMeanValueFvPatchField.C:155: error: redefinition of âvoid Foam::fixedMeanValueFvPatchField<Type>::write(Foam ::Ostream&) constâ
fixedMeanValueFvPatchField.C:155: error: âvirtual void Foam::fixedMeanValueFvPatchField<Type>::write(Foam ::Ostream&) constâ previously declared here
make: *** [Make/linux64GccDPOpt/fixedMeanValueFvPatchField.o] Error 1


Am I doing something wrong??

can anyone help me?
mcjicpm2 is offline   Reply With Quote

Old   May 20, 2010, 12:06
Default
  #11
Senior Member
 
Join Date: Dec 2009
Posts: 112
Rep Power: 16
heavy_user is on a distinguished road
Hi mcjicpm2,

i am getting the exact same error...just for fun I commented every definition but one...and he still brings me the error for just the ONE definition.
I am using OF 1.6. ..

Did you solve the Problem??

regards!
heavy_user is offline   Reply With Quote

Old   May 20, 2010, 13:26
Default
  #12
Senior Member
 
Join Date: Dec 2009
Posts: 112
Rep Power: 16
heavy_user is on a distinguished road
Ok I just figured it out...

in files it needs to be:

Code:
fixedMeanValueFvPatchFields.C

LIB = $(FOAM_USER_LIBBIN)/libfixedMeanValue
so WITH the "s.C" at the end. The file without the s is the wrong one ..

The options file needs only:

Code:
EXE_INC = \ 
      -I$(LIB_SRC)/finiteVolume/lnInclude

LIB_LIBS = \ 
       -lfiniteVolume
in the control dict you need to add:

Code:
libs ( "libfixedMeanValue.so" ) ;
dyle likes this.
heavy_user is offline   Reply With Quote

Old   October 7, 2010, 12:19
Default
  #13
jml
New Member
 
Jml
Join Date: Mar 2009
Posts: 23
Rep Power: 17
jml is on a distinguished road
Hello,

I've seen that the boundary "fixedMeanValue" is available in OpenFOAM 1.5 (/src/finiteVolume/fields/fvPatchFields/derived/fixedMeanValue). However when I try to use it with the next set up

------------------------------
type fixedMeanValue;
meanValue 100000;
------------------------------

the next message appear:

------------------------------
Cannot find 'value' entry on patch salida of field p in file "/... /0/p"
which is required to set the values of the generic patch field.
(Actual type fixedMeanValue)
------------------------------


Why does Openfoam demand 'value'? Is not enough with 'meanValue'?
jml is offline   Reply With Quote

Old   November 30, 2010, 05:32
Unhappy fixedMeanvalue adding code
  #14
Member
 
Join Date: Sep 2010
Posts: 36
Rep Power: 16
siddharameshwara is on a distinguished road
hello to all,

Could you please tell me how to add the following code in the controldict file

Code:
libs ( "libfixedMeanValue.so" ) ;
[/QUOTE

Thanks
siddharameshwara is offline   Reply With Quote

Old   November 30, 2010, 09:30
Unhappy how to calculate fixedMeanvalue
  #15
Member
 
Join Date: Sep 2010
Posts: 36
Rep Power: 16
siddharameshwara is on a distinguished road
Hello to all,

Could you please tell me how to calculate the meanvalue in the below example. I am using this for outlet boundary condition for velocity.

type fixedMeanValue;
meanValue 3.3;


Thanks to all.
siddharameshwara is offline   Reply With Quote

Old   March 6, 2011, 06:55
Default Outflow boundary condition
  #16
New Member
 
mohsen cheraghi
Join Date: Jun 2010
Location: Switzerland
Posts: 28
Rep Power: 15
mohsen cheraghi is on a distinguished road
Hello to all
I'm a new user of OpenFoam and I'm looking for a boundary condition like outflow B.C like Fluent. Help me please.
mohsen cheraghi is offline   Reply With Quote

Old   January 12, 2012, 18:40
Default fixedMeanValue in 2.1.x?
  #17
Senior Member
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan will become famous soon enough
Hello All,

I usually go back and forth between the ext and openCFD version of openfoam and I need to use the fixedMeanValue condition in the OpenCFD version. In earlier versions of 2.0.x I was able to compile the code provided above without any changes. However, now that my administrator has spent all this time getting 2.1.x set up on a small cluster...i cannot compile fixedMeanValue (not even on a recently updated version of 2.0.x). My errors are too long to include and are attached in a separate file.

Thoughts?
Attached Files
File Type: txt error.txt (21.7 KB, 35 views)
chegdan is offline   Reply With Quote

Old   April 25, 2012, 16:50
Default
  #18
New Member
 
Hannes
Join Date: Oct 2011
Posts: 19
Rep Power: 14
falke126 is on a distinguished road
Hi to all,

i also need the fixedMeanValue bc in the regular OF version 2.1.0 ...
i´ve read that this bc was available in former versions (eg 1.5).

Is there a specific reason, why this kind of bc is´nt available any more?
Eg in cfx the average static pressure bc is very common...
falke126 is offline   Reply With Quote

Old   April 25, 2012, 17:22
Default
  #19
Senior Member
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan will become famous soon enough
Quote:
Originally Posted by falke126 View Post
Hi to all,

i also need the fixedMeanValue bc in the regular OF version 2.1.0 ...
i´ve read that this bc was available in former versions (eg 1.5).

Is there a specific reason, why this kind of bc isn't available any more?
Eg in cfx the average static pressure bc is very common...
I didn't answer my own post, but it turns out to be easy enough to compile in 2.1.x. I couldn't get it as a standalone library using wmake libso, but I just put the fixedMeanValue BC in with the other BCs in

Code:
$FOAM_SRC/finiteVolume/fields/fvPatchFields/derived
and then added the lines

Code:
$(derivedFvPatchFields)/fixedMeanValue/fixedMeanValueFvPatchFields.C
below the line

Code:
$(derivedFvPatchFields)/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.C
in the file

Code:
$FOAM_SRC/finiteVolume/Make/files
and then an Allwmake in the $FOAM_INST_DIR to recompile everything again and grabbed a coffee. Hope this helps.
chegdan is offline   Reply With Quote

Old   February 2, 2013, 12:06
Default Help fixedMeanValue Outlet
  #20
Member
 
Anonymous
Join Date: Jan 2012
Location: Canada
Posts: 65
Rep Power: 14
Industrial_CFD is on a distinguished road
Hi guys,

I tried to implement fixedMeanValue at the outlet, and I get the followng error:

file: /home/adam/OpenFOAM/adam-2.1.0/run/tutorials/incompressible/pimpleFoam/hvles/0/p::boundaryField::OUTLET from line 30 to line 32.

From function fvPatchField<Type>::New(const fvPatch&, const DimensionedField<Type, volMesh>&, const dictionary&)
in file /opt/openfoam210/src/finiteVolume/lnInclude/fvPatchFieldNew.C at line 135.

FOAM exiting

Obviously even though I re-compiled after putting fixedMeanValue in the BCs it did not take.

Help?

Cheers: Adam
Industrial_CFD is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlet pressure boundary condition adamsview OpenFOAM Running, Solving & CFD 2 November 7, 2011 13:07
pressure outlet boundary condition Sastry FLUENT 4 February 19, 2011 01:33
Pressure outlet boundary condition jubs FLUENT 0 February 8, 2007 00:27
Pressure outlet boundary condition Rizwan FLUENT 1 March 6, 2006 07:07
Pressure outlet condition? David FLUENT 3 March 19, 2004 04:40


All times are GMT -4. The time now is 08:51.