CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   SimpleFoam Boundary Conditions (http://www.cfd-online.com/Forums/openfoam/68016-simplefoam-boundary-conditions.html)

Johannes38 September 3, 2009 06:00

SimpleFoam Boundary Conditions
 
Hi

I have a question about the boundary conditions in simpleFoam. I want to modify the pitzDaily Tutorial with other boundary conditions.

I want a static low pressure at the outlet. My p file looks like this:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
inlet
{
type zeroGradient;
}
outlet
{
type fixedValue;
value uniform -5000;
}
upperWall
{
type zeroGradient;
}
lowerWall
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************** *********************** //

And I donīt want to have a fixed magnitude. My solution would be a velocity profile. My U file looks like this:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
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 zeroGradient;
}
outlet
{
type zeroGradient;
}
upperWall
{
type fixedValue;
value uniform (0 0 0);
}
lowerWall
{
type fixedValue;
value uniform (0 0 0);
}
frontAndBack
{
type empty;
}
}
// ************************************************** *********************** //

The Problem is that I have not a right solution. I think the U file is not correct.

Thanks for your help

Johannes

Thomas Baumann September 4, 2009 04:22

Hi,
simpleFoam solves incompressible. For this kind of simulation normally you set for the inlet condition:
pressure: zerogradient
velocity: fixedValues (Ux Uy Uz)

and for outlet condition:
pressure: fixedValue
velocity: zeroGradient

Regards Thomas

Zowie September 4, 2009 07:38

I wouldn't use zeroGradient for both velocity and pressure at the inlet... one of them should have a value. If not, the problem is not well described.

By the way, do you really need to use negative pressures?

hansel September 7, 2009 17:29

You haven't set enough conditions. The problem as you described it could simply be solved by making the pressure -5000 everywhere and having no flow. Or it could pick just about any flow and calculate the pressure to meet it.

You need to define a pressure or velocity somewhere else, probably the inlet.


All times are GMT -4. The time now is 23:52.