Main FAQ

From OpenFOAMWiki
Revision as of 23:05, 2 August 2006 by Dsywlv (Talk | contribs)

Well, my head's full of questions
My temp'rature's risin' fast
Bob Dylan (Mixed Up Confusion)


Questions that have been asked more than once.

The structure of this page is still evolving. Once enough questions are inserted it will be clear which structure is the best.

Contents

1 General

Questions concerning the history of OpenFOAM, the license etc

1.1 What is OpenFOAM ?

TODO

1.2 Can I use OpenFOAM?

Yes. OpenFOAM has been released by OpenCFD under the terms of the GNU GPL 2 license.

According to this licence, you can freely download, install and use OpenFOAM. Moreover, you have full access to the source code of OpenFOAM and you can modify it to customize it on your needs.

1.3 How can I properly reference OpenFOAM?

You can cite the www.openfoam.org website, if web-referencing is allowed, otherwise, cite the OpenFOAM documentation.

(Source: [1])

2 Installation and Running

Problems with the installation and running of applications

2.1 Which platforms are supported by OpenFOAM ?

Currently binaries exist for two platforms:

  • Linux
    • i386-Architecture
    • AMD Opteron (probably also Intel Xeons with 64 Bit extension)
  • Solaris

Ports to other operating systems that have been discussed on the message board are

2.2 Why isn't there a Windows port of OpenFOAM ?

The only feasible way to port OpenFOAM to Windows is by using Cygwin, an application that implements the most common UNIX APIs on Windows.

The problem is that the file-sytem NTFS, that is used by most modern Windows Versions, is case-insensitive (hello.c and Hello.C are the same file). The OpenFOAM-sources need a case-sensitive file-system and can't even be unpacked properly on a Windows sytem (see [2]).

Currently a way to compile OpenFOAM on cygwin is described on the Message-Board. This port does not include FoamX and paraFoam (but postprocessing can be done witn ParaView by using foamToVTK). This port is not part of the official distribution (yet).

2.3 How do I port OpenFOAM to an unsupported platform ?

If your platform is not some kind of UNIX-flavour you're probably going to have a hard time.

For a starter see Porting to a new platform.

2.4 Why doesn't FoamX allow me to enter numbers?

FoamX is set up to run on a system where the default language is English. If you want to run it on a system which uses another language, you have to manually modify the /OpenFOAM/OpenFOAM-1.1/bin/runFoamX script by adding the line:

 
export LANG=en_EN

at the beginning of the runFoamX script, and the line:

 
export LANG=your_LANGUAGE_CODE

at the end of the same file, replacing your_LANGUAGE_CODE with the corresponding code of the language in use in your system (for example, it_IT for italian).

(Source [3])

2.5 How can I make a solver stop if the solution contains NaNs ?

Usually OpenFOAM keeps calculating even if the solution contains NaNs (Not a number) and therefore is of no use. To avoid this set the environment variable FOAM_SIGFPE to a non-zero value. In tcsh:

setenv FOAM_SIGFPE 1 

or in bash:

 
export FOAM_SIGFPE=1

3 Physical

Questions about the physics implemented (boundary conditions and similar)

3.1 General

3.1.1 What is the meaning of the Field X

A table of the fields most commonly written by OpenFOAM-solvers can be found here.

3.1.2 Where do I enter the fluid-density for icoFoam, turbFoam and other incompressible solvers?

You don't. Instead of the dynamic viscosity \eta the kinematic viscosity \nu=\frac{\eta}{\rho} is used by the OpenFOAM-solvers.

Note: the pressure has to be normalized with the density, too.

3.2 Boundary Conditions

3.2.1 What's the difference between the symmetryPlane and the zeroGradient boundary conditions?

The zeroGradient boundary condition sets the boundary value to the near-wall cell value.

A symmetryPlane boundary condition is a symmetry-plane which is equivalent to a zeroGradient for scalars, but not for vectors or tensors.

(Source: [4])

3.2.2 What does the lInf parameter mean in pressureTransmissive boundary condition?

