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

Solving Flow past Square Cylinder

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

Like Tree1Likes
  • 1 Post By RodriguezFatz

Reply
 
LinkBack Thread Tools Display Modes
Old   October 7, 2013, 05:27
Post Solving Flow past Square Cylinder
  #1
Senior Member
 
Join Date: Sep 2013
Location: Bangalore India
Posts: 134
Rep Power: 3
sam.ho is on a distinguished road
Hi
I have set up the case with following details,
Velocity : 1 m/s
Re : 100
dt : 0.005
But i am not able to get von-karmen vortices in my results.. Please Look at the attachments and suggest how can i improve this results .
sam.ho is offline   Reply With Quote

Old   October 7, 2013, 07:22
Default
  #2
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,097
Rep Power: 16
RodriguezFatz will become famous soon enough
Hey,

1) Can you post your numerical settings? You can use the "code" tags (go for advanced posting") and copy the code into this textbox. This is much better to read than the pictures.
2) You don't use a turbulence model, right? Can you tell us the size of the bluff-body and the viscosity?
3) How does the grid look like?

Philipp.
__________________
The skeleton ran out of shampoo in the shower.

Last edited by RodriguezFatz; October 7, 2013 at 07:23. Reason: forgot 3)
RodriguezFatz is offline   Reply With Quote

Old   October 7, 2013, 07:37
Default This is my numerical settings
  #3
Senior Member
 
Join Date: Sep 2013
Location: Bangalore India
Posts: 134
Rep Power: 3
sam.ho is on a distinguished road
Quote:
Originally Posted by RodriguezFatz View Post
Hey,

1) Can you post your numerical settings? You can use the "code" tags (go for advanced posting") and copy the code into this textbox. This is much better to read than the pictures.
2) You don't use a turbulence model, right? Can you tell us the size of the bluff-body and the viscosity?
3) How does the grid look like?

Philipp.
The Block meshDict is .....
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 0.01;

vertices
(
(0 0 0) //0
(50 0 0) //1
(55 0 0) //2
(205 0 0) //3
(205 47.5 0) //4
(205 52.5 0) //5
(205 100 0) //6
(55 100 0) //7
(50 100 0) //8
(0 100 0) //9
(0 52.5 0) //10
(0 47.5 0) //11
(50 47.5 0) //12
(55 47.5 0) //13
(55 52.5 0) //14
(50 52.5 0) //15
(0 0 1) //16
(50 0 1) //17
(55 0 1) //18
(205 0 1) //19
(205 47.5 1) //20
(205 52.5 1) //21
(205 100 1) //22
(55 100 1) //23
(50 100 1) //24
(0 100 1) //25
(0 52.5 1) //26
(0 47.5 1) //27
(50 47.5 1) //28
(55 47.5 1) //29
(55 52.5 1) //30
(50 52.5 1) //31
);

blocks
(
hex (0 1 12 11 16 17 28 27) (100 100 1) simpleGrading (1 1 1) //0
hex (1 2 13 12 17 18 29 28) (20 100 1) simpleGrading (1 1 1) //1
hex (2 3 4 13 18 19 20 29) (300 100 1) simpleGrading (1 1 1) //2
hex (13 4 5 14 29 20 21 30) (300 20 1) simpleGrading (1 1 1) //3
hex (14 5 6 7 30 21 22 23) (300 100 1) simpleGrading (1 1 1) //4
hex (15 14 7 8 31 30 23 24) (20 100 1) simpleGrading (1 1 1) //5
hex (10 15 8 9 26 31 24 25) (100 100 1) simpleGrading (1 1 1) //6
hex (11 12 15 10 27 28 31 26) (100 20 1) simpleGrading (1 1 1) //7
);

edges
(
);

boundary
(
inlet
{
type patch;
faces
(
(0 16 27 11) //face A
(11 27 26 10) //face B
(10 26 25 9) //face C
);
}
outlet
{
type patch;
faces
(
(3 4 20 19) //face D
(4 5 21 20) //face E
(5 6 22 21) //face F
);
}
fixedWalls
{
type wall;
faces
(
(0 16 17 1) //face J
(1 17 18 2) //face K
(2 18 19 3) //face L
(9 25 24 8) //face G
(8 24 23 7) //face H
(7 23 22 6) //face I

);
}
cube
{
type wall;
faces
(
(12 28 31 15)
(14 15 31 30)
(13 29 30 14)
(12 13 29 28)

);

}
frontAndBack
{
type empty;
faces
(
(0 11 12 1) //face 0
(1 12 13 2) //face 1
(2 13 4 3) //face 2
(13 14 5 4) //face 3
(14 7 6 5) //face 4
(15 8 7 14) //face 5
(10 9 8 15) //face 6
(11 10 15 12) //face 7
(16 17 28 27) //face 8
(17 18 29 28) //face 9
(18 19 20 29) //face 10
(29 20 21 30) //face 11
(30 21 22 23) //face 12
(31 30 23 24) //face 13
(26 31 24 25) //face 14
(27 28 31 26) //face 15
);
}
);

