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

Pressure inlet boundary condition for icoFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 18, 2014, 20:57
Default Pressure inlet boundary condition for icoFoam
  #1
New Member
 
Joseph Nichols
Join Date: Dec 2014
Posts: 5
Rep Power: 11
josephn is on a distinguished road
Hi All,

I am trying to run a simple simulation of a leaky capillary using the icoFoam solver. I have run the same simulation using a solver I wrote for a class a few years ago and wanted to compare results. Unfortunately I am having trouble with the boundary conditions and am exasperated trying to solve the issue.

The flow should be entirely pressure driven with fixed pressures at each boundary. My blockMeshDict looks like this

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       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 0.00001;

vertices
(
    (0 0 0)
    (3 0 0)
    (4 0 0)
    (7 0 0)
    (0 1 0)
    (3 1 0)
    (4 1 0)
    (7 1 0)
    (0 1.1 0)
    (3 1.1 0)
    (4 1.1 0)
    (7 1.1 0)
    (0 4.1 0)
    (3 4.1 0)
    (4 4.1 0)
    (7 4.1 0)
    (0 0 0.1)
    (3 0 0.1)
    (4 0 0.1)
    (7 0 0.1)
    (0 1 0.1)
    (3 1 0.1)
    (4 1 0.1)
    (7 1 0.1)
    (0 1.1 0.1)  //24
    (3 1.1 0.1)  //25
    (4 1.1 0.1)  //26
    (7 1.1 0.1)  //27
    (0 4.1 0.1)  //28
    (3 4.1 0.1)  //29
    (4 4.1 0.1)  //30
    (7 4.1 0.1)  //31
);

blocks
(
    hex (0 1 5 4 16 17 21 20) (30 10 1) simpleGrading (1 1 1)
    hex (1 2 6 5 17 18 22 21) (10 10 1) simpleGrading (1 1 1)
    hex (2 3 7 6 18 19 23 22) (30 10 1) simpleGrading (1 1 1)
    hex (5 6 10 9 21 22 26 25) (10 1 1) simpleGrading (1 1 1)
    hex (8 9 13 12 24 25 29 28) (30 30 1) simpleGrading (1 1 1)
    hex (9 10 14 13 25 26 30 29) (10 30 1) simpleGrading (1 1 1)
    hex (10 11 15 14 26 27 31 30) (30 30 1) simpleGrading (1 1 1) 
)

edges
(
);

boundary
(
    inlet
    {
        type patch;
        faces
        (
            
        (0 16 20 4)
        );
    }
    outlet
    {
    type patch;
    faces
    (
        (3 7 23 19)
    )
    }
    tumorSide
    {
    type patch;
    faces
    (
        (8 24 28 12)
        (12 28 29 13)
        (13 29 30 14)
        (14 30 31 15)
        (11 15 31 27)
    )
    }
    capWall
    {
        type wall;
        faces
        (
        (4 20 21 5)
        (6 22 23 7)
        (5 21 25 9)
        (6 10 26 22)
        (8 9 25 24)
        (10 11 27 26)
        (0 1 17 16)
        (1 2 18 17)
        (2 3 19 18)
        );
    }

    frontAndBack
    {
        type empty;
        faces
        (
            (0 4 5 1)
            (16 17 21 20)
        (1 5 6 2)
        (17 18 22 21)
        (2 6 7 3)
        (18 19 23 22)
        (5 9 10 6)
        (21 22 26 25)
        (8 12 13 9)
        (24 25 29 28)
        (9 13 14 10)
        (25 26 30 29)
        (10 14 15 11)
        (26 27 31 30)
        );
    }
);

mergePatchPairs
(
);

// ************************************************************************* //
My U and p files are as follows

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform 1.2e5;

boundaryField
{
    inlet
    {
        type            fixedValue;
    value        uniform 1.5e8;
    }

    outlet
    {
        type            fixedValue;
    value        uniform 0;
    }

    tumorSide
    {
        type            fixedValue;
    value        uniform 1.2e5;
    }

    capWall
    {
    type        zeroGradient;
    }

    frontAndBack
    {
        type            empty;
    }
}

// ************************************************************************* //
Code:
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;
    }

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

    tumorSide
    {
    type        zeroGradient;
    }

    frontAndBack
    {
        type            empty;
    }
}

// ************************************************************************* //
And I have attached a picture of the results I am getting so far.
pv_eruption.jpg

The system is pretty simple so I am sure I am missing something simple, but I have spent all day trying to find it without success so any input would be appreciated.

Thanks in advance,

Joe

edit: I just realized I didn't make it clear what my problem was. Rather than forward flow through my pipe, flow seems to be driven toward the walls where it quickly dies. I need to figure out how to develop normal flow through the system.

Last edited by josephn; December 18, 2014 at 21:03. Reason: Clarification of problem
josephn is offline   Reply With Quote

Old   December 23, 2014, 03:44
Default Found the problem
  #2
New Member
 
Joseph Nichols
Join Date: Dec 2014
Posts: 5
Rep Power: 11
josephn is on a distinguished road
I was missing a semicolon in the blockMeshDict, so my outlet and walls were getting mixed up. Details, details...
josephn is offline   Reply With Quote

Reply

Tags
blockmesh, boundary, icofoam


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
Issues on the simulation of high-speed compressible flow within turbomachinery dowlee OpenFOAM Running, Solving & CFD 11 August 6, 2021 07:40
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 07:28
Low Mixing time Problem Mavier CFX 5 April 29, 2013 01:00
Setting outlet Pressure boundary condition using CAFFA code Mukund Pondkule Main CFD Forum 0 March 16, 2011 04:23
what the result is negatif pressure at inlet chong chee nan FLUENT 0 December 29, 2001 06:13


All times are GMT -4. The time now is 04:25.