CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Boundary Conditions for Converging Pipe (http://www.cfd-online.com/Forums/openfoam-solving/57843-boundary-conditions-converging-pipe.html)

sami_lakka March 5, 2009 10:09

I'm testing OpenFoam for a sim
 
I'm testing OpenFoam for a simple pipe flow case which consists from inlet, sudden contraction and outlet. The flow is laminar and I use icoFoam-solver.

My B.C for U is fixedValue (1) for inlet and zeroGradient for outlet.

B.C for pressure is zeroGradient for inlet and fixedValue (0) for outlet.

I would expect the flow speed to increase in the contraction but it is the same as in the inlet. I'm probably making a stupid mistake with boundary conditions so could somebody point out my mistake so I can go and cry in the corner.

santos March 5, 2009 10:23

Your BCs seem correct. What ab
 
Your BCs seem correct. What about the BC at the walls?

Regards,
Jose Santos

sami_lakka March 5, 2009 10:36

Walls are fixed value 0 for U
 
Walls are fixed value 0 for U and zero gradient for p.

Here is the complete B.C definition (for U):

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

internalField uniform (0 0 0);

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

outlet
{
type zeroGradient;
}

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

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

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

frontAndBack
{
type empty;
}
}

And for p:

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

internalField uniform 0;

boundaryField
{
inlet
{
type zeroGradient;
}

outlet
{
type fixedValue;
value uniform 0;
}

beforeNozzle
{
type zeroGradient;
}

afterNozzle
{
type zeroGradient;
}

nozzle
{
type zeroGradient;
}

frontAndBack
{
type empty;
}
}

santos March 5, 2009 14:50

Could you post a picture of yo
 
Could you post a picture of your results? Its hard to figure out what could be wrong in your setup.

Regards,
Jose Santos

sami_lakka March 6, 2009 05:10

I managed to solve this. It wa
 
I managed to solve this. It was an error in my paraFoam visualization. I hadn't chosen a time step when I loaded the case. Instead I just pressed accept when paraFoam loaded. When I selected a time step using the slider the visualization shows correct values. Whatever the logic is behind this, I don't understand it.


All times are GMT -4. The time now is 03:37.