# How to set boundary conditions (U and p) for a bend pipe?

 Register Blogs Members List Search Today's Posts Mark Forums Read

 January 26, 2015, 19:44 How to set boundary conditions (U and p) for a bend pipe? #1 New Member   Adam Join Date: Jan 2015 Posts: 2 Rep Power: 0 Hello, I'm trying to run the flow simulation from this tutorial http://spoken-tutorial.org/watch/Ope...nFOAM/English/, but I can't set the boundary conditions (U and p). There is the code (the same for velocity and pressure): Code: ```17 dimensions [0 2 -2 0 0 0 0]; 18 19 internalField uniform 0; 20 21 boundaryField 22 { 23 inlet 24 { 25 ???? ??????????; 26 } 27 28 outlet 29 { 30 ???? ???????????; 31 } 32 33 walls 34 { 35 ???? ?????; 36 } 37 } 38 39 // ************************************************************************* //``` This is for a study project. Very sorry for my bad english.

January 27, 2015, 04:56
#2
Member

Pratik Nanavati
Join Date: May 2014
Location: Munich, Germany
Posts: 40
Rep Power: 5
Quote:
 Originally Posted by Adamazy Hello, I'm trying to run the flow simulation from this tutorial http://spoken-tutorial.org/watch/Ope...nFOAM/English/, but I can't set the boundary conditions (U and p). There is the code (the same for velocity and pressure): Code: ```17 dimensions [0 2 -2 0 0 0 0]; 18 19 internalField uniform 0; 20 21 boundaryField 22 { 23 inlet 24 { 25 ???? ??????????; 26 } 27 28 outlet 29 { 30 ???? ???????????; 31 } 32 33 walls 34 { 35 ???? ?????; 36 } 37 } 38 39 // ************************************************************************* //``` This is for a study project. Very sorry for my bad english.

hello,

you may try this combination for p and U

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// unit of velocity is m/sec
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
inlet
{
type fixedValue;
value uniform (1 0 0);
}
Wall
{
type fixedValue;
value uniform (0 0 0);
}
outlet
{
// Neumann boundary condition.
}
}

and

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.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
{
"(inlet|Wall)"
{
}
outlet
{
// Dirichlet boundary condition.
type fixedValue;
value uniform 0;
}
}

 January 27, 2015, 05:43 #3 New Member   Adam Join Date: Jan 2015 Posts: 2 Rep Power: 0 It's not working. The icoFoam solver has an error: Cannot find patchField entry for outlet. On previous p and U settings it's work, but when I run the visualization in ParaView nothing happens. This are the configurations codes for p and U on which icoFoam runs without an error. Code: ``` /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.1 | | \\ / 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 { inlet { type fixedValue; value uniform 0.02; } outlet { type fixedValue; value uniform 0; } walls { type zeroGradient; } } // ************************************************************************* // ``` Code: ``` /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.1 | | \\ / 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 { inlet { type pressureInletVelocity; value uniform (0 0 0); } outlet { type zeroGradient; } walls { type fixedValue; value uniform (0 0 0); } } // ************************************************************************* // ```

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post RPFigueiredo CFX 3 October 28, 2014 05:59 ashtonJ CFX 6 August 11, 2014 14:32 Abhi Main CFD Forum 12 July 8, 2002 09:11 Kunal Jain Main CFD Forum 0 September 4, 2001 20:52 lyang Main CFD Forum 0 September 19, 1999 18:29

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