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

3D cylinder problem

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Saideep

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 21, 2017, 16:30
Default 3D cylinder problem
  #1
New Member
 
Ajay
Join Date: Jul 2017
Posts: 5
Rep Power: 9
vkannama is on a distinguished road
Dear all,

I am new to openfoam and trying to solve a simple 3D cylinder laminar flow problem. I obtained the geometry from Cylinder mesh using blockMesh with m4 macro and, using paraview, everything is good with geometry. The BCs are: inlet velocity is 1m/s and outlet pressure is 0. I earlier solved this problem in Nek5000 and both the velocity and pressure-drop matches with the theoretical values. However, in openfoam, the velocities and pressure are both strange. For example, the axial pressure drop is supposed to be linear, while my result is shown attached.

Please point any mistakes from the relevant input files pasted below, or anything else I might be doing. I will be grateful.

Thanks,
Ajay

******** controlDict file ******
application icoFoam;

deltaT 0.005;

******** fvSolution ******
solvers
{
p
{
solver PCG;
preconditioner DIC;
tolerance 1e-07;
relTol 0;
}

pFinal
{
$p;
relTol 0;
}

U
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-07;
relTol 0;
}
}

PISO
{
nCorrectors 2;
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
}

******** velocity BC/IC (U) ******
dimensions [0 1 -1 0 0 0 0];

internalField uniform (1 0 0);

boundaryField
{
inlet
{
type fixedValue;
value uniform (1 0 0);
}

walls
{
type noSlip;
}

outlet
{
type zeroGradient;
}
}
******** pressure BC/IC (p) ******
dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{

inlet
{
type zeroGradient;
}

outlet
{
type fixedValue;
value uniform 0;
}

walls
{
type zeroGradient;
}
}
Attached Images
File Type: png pressuredrop.png (16.7 KB, 21 views)
vkannama is offline   Reply With Quote

Old   November 22, 2017, 09:46
Default
  #2
New Member
 
Garet Potu
Join Date: Nov 2017
Posts: 2
Rep Power: 0
Gret is on a distinguished road
I have the same problem
Gret is offline   Reply With Quote

Old   November 22, 2017, 09:53
Default
  #3
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Quote:
a simple 3D cylinder laminar flow problem
Could you elaborate? Basic question is "Why icoFoam?"
alexeym is offline   Reply With Quote

Old   November 22, 2017, 11:14
Default
  #4
Senior Member
 
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12
Saideep is on a distinguished road
Hi;

I did not use blockmesh but generated an .stl and ran my simulations using icoFoam and I get reasonable results.

1. I am not sure if 'noSlip' is a keyword added to latest versions of OpenFOAM but you can replace it with
wall
{
type fixedValue;
value uniform (0 0 0);
}

2. I guess the time step size is quite high. Try with 5e-7.

3. If possible try to refine your mesh. The finer it is, I see the results converge better to reality.

Let me know if you want my case file. I will drop it.
Saideep is offline   Reply With Quote

Old   November 22, 2017, 11:24
Default
  #5
Senior Member
 
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12
Saideep is on a distinguished road
Found my case easier. Attached the case.

Just run:
1. surfaceFeatureExtract
2. blockMesh
3. snappyHexMesh -overwrite
4. icoFoam
Attached Files
File Type: zip hor_cy_CFD.zip (27.5 KB, 25 views)
vkannama likes this.
Saideep is offline   Reply With Quote

Old   November 22, 2017, 14:02
Default
  #6
New Member
 
Ajay
Join Date: Jul 2017
Posts: 5
Rep Power: 9
vkannama is on a distinguished road
Quote:
Originally Posted by Saideep View Post
Found my case easier. Attached the case.

Just run:
1. surfaceFeatureExtract
2. blockMesh
3. snappyHexMesh -overwrite
4. icoFoam
Hi Saideep, this worked very nicely! I see a parabolic velocity profile and linear pressure drop. Don't really understand the steps you've written. I will get back to you if I have any trouble. Thank you.

Quote:
Originally Posted by alexeym View Post
Hi,
Could you elaborate? Basic question is "Why icoFoam?"
Hi Alex, I thought icoFoam is the simplest solver for my purpose (laminar, not steady state). Are there any alternatives? Please let me know. Would like to try others.
vkannama is offline   Reply With Quote

Reply

Tags
openfoam


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
Dynamic Structured mesh around cylinder problem!!! ludosbiz Mesh Generation & Pre-Processing 2 March 23, 2016 16:15
Problem of convergence- simulation of flow wind around cylinder activo FLUENT 6 October 23, 2015 02:57
problem of the drag's convergence for a circular cylinder with a synthetic jet (udf) bia FLUENT 0 February 17, 2015 12:06
Problem solving a cylinder case 2d. Simple Foam vbesteban OpenFOAM Running, Solving & CFD 0 October 16, 2014 17:51
solving airfoil like square cylinder problem? zonexo Main CFD Forum 1 May 27, 2006 16:16


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