lInf is the relaxation length-scale (in m) for outgoing pressure waves to return to pInf. This stops the pressure in the domain floating about it the inlet pressure is not specified. (source: [5])

3.3 Turbulence modeling

3.3.1 How is wall-functions for RANS disabled and enabled?

All high-Re RANS turbulence models include wall-functions because it is inappropriate to use them without. Only the low-Re models operate without wall-functions as they include model-specific wall treatments.

(Source: [6])

3.4 Additional models

Has OpenFOAM been used to calculate this type of problems?

3.4.1 Eulerian two fluid model and granular flow

It has been done and will be released. See here.

3.4.2 Viscoelastic flows?

Have been done. Will be released. For details see this thread on the Message Board.

4 Solution procedure

Manipulating the solution procedure by non-programming means

4.1 How does one turn off the dimensional checking?

Dimensional checking is one of the cool features in OpenFOAM that helps to develop solvers that do something physicaly meaningfull. Therefore: don't do this if not absolutely necessary.

To switch it off at run-time set

dimensionSet 0;

in OpenFOAM-1.1/.OpenFOAM-1.1/controlDict.

A more controlled way is to use the dimensions()-method to set the dimension of the volXXXField in question to the desired dimension.

(source: [7])

4.2 Is there a way to switch between single and double precision?

For Version 1.2 and older: Only by editing src/OpenFOAM/primitives/scalar/scalar.H and recompiling OpenFOAM. But why would you want to do that (except for memory issues)? (source: [8])

For Version 1.3: Recompile OpenFOAM with single-precision enabled (for details see Howto_compile_OpenFOAM)

5 Preprocessing

Preparing the simulations

5.1 How to quickly change the mesh with blockMesh

A description how to achieve this with m4 can be found here: How to quickly change the mesh with blockMesh

5.2 FoamX doesn't know my new solver

Look here: Howto_adding_a_new_solver_to_foamX

6 Postprocessing

Working with the results

6.1 Postprocessing of Lagrangian particles

This is not possible with paraFoam according to this thread. Use foamToVTK instead. Read the lagrangian data and 'Glyph' it.

7 Programming

Questions about writting applications and solvers

7.1 Compiling

7.1.1 Where does wmake get the values for the environmental variables from?

All wmake variables come from (in this order)

  1. $WM_DIR/rules/General/general
  2. $WM_DIR/rules/${WM_ARCH}${WM_COMPILER}/general
  3. $WM_DIR/rules/${WM_ARCH}/c++

