CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Pressure outlet boundary condition (https://www.cfd-online.com/Forums/openfoam-solving/59271-pressure-outlet-boundary-condition.html)

immortality April 4, 2013 14:41

thanks Daniel.it compiled well.
do you know how can use that in groovyBC?

immortality April 4, 2013 19:20

whats the main part of this BC code so that i can write it in groovyBC format?
How does it work?can anyone give a point to start?
Does anyone know about the reason behind this bc?
Whats its formula?

vanekp April 10, 2013 08:50

Thank you very much Dan, now it works perfectly.

Chears,
Petr

sivakumar October 25, 2013 11:24

Hi There and Daniel,
I want to use the fixedMeanValue BC. I think I have compiled the code, but I am not sure, I dont know How to check as well.

I copied the fixedMeanValue BC code to

/OpenFOAM/OpenFOAM-2.1.1/src/finiteVolume/fields/fvPatchFields/derived

After that,

The steps I followed are:

1) I copied and pasted the following lines in to the fixedMeanValue/Make/files

$(derivedFvPatchFields)/fixedMeanValue/fixedMeanValueFvPatchFields.C
$(derivedFvPatchFields)/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.C




2) then went the main directory and executed ./Allwmake

I am not sure, is it the right way or not.

I tried a case, it is running with that BC,

I have noticed that in the main folder there is an additional folder with the user name (cerecam2-1.1). is it normal??. This folder has lib file in it.

I hope everything is fine, please correct me if there is any mistake.

Thanks,
Sivakumar

chegdan October 25, 2013 11:51

There was no need to put that BC in the source directories of OpenFOAM. It was made to be compiled separately in a working directory so you did not need to modify core files in your installation. In fact that is one of the beautiful parts of OpenFOAM :D ....that you can modularize components and add them as you wish with

Code:

libs ( "somethingSomething.so");
In your controlDict file on a case-by-case basis.

Quote:

I have noticed that in the main folder there is an additional folder with the user name (cerecam2-1.1). is it normal??
If your user name is "cerecam" then yes!

I suggest you undo your changes of moving the BC to /OpenFOAM/OpenFOAM-2.1.1/src/finiteVolume/fields/fvPatchFields/derived

and just place the orginal BC folder and files in a folder located at cerecam2-1.1/applications and then go to the BC folder and wmake libso. Read through some of the older posts in this thread for some clarity! :D

sivakumar October 25, 2013 11:58

Thanks Daniel,

sivakumar October 25, 2013 12:28

Hi There,
I have few question regarding the theory of the fixedMeanValue BC.

1) what is the equation for it?
2) how it is differing from fixedValue?
3)how do we need to determine the mean value?
4)the meanValue, is it always "0" ?

Please give some input for this questions.

Thanks,
Sivakumar

shuoxue November 2, 2013 05:44

Quote:

Originally Posted by mohsen cheraghi (Post 298097)
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.

Hi, Mohsen!

Have you found out the way to simulate outflow BC in openfoam?

jherb March 2, 2014 08:06

1 Attachment(s)
I modified the boundary condition so it can use time varying meanValues.

An example for a time varying velocity boundary condition is:
Code:

    INLET
    {
        type            fixedMeanValue;
        meanValue      table
            (
                (0 (0 0 -10))
                (5 (0 0 10))
                (6 (0 0 -10))
                (20 (0 0 -10))
            );
        value uniform (0 0 -10);
    }

The example below should still work.
(I compiled it with OpenFOAM 2.2.2 and 2.3.0)
Quote:

Originally Posted by chegdan (Post 418371)
@immortality: Just to quadruple check if I was crazy or not, I went through the thread, made a new fixedMeanValue from the information on this thread, and it works for OF-2.2.x. It literally took longer to write this post than to actually find out if it was compatible :).

@vanekp if you have the capability of compiling your own solvers/application in your user directory on your cluster, you can use this BC. Just take the attached code, unzip in your user foam directory, move into the directory and do a

Code:

wmake libso
where you need to place

Code:

libs ( "libfixedMeanValue.so");
in your caseName/system/controlDict file. To use the code, in your case you are using the BC like

Code:

    outlet
    {
        type            fixedMeanValue;
    meanValue        0;   
        value          uniform 0;
    }

This code has been confirmed to work with 2.1.x and 2.2.x.

But there is a fixedMean boundary condition in 2.2.x that may be what you want also.


