CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

elbow problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 9, 2014, 13:07
Default elbow problem
  #1
Member
 
power
Join Date: Jun 2014
Posts: 86
Rep Power: 11
enginpower is on a distinguished road
Hi all,
I'm a beginner with OpenFoam and CFD.

To do experience I followed a tutorial to simulate flows in an elbow pipe.
I did different trials, setting as initial boundary conditions velocity and pressure.

If I set as inlet pressure 30MPa and as outlet pressure 2MPa and 1MPa respectively on outlet first way and on outlet second way, with command icofoam solution breaks.

That's my setting for p-file:

walls
{
type zeroGradient;
}

inlet
{
type fixedValue;
value uniform 30000000;
}

outletz+
{
type fixedValue;
value uniform 1000000;
}

outletz-
{
type fixedValue;
value uniform 2000000;
}


And this for U:

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

inlet
{
type zeroGradient;
}

outletz+
{
type zeroGradient;
}

outletz-
{
type zeroGradient;
}



I saw that the Courant number after 1s is too big and solver fails!
How could I do to get a solution?
Also some suggestions could be useful.


Sorry if my questions is too simple for experts :-(
Thank you so much to all who wants help me!!

Last edited by enginpower; July 9, 2014 at 15:59.
enginpower is offline   Reply With Quote

Old   July 9, 2014, 17:57
Default
  #2
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 18
wouter is on a distinguished road
hello enginpower,

I am no expert, just reading this forum a lot. My guess is that you set three pressures inlet and two outlet, chances are that this conflicts and there is no flow that fits this. I would try two pressures an a flow and adapt the flow until the third pressure is what I want and than I can see if the third pressure is viable.

Hope this helps
Wouter
wouter is offline   Reply With Quote

Old   July 10, 2014, 02:50
Default
  #3
Senior Member
 
matej forman
Join Date: Mar 2009
Location: Brno, Czech Republic
Posts: 182
Rep Power: 17
matejfor is on a distinguished road
Hi,
good you are playing around to understand the code. That is how you run into more questions and you can get answers.

1) the incompressible solvers (like icoFoam) are using the relative pressure. Therefore your setting of 30 MPa is wrong by atmospheric pressure. (well it would not make much of a difference anyway)

2)seeing your pressure differences - your flow is fully compressible with such a huge differences. I do not know about your geometry and BCs, but having such a pressure difference on inlet would make a pressure wave.

3) incompressible solvers are used typically for small pressure changes. Typically you set fixedValue velocity at inlet and pressure at outlet and let the NavierStokes equations to do the rest. If you want to set the pressures at both sides, have a look at:$FOAM/tutorials/incompressible/pimpleFoam/TJunction tutorial. How to set the BCs by pressure.

4) For compressibe flows look at:$FOAM/tutorials/compressible/rhoPimpleFoam/ras/angledDuct
or $FOAM/tutorials/compressible/rhoSimplecFoam/squareBend

hope this helps
matej
matejfor is offline   Reply With Quote

Old   July 10, 2014, 10:07
Default
  #4
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
So you have 29 and 28 MPa pressure difference in a pipe? That sounds insanely high. Are you sure you don't mean just "Pa" instead of "MPa"?
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   July 11, 2014, 07:17
Default
  #5
Member
 
power
Join Date: Jun 2014
Posts: 86
Rep Power: 11
enginpower is on a distinguished road
Thanks a lot to all.

I will do other trials reducing delta pressure to 1bar=0.1MPa. Then I will try matejfor's suggestions for other cases.
I will let you know if I will find other problems.

Anuway geometry I'm using is: tube T:
  • inlet way fi100 and 150 long
  • outlet ways fi200 and 300 long
I used salome to create the T. So dimension should be in m.
Is that right?
enginpower is offline   Reply With Quote

Old   July 21, 2014, 07:32
Default
  #6
Member
 
power
Join Date: Jun 2014
Posts: 86
Rep Power: 11
enginpower is on a distinguished road
Hi all,
I did other trials with icoFoam.

I found that up 10Pa of delta pressure inlet/outlet flow it stops simulation maybe for some waves effect as someone suggested.

