Main FAQ

From OpenFOAMWiki
Revision as of 21:08, 7 August 2006 by Mjjtql (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)

replica designer handbag lv purse replica lv replica watch designer leather replica handbag designer imitation replica handbag replica designer handbag wholesaler replica designer dress quality designer replica handbag fake designer replica handbag designer replica jewelry designer louis vuitton replica handbag discount designer replica handbag designer inspired replica handbag replica designer luggage replica gucci designer handbag aaa designer replica handbag wholesale designer replica wholesale designer replica jewelry buy replica designer handbag replica designer handbag chanel replica designer perfume man designer replica sun glasses replica designer jeans aaa replica designer handbag wholesale designer replica handbag supplier replica designer belt cheap designer replica purse bag diaper louis replica vuitton bag prada replica bag christian dior replica bag cheap replica bag cheap louis replica vuitton bag hand louis replica vuitton bag birkin hermes replica replica birkin bag bag dior gaucho replica louis vuitton replica messenger bag replica luis vuitton bag louis vuitton replica hand bag bag cheap fendi replica spy mirror image replica bag replica vuitton bag b bag fendi replica wholesale replica designer bag bag gucci handbag purse replica motorcycle bag balenciaga replica designer replica hand bag cheap replica louis vuitton bag replica diaper bag wholesale replica bag dooney and bourke bag replica fendi replica bag chanel replica bag replica gucci bag replica designer bag replica coach bag cheap designer replica coach designer handbag inspired replica designer handbag jewelry replica designer glasses replica sale sun designer dior handbag replica designer glasses replica designer perfume replica bag designer diaper replica designer glasses man replica sun designer handbag replica wholesaler buy designer handbag replica where designer handbag kate replica spade bag bangkok designer in made replica chanel designer handbag replica bag designer hand replica chanel designer replica accessory designer handbag replica designer replica wholesale designer jewelry replica wholesale clothes designer replica designer gucci handbag replica designer fake handbag replica designer luggage replica designer handbag purse replica accessory designer replica designer handbag inspired replica designer glasses replica sun wholesale designer replica wallet designer handbag louis replica vuitton cheap designer handbag replica designer purse replica wholesale coach designer handbag replica designer replica shoes designer jewelry replica designer handbag replica wholesale designer replica watch bag designer replica designer replica louis vuitton replica backpack lv wallet replica lv replica luggage replica lv bag lv replica watch handbag mirror replica canal handbag replica street handbag replica ysl handbag luxury replica cheap coach handbag replica handbag replica signature handbag replica versace 7 handbag replica star designer exact handbag replica fake handbag knockoffs replica canal handbag new replica street york handbag jacobs marc replica handbag hermes replica handbag lv replica burberry handbag replica handbag prada replica coach handbag replica designer handbag replica handbag replica designer handbag replica wholesale handbag manufacturer replica louis vuitton replica leather handbag luis vuitton replica handbag shopping replica louis vuitton handbag bag coach replica bag gucci messenger replica bag gucci replica bag diaper louis replica vuitton bag balenciaga motorcycle replica bag louis replica vuitton wholesale bourke dooney handbag imitation christian dior handbag imitation burberry handbag imitation designer handbag imitation bourke dooney fake handbag designer handbag jewelry replica replica designer handbag dior fendi gucci handbag replica handbag replica umbrella wholesale wholesale replica prada handbag fendi and gucci replica handbag chloe handbag paddington replica christian dior handbag replica cheap replica chanel handbag hermes birkin replica handbag designer handbag purse replica aaa replica designer handbag wholesale wholesale manufacturer replica handbag china designer handbag manufacturer replica handbag louis rainbow replica vuitton handbag leather louis replica vuitton canada handbag in louis replica vuitton handbag luis replica vuitton handbag louis replica shopping vuitton accessory handbag louis replica vuitton handbag replica vuitton handbag louie replica vuitton cheap handbag louis replica vuitton handbag louis replica vuitton wholesale designer handbag kate replica spade designer discount handbag replica fake juicy couture handbag fake chloe handbag real or fake designer handbag fake lv handbag how to spot a fake coach handbag cheap fake louis vuitton handbag cheap fake designer handbag chinatown designer fake handbag fake fendi handbag fake dooney bourke handbag fake copy designer handbag fake prada handbag fake gucci handbag fake designer handbag wholesale fake coach handbag fake louis vuitton handbag fake designer handbag dooney bourke imitation handbag handbag imitation replica imitation christian dior handbag handbag imitation wholesale designer imitation replica handbag burberry imitation handbag imitation gucci handbag imitation prada handbag imitation coach handbag imitation handbag imitation designer handbag cheap replica designer bag 7 bag image mirror replica star louis vuitton replica messenger bag bag brighton handbag purse replica asia bag designer from replica bag coach patchwork replica replica luis vuitton bag bag gucci replica wholesale bag cheap fendi replica spy mirror image replica bag gucci messenger bag replica replica vuitton bag b bag fendi replica bag replica spy replica coach diaper bag replica designer diaper bag replica hermes birkin bag motorcycle bag balenciaga replica marc jacobs replica bag replica kate spade bag replica hermes bag replica juicy couture bag replica louis vuitton diaper bag replica diaper bag wholesale replica bag chloe replica bag prada replica bag replica hand bag louis vuitton replica bag cherry handbag louis replica vuitton handbag louis replica spring vitton discount replica handbag cheap coach designer handbag replica bag handbag louis purse replica vuitton mirror replica handbag fendi handbag replica spy ysl replica handbag best designer handbag replica handbag wholesale replica watch replica designer handbag wholesaler designer kate spade replica handbag coach handbag patchwork replica denim handbag louis replica vuitton cheap replica coach handbag coach signature replica handbag wholesale replica vuitton handbag buy replica designer handbag replica jp tods handbag tods replica handbag dolce and gabbana replica handbag quality designer replica handbag versace replica handbag high quality replica handbag louie vuitton replica handbag 7 star replica handbag aaa designer replica handbag designer handbag exact replica replica juicy couture handbag cheap replica louis vuitton handbag replica designer handbag purse designer inspired replica handbag mirror image replica handbag quality replica handbag wholesale replica coach handbag aaa replica handbag wholesale louis vuitton replica handbag hermes handbag replica balenciaga replica handbag cheap replica handbag dior replica handbag replica chloe handbag replica burberry handbag wholesale designer replica handbag fendi replica handbag kate spade replica handbag prada replica handbag louis vuitton replica handbag replica designer handbag replica handbag lv wallet replica wholesale replica lv handbag lv replica purse glasses lv replica sun replica lv bag wholesale handbag designer handbag gucci handbag replica handbag prada replica handbag wholesale replica handbag replica gucci handbag replica coach handbag louis vuitton replica handbag