ziemowitzima March 5, 2014 17:00

Hello,
Can anyone tell me how can I get the fixedMeanValue BC ?
thanks!

jherb March 5, 2014 17:06

Download the archive from the above comment, unpack into a directory, call wmake libso, add the library to controlDict and use the boundary condition for the corresponding field (see also comments above).

Quote:

Originally Posted by ziemowitzima (Post 478402)
Hello,
Can anyone tell me how can I get the fixedMeanValue BC ?
thanks!


ziemowitzima March 5, 2014 17:28

Thanks a lot !
I do not know how I miss your previous post !
I did compile it, and use it as follows:
type fixedMeanValue;
meanValue constant 100000;
value uniform 100000;

my question is, what is the purpose/difference between the second and the last line ?

what in this case is appropriate BC for outlet velocity, zeroGradient ?

Thanks
ZMM

jherb March 6, 2014 04:26

"value" is used for initialization of the simulation or the value calculated in the last time step (or SIMPLE iteration). So in post processing you see how the values are distributed across the boundary.

"meanValue" is what you specify as boundary condition. It correspondent to the "value" of the fixedValue boundary condition.

See also the discussion in http://www.cfd-online.com/Forums/ope...egionfoam.html

Quote:

Originally Posted by ziemowitzima (Post 478409)
Thanks a lot !
I do not know how I miss your previous post !
I did compile it, and use it as follows:
type fixedMeanValue;
meanValue constant 100000;
value uniform 100000;

my question is, what is the purpose/difference between the second and the last line ?

what in this case is appropriate BC for outlet velocity, zeroGradient ?

Thanks
ZMM


ziemowitzima March 14, 2014 03:36

Dear Jherb,
I have one more question.
Starting form OF220, there is derived BC called:
fixedMean
its description says:

Description
This boundary condition extrapolates field to the patch using the near-cell
values and adjusts the distribution to match the specified mean value.

\heading Patch usage

\table
Property | Description | Required | Default value
meanValue | mean value | yes |
\endtable

Example of the boundary condition specification:
\verbatim
myPatch
{
type fixedMean;
meanValue 1.0;
}
\endverbatim

Is it the same BC as "fixedMeanValue" discussed in this posts/thread ?

Thanks
ZMM

sivakumar March 14, 2014 09:25

hi,
I think its the same.

ziemowitzima March 17, 2014 04:13

problem with unphysically strong reverse flow at the outlet
 
1 Attachment(s)
Dear Foamers,
Even though I was using fixedMeanValue, or fixedMean (from OF221), or totalPressure BC at the outlet (keeping zeroGradnient, or inletOutlet for U) I still have a problem with constitution of unphysical strong reverse flow at the outlet, please see attached figure.

Does anyone of you know how to avoid such problem ?

Thanks
ZMMAttachment 29405

jherb March 19, 2014 04:46

The two boundary conditions are nearly the same. The boundary condition of this thread uses gAverage to calculate the averages (=mean) of the field values on the boundary patch, whereas the OF core version uses a weighted average, using the face areas as weights. The latter version seams to make more sense physically.


Quote:

Originally Posted by ziemowitzima (Post 479952)
Dear Jherb,
I have one more question.
Starting form OF220, there is derived BC called:
fixedMean
its description says:

Description
This boundary condition extrapolates field to the patch using the near-cell
values and adjusts the distribution to match the specified mean value.

\heading Patch usage

\table
Property | Description | Required | Default value
meanValue | mean value | yes |
\endtable

Example of the boundary condition specification:
\verbatim
myPatch
{
type fixedMean;
meanValue 1.0;
}
\endverbatim

Is it the same BC as "fixedMeanValue" discussed in this posts/thread ?

Thanks
ZMM


Parth04 August 28, 2014 09:58

hi to all,
can anyone help me with these , how to apply same B.C. i.e. fixed mean value at outlet??
i m simulating stratified flow using C language???
thnx in advance...

sina_mech November 12, 2014 13:51

Daniel P. Combest

I just wanted to update you that it also works well with OpenFOAM 2.3. Thank you. It really helped me.

srivatta January 26, 2016 21:01

fixedMean magic
 
1 Attachment(s)
Just wanted to narrate a recent experience on the difference between fixed value of pressure at out versus fixedMean. I applied both bcs (separately of course) to a slot jet impinging on a wall. See the difference in the coefficient of pressure in each case. (in a confined jet, vortices leave the domain!).


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