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

2D flow around a circular cylinder case with interFoam solver

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 31, 2013, 05:09
Default 2D flow around a circular cylinder case with interFoam solver
  #1
Member
 
Yao Lu
Join Date: May 2013
Posts: 29
Rep Power: 3
shuoxue is on a distinguished road
I'm solving a 2D flow around a circular cylinder case with interFoam solver.
Here are the geometry and BCs.
1.jpg

0/U file
Code:
/*--------------------------------*- 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;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    inlet
    {
        type            uniformFixedValue;
        uniformValue    constant (0.0006 0 0);
    }
    outlet
    {
        type            zeroGradient;
    }
    side
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    cylinder
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    qianhou
    {
        type            empty;
    }
}


// ************************************************************************* //
0/p_rhg file
Code:
/*--------------------------------*- 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_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform 0;

boundaryField
{
    inlet
    {
        type            zeroGradient;
    }
    outlet
    {
        type            fixedValue;
        value           uniform 0;
    }
    side
    {
        type            zeroGradient;
    }
    cylinder
    {
        type            zeroGradient;
    }
    qianhou
    {
        type            empty;
    }
}

// ************************************************************************* //
0/alpha1 file
Code:
/*--------------------------------*- 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      alpha;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    inlet
    {
        type            zeroGradient;
    }
    outlet
    {
        type            zeroGradient;
    }
    side
        type            zeroGradient;
    }
    cylinder
    {
        type            zeroGradient;
    }
    qianhou
    {
        type            empty;
    }
}

// ************************************************************************* //
Error occurs when interFoam is executed.
Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.2.0-5be49240882f
Exec   : interFoam
Date   : Aug 31 2013
Time   : 16:18:13
Host   : "luyao"
PID    : 4652
Case   : /home/luyao/OpenFOAM/luyao-2.2.0/run/cylinder
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

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

Create mesh for time = 0


PIMPLE: Operating solver in PISO mode

Reading field p_rgh

Reading field U

Reading/calculating face flux field phi

Reading transportProperties

Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian


--> FOAM FATAL ERROR: 
Attempt to return primitive entry ITstream : /home/luyao/OpenFOAM/luyao-2.2.0/run/cylinder/0/alpha1.boundaryField.side, line 32, IOstream: Version 2.0, format ASCII, line 0, OPENED, GOOD
    primitiveEntry 'side' comprises 
        on line 32 the word 'type'
        on line 32 the word 'zeroGradient'
 as a sub-dictionary

    From function const dictionary& primitiveEntry::dict() const
    in file db/dictionary/primitiveEntry/primitiveEntry.C at line 184.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1  Foam::error::abort() in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2  Foam::primitiveEntry::dict() const in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#3  Foam::dictionary::subDict(Foam::word const&) const in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#4  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::readField(Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/opt/openfoam220/platforms/linuxGccDPOpt/bin/interFoam"
#5  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::readFields(Foam::dictionary const&) in "/opt/openfoam220/platforms/linuxGccDPOpt/bin/interFoam"
#6  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::readFields() in "/opt/openfoam220/platforms/linuxGccDPOpt/bin/interFoam"
#7  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&) in "/opt/openfoam220/platforms/linuxGccDPOpt/bin/interFoam"
#8  Foam::twoPhaseMixture::twoPhaseMixture(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::word const&) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libincompressibleTransportModels.so"
#9  
 in "/opt/openfoam220/platforms/linuxGccDPOpt/bin/interFoam"
#10  __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#11  
 in "/opt/openfoam220/platforms/linuxGccDPOpt/bin/interFoam"
Why zeroGradient cannot be specified?

Thanks in advance.
shuoxue
shuoxue is offline   Reply With Quote

Old   August 31, 2013, 09:33
Default
  #2
Senior Member
 
Kevin Smith
Join Date: Mar 2009
Posts: 103
Rep Power: 7
kev4573 is on a distinguished road
You are missing an open bracket. Also I'd recommend having a fixed value bc for alpha at the inlet.
kev4573 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
k-omega SST simulation of turbulent flow around a circular cylinder DanM OpenFOAM Running, Solving & CFD 16 December 12, 2012 13:39
Flow around circular cylinder Karen FLUENT 5 December 12, 2012 10:34
Solver and geometry choose for drag coefficient calculation around circular cylinder at large Re lin OpenFOAM Running, Solving & CFD 3 April 16, 2009 10:50
flow over a cylinder urgent! kevin FLUENT 7 June 8, 2006 01:19
3D Flow over a circular cylinder Srinivas FLUENT 3 March 15, 2005 19:57


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