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

flow over cylinder

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

Like Tree2Likes
  • 1 Post By Yann
  • 1 Post By geth03

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 8, 2023, 08:41
Default flow over cylinder
  #1
Senior Member
 
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 7
saeed jamshidi is on a distinguished road
Hi,
i'm going to simulate flow over cylinder, to this end, i genereted a mesh in ansys workbench and the imported via fluentMeshToFoam command in ubuntu.
however, i applied blockMesh and pimpleFoam respectively.
finally i encountered with the fatal error below;
would you please helpe me?


myfoam@DESKTOP-TK3D7CI:~/OpenFOAM-sims/tutorials/incompressible/pimpleFoam/laminar/cylinder2D$ pimpleFoam
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2112 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : _6e1fca0e-20220610 OPENFOAM=2112 patch=220610 version=2112
Arch : "LSB;label=32;scalar=64"
Exec : pimpleFoam
Date : Aug 08 2023
Time : 15:03:27
Host : DESKTOP-TK3D7CI
PID : 6586
I/O : uncollated
Case : /home/myfoam/OpenFOAM-sims/tutorials/incompressible/pimpleFoam/laminar/cylinder2D
nProcs : 1
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 5, maxFileModificationPolls 20)
allowSystemOperations : Allowing user-supplied system call operations

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

Create mesh for time = 0


PIMPLE: Operating solver in PISO mode

Reading field p

--> FOAM Warning :
From void Foam:olyBoundaryMesh::calcGroupIDs() const
in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 100
Removed group 'allPatches' which clashes with patch 0 of the same name.
Reading field U

Reading/calculating face flux field phi



--> FOAM FATAL IO ERROR: (openfoam-2112 patch=220610)
Unable to set reference cell for field p
Please supply either pRefCell or pRefPoint


file: system/fvSolution.PIMPLE at line 50 to 51.

From bool Foam::setRefCell(const volScalarField&, const volScalarField&, const Foam::dictionary&, Foam::label&, Foam::scalar&, bool)
in file cfdTools/general/findRefCell/findRefCell.C at line 100.

FOAM exiting

myfoam@DESKTOP-TK3D7CI:~/OpenFOAM-sims/tutorials/incompressible/pimpleFoam/laminar/cylinder2D$
saeed jamshidi is offline   Reply With Quote

Old   August 8, 2023, 08:43
Default
  #2
Senior Member
 
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 7
saeed jamshidi is on a distinguished road
myfoam@DESKTOP-TK3D7CI:~/OpenFOAM-sims/tutorials/incompressible/pimpleFoam/laminar/cylinder2D$ blockMesh
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2112 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\---------------------------------------------------------------------------/
Build : _6e1fca0e-20220610 OPENFOAM=2112 patch=220610 version=2112
Arch : "LSB;label=32;scalar=64"
Exec : blockMesh
Date : Aug 08 2023
Time : 15:03:24
Host : DESKTOP-TK3D7CI
PID : 6585
I/O : uncollated
Case : /home/myfoam/OpenFOAM-sims/tutorials/incompressible/pimpleFoam/laminar/cylinder2D
nProcs : 1
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 5, maxFileModificationPolls 20)
allowSystemOperations : Allowing user-supplied system call operations

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

Creating block mesh from "system/blockMeshDict"
No non-linear block edges defined
No non-planar block faces defined
Creating topology blocks

Creating topology patches - from boundary section

Creating block mesh topology

Check topology

Basic statistics
Number of internal faces : 0
Number of boundary faces : 6
Number of defined boundary faces : 6
Number of undefined boundary faces : 0
Checking patch -> block consistency

Creating block offsets
Creating merge list (topological search)...
Deleting polyMesh directory "constant/polyMesh"

Creating polyMesh from blockMesh
Creating patches
Creating cells
Creating points with scale (1 1 1)
Block 0 cell size :
i : 0.01066666666666666 .. 0.0106666666666666
j : 0.008000000000000007 .. 0.008000000000000007
k : 0.0075 .. 0.0075


There are no merge patch pairs

