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

2D case giving 3D result

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 15, 2011, 14:37
Default 2D case giving 3D result
  #1
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 460
Rep Power: 18
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
Hi all;
trying to solve a simple 2D circular cylinder with simpeFoam but the results I'm getting are actually 3D results, as you can see from the following picture which shows the pressure on the cylinder surface.



The cylinder axis is in the z-direction (so the cylinder lies on the x-y plane). I only have one cell in z-direction and both the planes of the domain parallel to the x-y plane are set as empty.

Could you please check my case directory and tell me what I am doing wrong?

Thank you!

Lorenzo
Attached Files
File Type: zip cilindro2D_2.zip (53.1 KB, 17 views)
lovecraft22 is offline   Reply With Quote

Old   July 15, 2011, 18:39
Default
  #2
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
Looking at your fields, there is a fluctuation in the z component of you simulatiom, which shouldn't happen when you doing a 2D simulation. Your boundary conditions look okay, though I'm curious why you chose slip conditions on the farField; wouldn't it be better to make it an outletInlet?
mturcios777 is offline   Reply With Quote

Old   July 16, 2011, 04:35
Default
  #3
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 460
Rep Power: 18
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
Yes, I could try that! With farField you mean frontAndBack, right?
lovecraft22 is offline   Reply With Quote

Old   July 16, 2011, 06:59
Default
  #4
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 460
Rep Power: 18
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
I changed the boundary on frontAndBack as a symmetryPlane but I still can't get a 2D solution.
lovecraft22 is offline   Reply With Quote

Old   July 17, 2011, 07:31
Default
  #5
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 460
Rep Power: 18
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
I found out the problem: I meshed the cylinder using snappyHexMesh which always gives a 3D mesh. In fact my cylinder surface has more than one cell in Z-direction although my block mesh has only one.
So what we can do is:

1. Use blockMesh only without running snappyHexMesh. This is fine in this case for a simple circular cylinder but is not for different (even simple) geometries, such as an airfoil.

2. Extrude the mesh from snappyHexMesh you have on a plane, using extrudeMesh. Haven't tried that yet. I'll do it later. The tutorial I'll be referring to will be

/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam
lovecraft22 is offline   Reply With Quote

Old   July 17, 2011, 10:45
Default
  #6
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 460
Rep Power: 18
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
I'm having some problems with createPatch and createPatchDict. Does anybody know how to use it?
lovecraft22 is offline   Reply With Quote

Old   July 18, 2011, 02:14
Default
  #7
New Member
 
Joel Lehikoinen
Join Date: Jun 2011
Posts: 26
Rep Power: 14
joel.lehikoinen is on a distinguished road
Quote:
Originally Posted by lovecraft22 View Post
I'm having some problems with createPatch and createPatchDict. Does anybody know how to use it?
Probably a good place to start is the example createPatchDict-file in $FOAM_UTILITIES/mesh/manipulation/createPatch/createPatchDict.
joel.lehikoinen is offline   Reply With Quote

Old   July 18, 2011, 08:11
Default
  #8
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 460
Rep Power: 18
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
Thank you Joel! I'll have a look!
lovecraft22 is offline   Reply With Quote

Old   July 18, 2011, 14:34
Default
  #9
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 460
Rep Power: 18
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
I managed to solve the case but I'm getting some funny results. The velocity, for example, lies in an extremely wide range (-7000, +7000) m/s while the inlet velocity should me 30 m/s. Also the overall field, thus being 2D, doesn't seem to be that of a circular cylinder…
lovecraft22 is offline   Reply With Quote

Old   July 20, 2011, 18:40
Default
  #10
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

I'm probably late in writing about this, but I just re-found this example: http://openfoamwiki.net/index.php/Ma...Examples/2DsHM - basically it's a step-by-step guide on how to generate a 2D mesh using snappyHexMesh.
This subject has already been discussed in the past here in the forum, but I didn't manage to find the time to search for it... but now I stumbled on this handy wiki page, so I remembered to post it here.

Best regards,
Bruno
__________________

Last edited by wyldckat; July 20, 2011 at 18:42. Reason: fixed typo...
wyldckat is offline   Reply With Quote

Old   July 21, 2011, 02:18
Default
  #11
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 460
Rep Power: 18
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
Thank you wyld. I already knew that tutorial but I still can't figure out why I'm getting so strange results…
lovecraft22 is offline   Reply With Quote

Reply


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
use batch mode to run an unsteady case PaulineP FLUENT 9 April 4, 2019 08:18
Numerical error or case error? Flow in a 3D pipe fsalvucci OpenFOAM 40 January 30, 2013 07:10
Flux update during an MPI run between decomposed case parts? scott OpenFOAM 0 July 21, 2010 20:47
Why wallGradU result is different from dudy in the smooth channel bed xiuying OpenFOAM Running, Solving & CFD 12 March 2, 2009 07:58
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 12:24


All times are GMT -4. The time now is 20:54.