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

BC on flow around a square?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 29, 2014, 14:34
Default BC on flow around a square? [icoFoam]
  #1
New Member
 
Join Date: Sep 2014
Posts: 12
Rep Power: 12
Wizze is on a distinguished road
Hey everyone

I am trying to simulate a flow around a square using icoFoam. I can't figure out what my boundary conditions are supposed to be. Any suggestions on how i should do it? I have tried to depict my case in the attached picture. I have created my mesh by using ICEM.

I am getting the "Floating point exception (core dumped)" error.





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
{
    TOP
    {
        type            slip;

    }

    OUTLET
    {
        type            fixedValue;
	value		uniform 0;
    }

    BOTTOM
    {
        type            slip;
    }
    INLET
    {
        type            zeroGradient;
    }
    WALL
    {
        type            zeroGradient;
    }
}

// ************************************************************************* //
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
{
    TOP
    {
        type            slip;

    }

    OUTLET
    {
        type            zeroGradient;
    }

    BOTTOM
    {
        type            slip;
    }
    INLET
    {
        type            fixedValue;
	value		uniform (10 0 0);
    }
    WALL
    {
        type            fixedValue;
	value		uniform (0 0 0);
    }
}

// ************************************************************************* //
Attached Images
File Type: jpg Selection_001.jpg (22.1 KB, 12 views)

Last edited by Wizze; September 30, 2014 at 11:07. Reason: Problem changed from piso to icoFoam
Wizze is offline   Reply With Quote

Old   September 30, 2014, 12:15
Default
  #2
New Member
 
mohsen cheraghi
Join Date: Jun 2010
Location: Switzerland
Posts: 28
Rep Power: 16
mohsen cheraghi is on a distinguished road
Quote:
Originally Posted by Wizze View Post
Hey everyone

I am trying to simulate a flow around a square using icoFoam. I can't figure out what my boundary conditions are supposed to be. Any suggestions on how i should do it? I have tried to depict my case in the attached picture. I have created my mesh by using ICEM.

I am getting the "Floating point exception (core dumped)" error.





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
{
    TOP
    {
        type            slip;

    }

    OUTLET
    {
        type            fixedValue;
	value		uniform 0;
    }

    BOTTOM
    {
        type            slip;
    }
    INLET
    {
        type            zeroGradient;
    }
    WALL
    {
        type            zeroGradient;
    }
}

// ************************************************************************* //
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
{
    TOP
    {
        type            slip;

    }

    OUTLET
    {
        type            zeroGradient;
    }

    BOTTOM
    {
        type            slip;
    }
    INLET
    {
        type            fixedValue;
	value		uniform (10 0 0);
    }
    WALL
    {
        type            fixedValue;
	value		uniform (0 0 0);
    }
}

// ************************************************************************* //
Hi, you shoud change the BC of pressure on the top and bottom to zeroGradient.
mohsen cheraghi is offline   Reply With Quote

Old   September 30, 2014, 12:20
Default
  #3
New Member
 
Join Date: Sep 2014
Posts: 12
Rep Power: 12
Wizze is on a distinguished road
How come? I want the top and bottom to not have the non-slip condition (so the square I am investigating doesn't get affected by this) , hence I have slip as a BC. Does slip only work for velocity since you are only suggesting me to change the pressure BC?
Wizze is offline   Reply With Quote

Old   September 30, 2014, 12:25
Default
  #4
New Member
 
mohsen cheraghi
Join Date: Jun 2010
Location: Switzerland
Posts: 28
Rep Power: 16
mohsen cheraghi is on a distinguished road
Quote:
Originally Posted by Wizze View Post
How come? I want the top and bottom to not have the non-slip condition (so the square I am investigating doesn't get affected by this) , hence I have slip as a BC. Does slip only work for velocity since you are only suggesting me to change the pressure BC?
I think slip condition for v and zeroGradient for P is OK.
mohsen cheraghi is offline   Reply With Quote

Old   September 30, 2014, 12:28
Default
  #5
New Member
 
Join Date: Sep 2014
Posts: 12
Rep Power: 12
Wizze is on a distinguished road
Could you please explain in detail? :-)
Wizze is offline   Reply With Quote

Old   September 30, 2014, 12:32
Default
  #6
New Member
 
mohsen cheraghi
Join Date: Jun 2010
Location: Switzerland
Posts: 28
Rep Power: 16
mohsen cheraghi is on a distinguished road
Slip BC is defined for velocity. it considers zero gradient for tangential component and zero value for normal component. But, for pressure as a scalar field, you should put zeroGradient.
mohsen cheraghi is offline   Reply With Quote

Old   September 30, 2014, 12:35
Default
  #7
New Member
 
Join Date: Sep 2014
Posts: 12
Rep Power: 12
Wizze is on a distinguished road
Still not working. I suspect something is wrong in my fvschemses and fvsolution files. I just used what I found in the icoFoam cavity tutorial. Any suggestions?
Wizze 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
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 06:21
flow over a cylinder urgent! kevin FLUENT 8 August 11, 2015 14:00
Simulation flow past square cylinder 3d Gabba82 FLUENT 0 November 22, 2009 08:05
Can 'shock waves' occur in viscous fluid flows? diaw Main CFD Forum 104 February 16, 2006 06:44
Slug flow in square channel PaulC FLUENT 0 December 5, 2005 03:03


All times are GMT -4. The time now is 00:01.