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

2D flow around a circular cylinder case with interFoam solver

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 31, 2013, 06:04
Default 2D flow around a circular cylinder case with interFoam solver
  #1
Member
 
Yao Lu
Join Date: May 2013
Posts: 33
Rep Power: 13
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

Reply

Tags
flow around a cylinder, interfoam


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
flow over a cylinder urgent! kevin FLUENT 8 August 11, 2015 14:00
Flow around circular cylinder Karen FLUENT 5 December 12, 2012 11:34
Which Solver/Model to use for flow over Circular Cylinder ? Re [1 , 10^6] WolfgangS. OpenFOAM Running, Solving & CFD 1 December 6, 2010 03:48
3D FLOW OVER A CIRCULAR CYLINDER Srinivas Mettu FLUENT 2 April 4, 2010 23:11
Solver and geometry choose for drag coefficient calculation around circular cylinder at large Re lin OpenFOAM Running, Solving & CFD 3 April 16, 2009 11:50


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