Writing polyMesh with 0 cellZones
----------------
Mesh Information
----------------
boundingBox: (-0.16 -0.24 -0.003750000000000001) (0.8000000000000002 0.24 0.003750000000000001)
nPoints: 11102
nCells: 5400
nFaces: 21750
nInternalFaces: 10650
----------------
Patches
----------------
patch 0 (start: 10650 size: 11100) name: allPatches

End
saeed jamshidi is offline   Reply With Quote

Old   August 8, 2023, 08:46
Default
  #3
Senior Member
 
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 7
saeed jamshidi is on a distinguished road
myfoam@DESKTOP-TK3D7CI:~/OpenFOAM-sims/tutorials/incompressible/pimpleFoam/laminar/cylinder2D$ fluentMeshToFoam cylinder.msh
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2112 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : _6e1fca0e-20220610 OPENFOAM=2112 patch=220610 version=2112
Arch : "LSB;label=32;scalar=64"
Exec : fluentMeshToFoam cylinder.msh
Date : Aug 08 2023
Time : 15:03:21
Host : DESKTOP-TK3D7CI
PID : 6584
I/O : uncollated
Case : /home/myfoam/OpenFOAM-sims/tutorials/incompressible/pimpleFoam/laminar/cylinder2D
nProcs : 1
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 5, maxFileModificationPolls 20)
allowSystemOperations : Allowing user-supplied system call operations

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

Embedded blocks in comment or unknown: (
Embedded blocks in comment or unknown:(
Found end of section in unknown:)
Embedded blocks in comment or unknown:(
Found end of section in unknown:)
Found end of section in unknown:)
Embedded blocks in comment or unknown: (
Embedded blocks in comment or unknown:(
Found end of section in unknown:)
Embedded blocks in comment or unknown:
(
Found end of section in unknown:)
Found end of section in unknown:)
Embedded blocks in comment or unknown: (
Embedded blocks in comment or unknown:(
Found end of section in unknown:)
Found end of section in unknown:)
Embedded blocks in comment or unknown: (
Embedded blocks in comment or unknown:(
Found end of section in unknown:)
Embedded blocks in comment or unknown:(
Found end of section in unknown:)
Found end of section in unknown:)
Dimension of grid: 2
Number of points: 8469

number of faces: 23224
Number of cells: 14755
Reading points
Reading points
Reading uniform faces
Reading uniform faces
Reading uniform faces
Reading uniform faces
Reading uniform faces
Reading uniform faces
Reading uniform faces
Other readCellGroupData: 3 1 39a3 1 0
Reading mixed cells
Read zone1:1 name:interior-surface_body patchTypeID:interior
Reading zone data
Read zone1:2 name:surface_body patchTypeID:interior
Reading zone data
Read zone1:3 name:solid-surface_body patchTypeID:fluid
Reading zone data
Read zone1:6 name:inlet patchTypeID:velocity-inlet
Reading zone data
Read zone1:7 name:outlet patchTypeID:pressure-outlet
Reading zone data
Read zone1:8 name:up patchTypeID:wall
Reading zone data
Read zone1:9 name:cylinder patchTypeID:wall
Reading zone data
Read zone1:10 name:down patchTypeID:wall
Reading zone data


FINISHED LEXING


dimension of grid: 2
Grid is 2-D. Extruding in z-direction by: 0.0322490309931942
Creating shapes for 2-D cells
Building patch-less mesh...--> FOAM Warning :
From Foam::polyMesh::polyMesh(const Foam::IOobject&, Foam::pointField&&, const cellShapeList&, const faceListList&, const wordList&, const wordList&, const Foam::word&, const Foam::word&, const wordList&, bool)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 646
Found 29756 undefined faces in mesh; adding to default patch defaultFaces
done.

Building boundary and internal patches.
Creating patch 0 for zone: 1 start: 1 end: 22594 type: interior name: interior-surface_body
Creating patch 1 for zone: 2 start: 22595 end: 22978 type: interior name: surface_body
Creating patch 2 for zone: 6 start: 22979 end: 22989 type: velocity-inlet name: inlet
Creating patch 3 for zone: 7 start: 22990 end: 23031 type: pressure-outlet name: outlet
Creating patch 4 for zone: 8 start: 23032 end: 23053 type: wall name: up
Creating patch 5 for zone: 9 start: 23054 end: 23202 type: wall name: cylinder
Creating patch 6 for zone: 10 start: 23203 end: 23224 type: wall name: down
Creating patch for front and back planes