mergePatchPairs
(
);

// ************************************************** *********************** //

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform 0;

boundaryField
{

inlet
{
type freestreamPressure;
}
outlet
{
type freestreamPressure;
}
fixedWalls
{
type slip;
}
cube
{
type zeroGradient;
}

frontAndBack
{
type empty;
}
}

// ************************************************** *********************** //
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform (1 0 0);

boundaryField
{

inlet
{
type freestream;
freestreamValue uniform (1 0 0);
}
outlet
{
type freestream;
freestreamValue uniform (1 0 0);
}

fixedWalls
{
type slip;
}
cube
{
type fixedValue;
value uniform (0 0 0);
}

frontAndBack
{
type empty;
}
}

// ************************************************** *********************** //
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application icoFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 20;

deltaT 0.05;

writeControl timeStep;

writeInterval 20;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;


// ************************************************** *********************** //

i have not used turbulant.. Its icoFOAM solver.

Length : 2.05 m
Width : 1 m
square block : 0.05 X 0.05 X 0.05 m
Attached Images
File Type: jpg Screenshot from 2013-10-07 17:00:04.jpg (63.1 KB, 14 views)
sam.ho is offline   Reply With Quote

Old   October 7, 2013, 07:45
Default
  #4
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,097
Rep Power: 16
RodriguezFatz will become famous soon enough
Isn't this 2d?
Please post your "fvSchemes". And please use the "code" tags in the advanced texting to post code...
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   October 7, 2013, 07:48
Post fvSchemes
  #5
Senior Member
 
Join Date: Sep 2013
Location: Bangalore India
Posts: 134
Rep Power: 3
sam.ho is on a distinguished road
fvSchemes ...

FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
default Euler;
}

gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
}

divSchemes
{
default none;
div(phi,U) Gauss linear;
}

laplacianSchemes
{
default none;
laplacian(nu,U) Gauss linear orthogonal;
laplacian((1|A(U)),p) Gauss linear orthogonal;
}

interpolationSchemes
{
default linear;
interpolate(HbyA) linear;
}

snGradSchemes
{
default orthogonal;
}

fluxRequired
{
default no;
p ;
}


// ************************************************** *********************** //
sam.ho is offline   Reply With Quote

Old   October 7, 2013, 07:50
Post 2D problem
  #6
Senior Member
 
Join Date: Sep 2013
Location: Bangalore India
Posts: 134
Rep Power: 3
sam.ho is on a distinguished road
Hi,
i am solving 2D problem...
I am beginner in this field...
If i am wrong sometime then correct me ..
sam.ho is offline   Reply With Quote

Old   October 7, 2013, 07:53
Default
  #7
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,097
Rep Power: 16
RodriguezFatz will become famous soon enough
Ok, so I am not used to this meshDict, since I use ICEM for the grid.
1) Is this a 2d case or 3d?
2) What frequency for the vorticies do you expect? I made a quick calculation and got f=4Hz, so T=0.25s. Now, with your dt=0.05s you get only 5 dt per cycle. This doesn't seem to be enough. Go for dt=0.005. Also, you have to wait quite a long time until von Kármán shows up...
3) Where is this "slip" boundary condition you use?

Edit... dt=0.01 should be sufficient...

I would try "backward" time differencing. It is stable and I have no clue, whether Euler introduces damping for such a case. Maybe someone can comment on that...
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   October 7, 2013, 08:00
Default 2D problem
  #8
Senior Member
 
Join Date: Sep 2013
Location: Bangalore India
Posts: 134
Rep Power: 3
sam.ho is on a distinguished road
this is a 2D problem
But if i go with 0.005 the courrant no exceeding 1.
Top and bottom surface of duct having slip condition
sam.ho is offline   Reply With Quote

Old   October 7, 2013, 08:05
Default
  #9
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,097
Rep Power: 16
RodriguezFatz will become famous soon enough
Wait. I was talking about the time-step "dt". Lower the time-step to 0.01. Then, the Courant number becomes smaller - not higher. This is good!
Also, for a stable time-differencing (backward) you don't have to care about Courant number that much. It is always stable, just the accuracy suffers.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   October 7, 2013, 15:20
Default
  #10
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,097
Rep Power: 16
RodriguezFatz will become famous soon enough
Also, you write "dt=0.005" in your initial post, but your input file (controlDict) says 0.05!
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   October 7, 2013, 23:37
Default Hi
  #11
Senior Member
 
Join Date: Sep 2013
Location: Bangalore India
Posts: 134
Rep Power: 3
sam.ho is on a distinguished road
Hi,
I have re-run the case with dt=0.001 s. Corrant no is well within 1 but Von-Karman vortices are not coming up. I simulated up to 30 sec.
What will be the problem ?
sam.ho is offline   Reply With Quote

