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

Script for an airfoil polar plots computation

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 8, 2010, 10:34
Default Script for an airfoil polar plots computation
  #1
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 12
maddalena is on a distinguished road
Hello everybody,

With a fixed mesh, I would like to calculate aerodynamic coefficient at different angles of attack for an airfoil, i.e. obtain the cl-alpha and cd-alpha curves. Is there anyone that has a written script for this purpose?

If not, could you suggest me how to write it? I know the real basis of writing script, but I still miss how to write math operations and editing files for doing something like velocity projections on the coordinate axis.

Any help?

Cheers,


maddalena
maddalena is offline   Reply With Quote

Old   June 8, 2010, 14:34
Default
  #2
Senior Member
 
Kevin Smith
Join Date: Mar 2009
Posts: 103
Rep Power: 8
kev4573 is on a distinguished road
PyFoam is used routinely for this type of parameter variation. http://openfoamwiki.net/index.php/Co...eter_Variation
kev4573 is offline   Reply With Quote

Old   June 9, 2010, 08:33
Default
  #3
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 12
maddalena is on a distinguished road
Quote:
Originally Posted by kev4573 View Post
PyFoam is used routinely for this type of parameter variation. http://openfoamwiki.net/index.php/Co...eter_Variation
Ok, I downloaded and installed PyFoam... I miss something vital: how can I run that utility?
maddalena is offline   Reply With Quote

Old   June 9, 2010, 09:18
Default
  #4
Senior Member
 
Kevin Smith
Join Date: Mar 2009
Posts: 103
Rep Power: 8
kev4573 is on a distinguished road
PyFoam is a python library that can be used in python scripts. The examples on that page can be copied into a script and run from the command line.
kev4573 is offline   Reply With Quote

Old   June 9, 2010, 09:45
Default
  #5
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 12
maddalena is on a distinguished road
Quote:
Originally Posted by kev4573 View Post
PyFoam is a python library that can be used in python scripts. The examples on that page can be copied into a script and run from the command line.
This is not exactly what I meant: I did not get that typing python doInletVariation.py I could run the utility. In any case...

Do you know if there are some kind of documentations that explain the programming basis? I mean: open, reading and writing files, operations, things like that. I am trying to understand what the example files do, but all the variables are called with the same name, thus I cannot understand if they are "keywords" or what...

In addition, what are the functions already implemented in python? For example, is there any function that works like sol.changeBoundary("inlet", ...) but for the controlDict file? Where can I find these kind of information?

Thaknk for your time and support,

mad
maddalena is offline   Reply With Quote

Old   June 9, 2010, 13:55
Default
  #6
Senior Member
 
Kevin Smith
Join Date: Mar 2009
Posts: 103
Rep Power: 8
kev4573 is on a distinguished road
I'm not sure there is any further documentation other than that wiki page. It sounds painful, but I would suggest just looking through the pyfoam code to figure out what functions are available and how it works..

Yes, you can modify any openfoam dictionary with pyfoam I believe - http://openfoamwiki.net/index.php/Co...ions_for_walls
. I've used similar code to this to modify other dictionaries.
kev4573 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
Polar airfoil of the Naca 0015 Titasse FLUENT 10 June 27, 2010 09:39
Airfoil computation shan FLUENT 1 April 10, 2008 07:50
HELP ( 3D airfoil computation) shan FLUENT 0 April 3, 2008 08:59
Need for help for 3D airfoil computation D.T. Main CFD Forum 0 May 6, 2003 12:04
Steady solutions in Airfoil Computation? Tyler Sherk Main CFD Forum 4 August 12, 2002 11:08


All times are GMT -4. The time now is 08:55.