CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Boundary conditions: inlet and outlet (https://www.cfd-online.com/Forums/openfoam/76416-boundary-conditions-inlet-outlet.html)

 aline May 25, 2010 09:19

Boundary conditions: inlet and outlet

Hello,

Does anyone know where I can find how to use the boundary conditions?
I've looked at the user guide which tells me that a range of BCs are available at src/finiteVolume/fields/fvPatchFields/derived. But I don't know how to use them. I don't understand what goes with what (for example, a specific BC goes with mixed or calculated?).

I'm studying a flow with an inlet (with a definite velocity) and an outlet. I don't know which BC I have to put for these 2 surfaces (inlet and outlet). As there is no gravity in my problem, I guess I should take a BC which fixes the pressure to zero for the outlet, but I don't know which one.

Could anyone help me? thanks a lot in advance.

 David_010 May 26, 2010 06:06

For the velocity, you can put:
Code:

```inlet     {       type  fixedValue;       value  uniform (your inlet value, vector);       } outlet       {         type zeroGradient;         }```
and for the pressure:
Code:

```inlet     {       type  zeroGradient;       } outlet       {       type  fixedValue;       value  uniform 0;       }```
These conditions works with laminar regime.

Regards

David

 David_010 May 26, 2010 06:07

Repeated post

 trex930 June 25, 2010 01:56

Hey David,

So what happens when you switch to turbulent? Can you keep the same boundary fields??

T

 NorbertB June 28, 2010 05:56

Hi Foamers,

I have the same question : are you sure it works only in a laminar case, one told me to use such conditions in my turbulent case.
If it does not work in a turbulent case, do you know what kind of boudnary conditions would work so ?

Cheers

PS : Finally those conditions did not work in my DNS case, it gives me a field without any variation ... Help ^^

 labarc35 June 28, 2010 18:00

using outlet velocity profile as inlet

Hi All,

Does anyone know how to specify (in COMSOL) an inlet velocity profile from a previously solved model's outlet velocity profile?

I've been trying to create a Fourier Series representation of the profile over time, but I am having trouble doing this with a space and time dimension together.

Any help greatly appreciated. Thank you!

 beauty June 29, 2010 03:22

To “using outlet velocity profile as inlet”

Quote:
 Originally Posted by labarc35 (Post 264881) Hi All, Does anyone know how to specify (in COMSOL) an inlet velocity profile from a previously solved model's outlet velocity profile? I've been trying to create a Fourier Series representation of the profile over time, but I am having trouble doing this with a space and time dimension together. Any help greatly appreciated. Thank you!
For this, the form provides two ways, one is mapFields, and the other is directMappedPatch. With the former, I mapped the whole field, but not outlet to inlet. Maybe I take a wrong understanding, you can have a try. I mapped the outlet velocity to the inlet using the directMappedPatch boundary. You should change two files:
1. in constant/polyMesh/boundary
inlet
{
type directMappedPatch;
nFaces #;
startFace #;
offset (0 0 1); // offset (0 0 1) is the distance between the inlet and the outlet

sampleMode nearestPatchFace;
samplePatch outlet;
}

2. in 0/U
inlet
{
type directMappedFixedValue;
value (0 0 0);
setAverage true;

average (0 0 2);
}

Then you can check whether you want results.

 beauty June 29, 2010 03:45

problem with boundary

I also have problems on defining the bounary. For pressure, when using zeroGradient for inlet, everything goes well. After changing zeroGradient to calculated, I get this message:
valueInternalCoeffs cannot be called for a calculatedFvPatchField
on patch inlet of field p in file "/home/flow/OpenFOAM/flow-1.6/run/pipe/tphase/ke/0/p"
You are probably trying to solve for a field with a default boundary condition.

From function calculatedFvPatchField<Type>::valueInternalCoeffs( const tmp<scalarField>&) const
in file fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C at line 145.

can anyone tell us how to use the boundary conditions?
Thanks

beauty

 All times are GMT -4. The time now is 13:40.