Main FAQ

From OpenFOAMWiki
Revision as of 23:41, 4 November 2005 by Mama43 (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.

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: [2])





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 Xeaons 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 [5]).



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 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 [8])





3 Physical

Questions about the physics implemented (boundary conditions and similar)

3.1 Boundary Conditions

3.1.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: [10])

3.1.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: [11])



3.2 Turbulence modeling

3.2.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: [13])

3.3 Additional models

Has OpenFOAM been used to calculate this type of problems?

3.3.1 Eulerian two fluid model and granular flow

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

3.3.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: [15])




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

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: [16])


5 Preprocessing

Preparing the simulations

5.1 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: [17]



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.