(Source: [9]

7.2 Working with fields

7.2.1 How to calculate the field value of an arbitrary point?

See Calculating the field value at an arbitrary point.

7.3 Adding new features

7.3.1 How do I add a new wall-function?

See the How-To: Adding a new wall-function.

7.3.2 How do I add a new boundary condition?

See the How-To: Adding a new boundary condition.

8 Troubleshooting

8.1 An application ends with a segmentation fault. What is wrong?

A segmentation fault usually occurs when a program trys to access memory outside its bounds (see Segmentation Fault on Wikipedia). In OpenFOAM this usually occurs when a List<> or similar is accessed with an index outside of the allocated domain. To find out where this occurs make a separate copy of the OF-sources, recompile them with the swich WM_COMPILE_OPTION set to Debug (just uncomment the right lines in the bashrc/cshrc files). This makes OF run slower, but accesses to List<> etc are checked for ranges and the program aborts if you access outside of a range (plus you get a stack trace). This won't solve your problem, but it will help you find out where it occurs.

For recompiling OpenFOAM look at Howto_compile_OpenFOAM

If you want stack traces with line-numbers and source-files try to apply the patch described in the Message Board

8.2 FoamX is unable to contact name server

These problems are almost always one of the following:

  1. the hostname is not set ('localhost' is not acceptable to Corba)
  2. the hostname is not (or twice) in /etc/hosts
  3. only the truncated name is present in /etc/hosts
  4. some port opening problem due to security

(see the Messag Board)

bag bourke dooney replica bag messenger prada replica bag balenciaga motorcycle replica bag balenciaga replica bag designer hand replica bag birkin hermes replica cheap replica designer bag louis vuitton replica messenger bag bag coach patchwork replica bag gucci replica wholesale mirror image replica bag gucci messenger bag replica bag chloe paddington replica replica vuitton bag b bag fendi replica replica coach hand bag louis vuitton replica bag wholesale wholesale replica designer bag bag replica spy cheap replica bag bag gucci handbag purse replica marc jacobs replica bag replica christian dior bag cheap replica louis vuitton bag replica diaper bag replica lv bag dooney and bourke bag replica chanel replica bag replica gucci bag replica designer bag black leather purse wholesale leather purse tooled leather purse western leather purse leather coin purse sun protection hat hot little girl straw hat pizza red hat lady straw cowboy hat red hat linux medicine hat news new era hat flat coat retriever rabbit fur coats gothic trench coats coats tire machine mink fur coats trench coat mafia white coat syndrome womens winter coats berlington coat factory baby phat coats man sport coats white coat hypertension leather trench coats man fur coats womens leather coats dog rain coat coats tire changer sheep skin coats wooden coat rack faux fur coats coat of arms auto luggage rack motorcycle hard luggage samsonite luggage set custom luggage tag liz claiborne luggage polka dot luggage hello kitty luggage luggage new york roof luggage rack pierre cardin luggage swiss gear luggage eddie bauer luggage eagle creek luggage nine west luggage personalized luggage tag kenneth cole luggage vera bradley luggage car luggage carrier travel pro luggage briggs riley luggage high sierra luggage ralph lauren luggage rooftop luggage carrier car luggage rack motorcycle luggage rack american tourister luggage louis vuitton luggage wholesale handbag designer handbag gucci handbag coach handbag replica handbag prada replica handbag wholesale replica handbag replica chanel handbag replica gucci handbag replica coach handbag louis vuitton replica handbag replica designer handbag hawaiian heirloom jewelry silver gem stone jewelry jacob jewelry jewelry mall markville store whitehall jewelry store indian bridal jewelry jewel foolish game handmade jewelry unique marquette jewels cheap fashion jewelry cultured jewelry pearl jewelry mother pearl kay jewelry store jewelry store los angeles hip hop jewelry real custom hip hop jewelry replica jewelry tiffany jewelry store jewelry mall markville people store jewel in the palace korean drama wholesale jewelry costume fashion fake jewelry wholesale jewelry display ncl jewel body jewelry online bridal jewelry pearl pearl bridal jewelry fine cubic zirconia jewelry gem handmade jewelry stone floor mat cubic zirconia jewelry navajo jewelry freshwater jewelry pearl nature jewelry body discount jewelry handcrafted jewelry unique jewel singer jewel hands handcrafted beaded jewelry gem handcrafted jewelry stone body cheap jewelry wholesale jewelry supply black jewelry pearl buddy jewel replica tiffany jewelry jewel grocery store again again jewel jewelry store chicago bead jewelry making adina jewel jewel of the sea jewelry magnetic swarovski crystal jewelry handmade beaded jewelry dooney burke handbag nine west handbag womens handbag quilted handbag mary frances handbag kathy van zeeland handbag wholesale replica handbag gucci handbag low price straw handbag lv handbag dkny handbag replica chanel handbag authentic louis vuitton handbag dooney handbag discount coach handbag handmade handbag fossil handbag bradley handbag vera michael kors handbag discount designer handbag authentic gucci handbag knockoff handbag dior handbag replica coach handbag juicy couture handbag brighton handbag chloe handbag handbag jacobs marc marc jacobs handbag discount handbag handbag purse dooney bourke handbag chanel handbag fendi handbag louis vuitton handbag gucci handbag swiss panerai replica watch swiss cartier watch replica swiss gear backpack laptop patek philippe swiss replica swiss watch quartz luxury replica swiss watch swiss offshore bank account swiss army chronograph fake swiss rolex watch replica fake replica rolex swiss watch army chronograph swiss watch omega swiss replica fake rolex swiss watch cartier swiss replica swiss breitling replica swiss made breitling replica watch fake swiss watch account bank credit offshore suisse swiss swiss army wrist watch swiss army laptop bag panerai swiss replica account bank bank offshore swiss switzerland union swiss camping gear cnc swiss machining army briefcase swiss 0.01 replica rolex swiss watch swiss army laptop backpack swiss made replica watch swiss army backpack replica rolex swiss watch replica rolex swiss swiss rolex replica swiss replica watch last minute package travel alaska deal travel travel agency lawton oklahoma california jose san travel travel lancaster pennsylvania dealer illinois trailer travel group holland travel agent california jose san travel travel agent johnstown pennsylvania jamaica travel requirement travel johnstown pennsylvania jamaica travel tip travel agency cleveland ohio travel agency cincinnati ohio hawaii information travel travel agency lancaster pennsylvania travel agent madison wisconsin golf ireland travel travel steubenville ohio alaska nursing travel travel agency allentown pennsylvania travel trailer rental in wisconsin coastal discount package travel vacation robot site travel web travel agency fort smith oklahoma bus escort hanover travel hawaii onlin online travel agent illinois travel hawaii tip travel travel fort smith oklahoma agency davenport illinois travel travel agent cincinnati agency nebraska travel discount hawaii package travel travel agent louisville travel agent harrisburg pennsylvania california francisco guide san travel california rental trailer travel aa insurance travel travel agency canton ohio travel agent riverside online site travel web gap travel year gaming lodging resort resort spa travel hawaii links travel agency california jose san travel america south travel best site travel web new nyc travel visit york last minute package travel alaska deal travel travel agency lawton oklahoma california jose san travel travel lancaster pennsylvania dealer illinois trailer travel group holland travel agent california jose san travel travel agent johnstown pennsylvania jamaica travel requirement travel johnstown pennsylvania jamaica travel tip travel agency cleveland ohio travel agency cincinnati ohio hawaii information travel travel agency lancaster pennsylvania travel agent madison wisconsin golf ireland travel travel steubenville ohio alaska nursing travel travel agency allentown pennsylvania travel trailer rental in wisconsin coastal discount package travel vacation robot site travel web travel agency fort smith oklahoma bus escort hanover travel hawaii onlin online travel agent illinois travel hawaii tip travel travel fort smith oklahoma agency davenport illinois travel travel agent cincinnati agency nebraska travel discount hawaii package travel travel agent louisville travel agent harrisburg pennsylvania california francisco guide san travel california rental trailer travel aa insurance travel travel agency canton ohio travel agent riverside online site travel web gap travel year gaming lodging resort resort spa travel hawaii links travel agency california jose san travel america south travel best site travel web new nyc travel visit york gucci handbag low price attic handbag straw handbag lv handbag replica gucci handbag dkny handbag stone mountain handbag balenciaga handbag discount coach handbag handmade handbag bradley handbag vera michael kors handbag discount designer handbag christian dior handbag authentic gucci handbag knockoff handbag dior handbag replica coach handbag kate spade handbag juicy couture handbag brighton handbag chloe handbag louis vuitton replica handbag handbag jacobs marc marc jacobs handbag discount handbag guess handbag burberry handbag replica designer handbag handbag purse dooney bourke handbag fendi handbag louis vuitton handbag wholesale handbag replica handbag coach handbag gucci handbag prada handbag fendi handbag louis vuitton handbag cheap buy xanax order xanax online buy xanax buy tramadol replica coach handbag wholesale replica handbag replica designer handbag prada replica handbag louis vuitton replica handbag replica gucci handbag designer handbag replica replica coach handbag replica chanel handbag quality replica watch quality replica watch swiss replica rolex watch swiss replica rolex watch omega replica watch omega replica watch louis vuitton replica handbag cartier replica watch cartier replica watch breitling replica watch breitling replica watch