FAQ/Programming

From OpenFOAMWiki
< FAQ
Revision as of 20:56, 21 September 2013 by Wyldckat (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


1 FAQ Section 7: Programming

Questions about writing applications and solvers


1.1 Compiling

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

For a complete list of foam related environment variables, see Environment_variables.

1.2 Working with fields

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

See Calculating the field value at an arbitrary point.

1.3 OpenFOAM's template library

1.3.1 What is the object registry?

See objectRegistry explained.

1.3.2 What do the filenames mean?

OpenFOAM's file naming convention. For exampleClass, these filenames may exist:

  • exampleClass.H - Main header.
  • exampleClass.C - Main body.
  • exampleClassFwd.H - Forward declarations.
  • exampleClassI.H - Inline functions implemented.
  • exampleClassIO.C - IO functions implemented.
  • exampleClassM.H - Macros.
  • exampleClassFunctionName.C - FunctionName's implementation (seperated for no other reason than aesthetics).

There may be others as well. Unknown naming conventions:

  • exampleClasss.H
  • exampleClasss.C

Some filenames add an s to the end. These may be associated with static variables / functions. They may also be associated with the NoRepository flag.

1.3.3 What is tmp<>?

See tmp explained.

1.3.4 What is runtime selection?

See Runtime selection mechanism.

1.4 Adding new features

1.4.1 How do I add a new wall-function?

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

1.4.2 How do I add a new boundary condition?

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

Facts about "FAQ/Programming"RDF feed
FaqdescriptionQuestions about writing applications and solvers +
FaqnameProgramming +
Faqnumber7 +