Anyway now I'm trying to do another simulation with different geometry but it fails without understanding why.
That's the log file:
Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.3.0-f5222ca19ce6
Exec   : icoFoam
Date   : Jul 19 2014
Time   : 13:12:24
Host   : "******"
PID    : 3618
Case   : /home/********
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading transportProperties

Reading field p

Reading field U

Reading/calculating face flux field phi

#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::surfaceInterpolation::makeWeights() const at ??:?
#4  Foam::surfaceInterpolation::weights() const at ??:?
#5  
 at ??:?
#6  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7  
 at ??:?
This is the p file:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      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
{
    walls
    {
        type            zeroGradient;
    }

    inlet
    {
        type            zeroGradient;
    }

    outletg
    {
        type            fixedValue;
    value        uniform 0;
    }

    outletp
    {
        type            fixedValue;
        value           uniform 0;
    }
}

// ************************************************************************* //
And this is U file:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      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
{
    walls
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

    inlet
    {
        type            fixedValue;
    value        uniform (0.005 0 0);
    }

    outletg
    {
        type            zeroGradient;
    }
    
    outletp
    {
        type            zeroGradient;
    }
}

// ************************************************************************* //
Exactly it is not an elbow but a pipe with one inlet (the biggest one near the curve) and two outlet far from it (outletg is bigger than outletp).
The total length of the pipe is 1.5m.

I hope is it clear my problem so that you could easily help me

Thanks
Attached Images
File Type: png guarda6.png (9.1 KB, 20 views)
enginpower is offline   Reply With Quote

Old   July 22, 2014, 07:51
Default
  #7
Member
 
power
Join Date: Jun 2014
Posts: 86
Rep Power: 11
enginpower is on a distinguished road
No one could give me any suggestions?

Thank you!!
enginpower is offline   Reply With Quote

Old   July 22, 2014, 14:56
Default
  #8
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 18
wouter is on a distinguished road
hello enginpower,
Did you learn from your trails? I think the problem is not so much different from the previous question you got answered. The pressure in the lowest Tee cannot be the same as in the highest outlet unless you have no flow. So a fixed value will fail.

hope this helps
Wouter
wouter is offline   Reply With Quote

Old   July 23, 2014, 04:22
Default
  #9
Member
 
power
Join Date: Jun 2014
Posts: 86
Rep Power: 11
enginpower is on a distinguished road
Hi wouter,
but I set U and not p at the inlet. There, p is zerogradient and U=0.05m/s, so not too high.

I don't understand what do you mean?

Could you suggest any value to run a possible water flow, please?

Thank you
enginpower is offline   Reply With Quote

Old   July 23, 2014, 06:47
Default
  #10
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 18
wouter is on a distinguished road
hello enginpower
not the pressure at the inlet are unrealistic but the pressures at the outlets, both are the same and especially with a vertical pipe and a flow the pressures in the lower outlet is much higher than in the higher outlet.


hope this helps
Wouter
wouter is offline   Reply With Quote

Old   July 23, 2014, 08:02
Default
  #11
Senior Member
 
matej forman
Join Date: Mar 2009
Location: Brno, Czech Republic
Posts: 182
Rep Power: 17
matejfor is on a distinguished road
Why don't you try the inletOtlet condition at the outlet? It lets the flow exit the domain but will block any recirculation, which improves the convergence.
here is the spec. :http://www.openfoam.org/docs/user/boundaries.php
here are some comments and disscussion: http://www.cfd-online.com/Forums/ope...onditions.html
matejfor is offline   Reply With Quote

Old   July 23, 2014, 11:53
Default
  #12
Member
 
power
Join Date: Jun 2014
Posts: 86
Rep Power: 11
enginpower is on a distinguished road
Quote:
Originally Posted by wouter View Post
hello enginpower
not the pressure at the inlet are unrealistic but the pressures at the outlets, both are the same and especially with a vertical pipe and a flow the pressures in the lower outlet is much higher than in the higher outlet.


hope this helps
Wouter
Thanks a lot for your reply.
But now I don't understand something about OpenFOAM. Where could I set gravity g? What I mean is: my pipe could stay also horizontal, that is with z axis perpendicular to g vector. In that case, the natural pressure for the outlets should be equal if they go out a common space. It is what I'd want to simulate.
Sorry about my stupid issues but I'm new to this software.

@matejfor: I will try your suggestions
enginpower is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with interFoam; Wave/wiggle alpha1 behavior JonW OpenFOAM 10 February 4, 2023 07:27
UDF compiling problem Wouter Fluent UDF and Scheme Programming 6 June 6, 2012 04:43
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 06:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 19:13
Is this problem well posed? Thomas P. Abraham Main CFD Forum 5 September 8, 1999 14:52


All times are GMT -4. The time now is 10:26.