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/)
-   -   boundary conditions, pipe geometry. (https://www.cfd-online.com/Forums/openfoam-solving/132442-boundary-conditions-pipe-geometry.html)

ilpaso April 1, 2014 02:30

boundary conditions, pipe geometry.
 
Hi all,
I've a flow in a straight pipe and I'm trying to simulate it with simpleFoam solver.
With these BC there is no problem:
U:
Code:

boundaryField
{
  wall
  {
    type fixedValue;
    value uniform (0 0 0);
  }
  inflow
  {
    type fixedValue;
    value uniform (0.707 0 0);
  }
  outflow
  {
    type zeroGradient;
  }

p:
Code:

boundaryField
{
  inflow
  {
    type zeroGradient;
  }
  outflow
  {
    type fixedValue;
    value uniform 0;
  }
  wall
  {
    type zeroGradient;
  }

I'd like to impose a pressure difference across inflow and outflow as BC but with these BC the problem is not well posed:

U:
Code:

boundaryField
{
  wall
  {
    type fixedValue;
    value uniform (0 0 0);
  }
  inflow
  {
    type zeroGradient;
  }
  outflow
  {
    type zeroGradient;
  }

p:
Code:

boundaryField
{
  inflow
  {
    type fixedValue;
    value uniform 3;
  }
  outflow
  {
    type fixedValue;
    value uniform 0;
  }
  wall
  {
    type zeroGradient;
  }

what are the right BC in order to make a well posed problem?
Thank you

alexeym April 1, 2014 03:27

Hi,

try using this

Code:

  inflow
  {
    type pressureInletUniformVelocity;
    value uniform (0 0 0);
  }

as velocity inlet BC. Though you should be careful cause as pressure difference grows velocity inside the pipe also grows and you can leave zone of laminar flow.

ilpaso April 1, 2014 04:15

Thank you,
it works better with an higher pressure difference (delta_pRho = 5) and it doesn't converge with a lower pressure difference(delta_pRho = 1) . Why?

pipe diameter= 3mm
pipe length = 50mm
nu = 3.2e-6

alexeym April 1, 2014 04:22

As I don't know what modifications you've made to the case files you've posted yesterday I can't say anything meaningful except: with the case files you've posted yesterday and this BC

Code:

  inflow
  {
    type pressureInletUniformVelocity;
    value uniform (0 0 0);
  }

for inlet velocity, case converged in 63 iterations for delta_pRho = 1, and in 167 iterations for delta_pRho = 5.

ilpaso April 1, 2014 05:09

with this 0/p
Code:

boundaryField
{
  inflow
  {
    type fixedValue;
    value uniform 1;
  }
  outflow
  {
    type fixedValue;
    value uniform 0;
  }
  wall
  {
    type zeroGradient;
  }

case converged in 55 iterations

but with this 0/p:

Code:

boundaryField
{
  inflow
  {
    type fixedValue;
    value uniform 5;
  }
  outflow
  {
    type fixedValue;
    value uniform 4;
  }
  wall
  {
    type zeroGradient;
  }

it doesn't converge. The difference is only the pressure at outflow. The pressure drop is the same.

alexeym April 1, 2014 05:34

Well,

Increase relaxation for velocity:

Code:

relaxationFactors
{
    fields
    {
        p              0.6;
    }
    equations
    {
        U              0.4;
    }
}

With these settings case converged in 168 iteration, guess it can be improved by playing with relaxation factors. With old relaxation factors in the very beginning of the simulation velocity goes up to 21 m/s and it finally leads to non-converging solution.


All times are GMT -4. The time now is 11:50.