Patch interior-surface_body is internal to the mesh and is not being added to the boundary.
Patch surface_body is internal to the mesh and is not being added to the boundary.
Adding new patch inlet of type patch as patch 0
Adding new patch outlet of type patch as patch 1
Adding new patch up of type wall as patch 2
Adding new patch cylinder of type wall as patch 3
Adding new patch down of type wall as patch 4
Adding new patch frontAndBackPlanes of type empty as patch 5

Writing mesh... to "constant/polyMesh" done.


End
saeed jamshidi is offline   Reply With Quote

Old   August 8, 2023, 08:55
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,026
Rep Power: 25
Yann will become famous soon enough
Hello,

If you import a mesh from fluent thanks to fluentMeshToFoam, there is no reason to run blockMesh which will create a new mesh based on system/blockMeshDict settings. (and overwrite the mesh you have imported with fluentMeshToFoam)

Regards,
Yann
Yann is online now   Reply With Quote

Old   August 8, 2023, 09:11
Default
  #5
Senior Member
 
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 7
saeed jamshidi is on a distinguished road
My ultimate goal is to use snappyhexmesh, would you please tell me how i could generate such a mesh that i have attached;
Thanks.
Attached Images
File Type: jpg Screenshot_2023-08-08-15-38-57-731_cn.wps.moffice_eng.jpg (157.8 KB, 15 views)
saeed jamshidi is offline   Reply With Quote

Old   August 8, 2023, 09:25
Default
  #6
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,026
Rep Power: 25
Yann will become famous soon enough
Why do you create a mesh in Ansys workbench if you intend to use snappy?
If you already created a mesh in workbench you can convert it to OpenFOAM format with fluentMeshToFoam and then move on to the simulation setup.

If you want to use snappyHexMesh you need:
  1. To create the geometry you want to mesh (a cylinder) as a STL or OBJ file. Since you only want a simple cylinder you can skip this step and directly define your cylinder in snappyHexMeshDict as a searchableCylinder (see step 3)
  2. To run blockMesh to create an initial mesh which will define your domain boundaries. This mesh is defined in system/blockMeshDict
  3. To run snappyHexMesh, which uses the parameters in system/snappyHexMeshDict

I suggest to read the user guide and check some tutorials using snappyHexMesh to get familiar with the workflow, then move on your own geometry.

Yann
saeed jamshidi likes this.
Yann is online now   Reply With Quote

Old   August 10, 2023, 08:01
Default
  #7
Senior Member
 
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 355
Rep Power: 8
geth03 is on a distinguished road
@saeed jamshidi
1.from your input i see that the ansys mesh has 2 dimensions, so i assume you want to simulate a 2D case !?!?
2. snappyHexMesh will not mesh a 2D body/cad-file (name it as you want). you will get more than 1 cell in the third dimension, extracting a 2D mesh from a 3D mesh is complicated.
3. the error message says that you did not provide a reference cell for p (pressure). didn't you set the outlet BC to fixedValue?
i guess after executing blockMesh (which you should not bc you already imported a complete mesh from ansys) this changed your boundary also.
saeed jamshidi likes this.
geth03 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Drag force coefficient too low for a flow past cylinder at Re= 1e05 Scabbard STAR-CCM+ 2 June 5, 2020 15:44
Flow past a cylinder at Re 1e05 using LES, drag force coefficient is to low Scabbard Main CFD Forum 21 June 19, 2018 14:58
Flow around cylinder free to rotate Jonas Holdeman Main CFD Forum 5 August 3, 2015 18:54
benchmark: flow over a circular cylinder goodegg Main CFD Forum 12 January 22, 2013 12:47
Flow over a cylinder Anna Main CFD Forum 9 March 24, 2006 15:32


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