Old   October 8, 2013, 04:36
Default
  #12
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,097
Rep Power: 16
RodriguezFatz will become famous soon enough
Some possibilities:
1) Sometimes I had to wait a long time until the vortex street developed. 30s / 4s are not even 10 periods. Maybe it was not enough.
2) Switch the time scheme from "Euler" to "backward"
3) Maybe your domain is too small. But it doesn't look like that...
4) What solver do you use? Can you post, what exactly you type into the terminal to start the solver?
5) You should use a "velocity inlet" and "pressure outlet".
For the velocity try:
Code:
inlet
    {
          type fixed value;
          value uniform (1 0 0);
     }
    outlet
    {
          type zeroGradient;
     }
and for the pressure try:
Code:
inlet
    {
          type zeroGradient;
     }
    outlet
    {
          type fixed value;
          value uniform 0.0;
     }
6) Please post your constant/transportProperties file.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   October 8, 2013, 05:03
Default This is my numerical settings
  #13
Senior Member
 
Join Date: Sep 2013
Location: Bangalore India
Posts: 134
Rep Power: 3
sam.ho is on a distinguished road
Hi,
i have prepared an attachment which depicts the whole set up.. but not able to attach the file with this ...

Some possibilities:
1) Sometimes I had to wait a long time until the vortex street developed. 30s / 4s are not even 10 periods. Maybe it was not enough. solution remains same even though we increase the time .
2) Switch the time scheme from "Euler" to "backward"
3) Maybe your domain is too small. But it doesn't look like that... no domain is very huge

4) What solver do you use? Can you post, what exactly you type into the terminal to start the solver?
icoFoam
sam.ho is offline   Reply With Quote

Old   October 8, 2013, 05:11
Default constant and transport
  #14
Senior Member
 
Join Date: Sep 2013
Location: Bangalore India
Posts: 134
Rep Power: 3
sam.ho is on a distinguished road
Please find the attachment
Attached Files
File Type: pdf cost and trans.pdf (26.3 KB, 7 views)
sam.ho is offline   Reply With Quote

Old   October 8, 2013, 05:17
Default
  #15
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,097
Rep Power: 16
RodriguezFatz will become famous soon enough
The size of the bluff body is 0.05? Then, your Reynolds Number is 5, not 100. Is there a vortex street for Re=5?

It's Re = U*L/nu.
not Re = U/nu.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   October 8, 2013, 05:17
Default o and system files
  #16
Senior Member
 
Join Date: Sep 2013
Location: Bangalore India
Posts: 134
Rep Power: 3
sam.ho is on a distinguished road
Please find the attachment
Attached Files
File Type: pdf 0 and system files .pdf (28.4 KB, 8 views)
sam.ho is offline   Reply With Quote

Old   October 8, 2013, 05:22
Default Thank you
  #17
Senior Member
 
Join Date: Sep 2013
Location: Bangalore India
Posts: 134
Rep Power: 3
sam.ho is on a distinguished road
Quote:
Originally Posted by RodriguezFatz View Post
The size of the bluff body is 0.05? Then, your Reynolds Number is 5, not 100. Is there a vortex street for Re=5?

It's Re = U*L/nu.
not Re = U/nu.
ya exactly true...
L is characteristic length
For Re=5 there will not be vortex formation
sam.ho is offline   Reply With Quote

Old   October 8, 2013, 05:25
Default
  #18
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,097
Rep Power: 16
RodriguezFatz will become famous soon enough
If you post code / files:
Click on the "Go advanced" button. In the advanced posting form click on the "#". Here we go. Post the code between the "CODE" tags. No files needed.
sam.ho likes this.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   March 5, 2015, 04:50
Default
  #19
New Member
 
Join Date: Feb 2015
Posts: 3
Rep Power: 2
GAURAV KUMAR is on a distinguished road
Do u have procedure to create mesh for sqaure in ICEM.I have to do this same problem USING ICEM IN ANSYS.
GAURAV KUMAR is offline   Reply With Quote

Old   March 5, 2015, 05:15
Default
  #20
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,097
Rep Power: 16
RodriguezFatz will become famous soon enough
In ICEM getting a mesh such as shown above is pretty easy. Maybe 5 minutes if you know what to do. Where exactly are you stuck?
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz 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
transsonic nozzle with rhoSimpleFoam Unseen OpenFOAM Running, Solving & CFD 7 April 16, 2014 03:38
Floating point exception error Alan OpenFOAM Running, Solving & CFD 10 April 6, 2012 14:02
Extrusion with OpenFoam problem No. Iterations 0 Lord Kelvin OpenFOAM 6 April 12, 2011 11:24
Computational time sunnysun OpenFOAM Running, Solving & CFD 5 March 16, 2009 04:32
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58


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