shuoxue |
August 31, 2013 05:04 |
2D flow around a circular cylinder case with interFoam solver
1 Attachment(s)
I'm solving a 2D flow around a circular cylinder case with interFoam solver.
Here are the geometry and BCs.
Attachment 24958
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
|