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/)
-   -   elbow: boundary conditions for inlet and outlet (https://www.cfd-online.com/Forums/openfoam-solving/144034-elbow-boundary-conditions-inlet-outlet.html)

cgoe November 7, 2014 14:25

elbow: boundary conditions for inlet and outlet
 
Hello everyone,

I am very new to OpenFOAM and I do not know how to correctly set boundary conditions for an inlet / outlet.

I try to model a simple, 90 degree, 2D, symmetrical elbow with one inlet and one outlet. Mesh generation is working; but when I start the solver icoFOAM, I get a very high Courant number after few time steps. Furthermore, OpenFOAM displays several warnings, which could be the reason for failing the calculation.

Here the boundary condition for p (file 0/p): FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type inletOutlet;
inletValue uniform 0;
value 0;
}

outlet
{
type inletOutlet;
inletValue uniform 0;
value 0;
}

walls
{
type zeroGradient;
}

frontAndBack
{
type empty;
}
}

// ************************************************** *********************** //

and for U (file 0/U):

FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
inlet
{
type fixedValue;
value uniform (0.4 0 0);
}

outlet
{
type inletOutlet;
inletValue uniform (0 0 0);
value (0 0 0);
}

walls
{
type fixedValue;
value uniform (0 0 0);
}

frontAndBack
{
type empty;
}
}

// ************************************************** *********************** //

Warning messages:

Reading field p

--> FOAM Warning :
From function Field<Type>::Field(const word& keyword, const dictionary&, const label)
in file /home/andras/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/Field.C at line 318
Reading "/home/clemens/OpenFOAM/run/fluent-tut/0/p.boundaryField.inlet" from line 25 to line 27
expected keyword 'uniform' or 'nonuniform', assuming deprecated Field format from Foam version 2.0.
--> FOAM Warning :
From function Field<Type>::Field(const word& keyword, const dictionary&, const label)
in file /home/andras/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/Field.C at line 318
Reading "/home/clemens/OpenFOAM/run/fluent-tut/0/p.boundaryField.outlet" from line 32 to line 34
expected keyword 'uniform' or 'nonuniform', assuming deprecated Field format from Foam version 2.0.
Reading field U

--> FOAM Warning :
From function Field<Type>::Field(const word& keyword, const dictionary&, const label)
in file /home/andras/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/Field.C at line 318
Reading "/home/clemens/OpenFOAM/run/fluent-tut/0/U.boundaryField.outlet" from line 31 to line 33
expected keyword 'uniform' or 'nonuniform', assuming deprecated Field format from Foam version 2.0.

Error message:

Time = 0.02

Courant Number mean: 2284.97 max: 1.28651e+06
#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::symGaussSeidelSmoother::smooth(Foam::word const&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::Field<double> const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, unsigned char, int) at ??:?
#4 Foam::symGaussSeidelSmoother::smooth(Foam::Field<d ouble>&, Foam::Field<double> const&, unsigned char, int) const at ??:?
#5 Foam::smoothSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#6
at ??:?
#7
at ??:?
#8
at ??:?
#9
at ??:?
#10 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#11
at ??:?
Floating point exception (core dumped)

Thanks in advance!

nimasam November 8, 2014 13:26

hello

for p use following setting:
for inlet and walls : zeroGradient
for outlet: fixedValue

and also reduce your time step ;)


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