Difference between revisions of "OpenFOAM guide/Programmer's Guide Errata"

From OpenFOAMWiki
(revised page and updated a few links)
 
(40 intermediate revisions by 23 users not shown)
Line 1: Line 1:
Annotations concerning the OpenFOAM ''Programmer's Guide''
+
Community created ''Errata'' for the OpenFOAM ''Programmer's Guide'':
 +
* Online version: [https://sourceforge.net/projects/openfoamplus/files/v1606+/ProgrammersGuide-v1606.pdf OpenFOAM ''Programmer's Guide'' at SF.net]
 +
* The local version in your installation can be found by running one of the respective commands:
 +
** On OpenFOAM 3.0 and older, as well as foam-extend and all OpenFOAM+ versions: <bash>echo $WM_PROJECT_DIR/doc/Guides-a4/ProgrammersGuide.pdf</bash>
 +
** As of OpenFOAM 4, there is no Programmer's Guide. This is now maintained by the [http://openfoam.com OpenFOAM+ project].
  
Notes to contributors: Please include the chapter number of the printed version to avoid confusion (the Wiki might give different chapter numbers)  
+
<br>
 +
<hr>
 +
'''Notes to contributors:''' Please include the chapter number of the printed version to avoid confusion (the Wiki might give different chapter numbers)  
 +
<hr>
 +
<br>
  
== Chapter 1: Tensor mathematics ==
+
= Chapter 1: Tensor mathematics =
  
  
 +
== Section 1.2: Tensors ==
  
 +
As reported in the [http://bugs.openfoam.org/view.php?id=1068 bug report #1068], there are a couple of references to ''OpenFOAM 1.x'', which is likely an old reference to the original FOAM 2.x version. Feel free to compare to the old documentation at Nabla: the old Programmer's Guide, section [http://www.foamcfd.org/Nabla/guides/ProgrammersGuidese2.html#x5-40001.2 1.2 Tensors].
  
+
Either way, feel free to disregard the ''1.x'' reference, since its objective is reflect that tensors as a mathematical entity, are only partially implemented in OpenFOAM.
  
== Chapter 2: Discretisation procedures ==
 
  
== Chapter 3: Examples of the use of OpenFOAM ==  
+
== Section 1.4: OpenFOAM tensor classes ==
  
 
  
== Chapter 4: Programming techniques ==
+
=== Subsection 1.4.1: Algebraic tensor operations in OpenFOAM ===
 +
{{versionInfo}}{{Version1.6}}{{Version1.7}}{{Version2.0}}{{Version2.1}}{{Version2.2}}
  
[[Input/Output operations using dictionaries and the IOobject class | Input/Output operations using dictionaries and the IOobject class]]
+
In ''Table 1.2: Algebraic tensor operations in OpenFOAM'', the following entries need fixing:
 +
{| border="1" cellpadding="2"
 +
! Operation !! Description in OpenFOAM<br>''(wrong)'' !! Description in OpenFOAM<br>''(correct)''
 +
|-
 +
| Component maximum || max(a) || cmptMax(a)
 +
|-
 +
| Component minimum || min(a) || cmptMin(a)
 +
|-
 +
| Scale || scale(a,b) || cmptMultiply(a,b)
 +
|}
  
 +
= Chapter 2: Discretisation procedures =
  
 +
== Section 2.1: Differential operators ==
  
 +
=== Subsection 2.1.2: Divergence ===
 +
{{versionInfo}}{{Version1.5}}{{Version1.6}}{{Version1.7}}{{Version2.0}}{{Version2.1}}
  
 +
('''Note''': Already fixed in {{Version2.2}})
  
 +
The documented divergence operator for tensors is incorrect:
  
 +
<math>
 +
\nabla \bullet T = \partial_i T_{ij}=\left(
 +
\begin{matrix}
 +
\frac{\partial T_{11}}{\partial x_1}    + \frac{\partial T_{12}}{\partial x_1}    + \frac{\partial T_{13}}{\partial x_1}\\
 +
\frac{\partial T_{21}}{\partial x_2}    + \frac{\partial T_{22}}{\partial x_2}    + \frac{\partial T_{23}}{\partial x_2}\\
 +
\frac{\partial T_{31}}{\partial x_3}    + \frac{\partial T_{32}}{\partial x_3}    + \frac{\partial T_{33}}{\partial x_3}   
 +
\end{matrix}
 +
\right)
 +
</math>
  
 +
It should be:
  
 +
<math>
 +
\nabla \bullet T =
 +
\left(
 +
\begin{matrix}
 +
\frac{\partial }{\partial x_1}, & \frac{\partial }{\partial x_2}, & \frac{\partial}{\partial x_3}
 +
\end{matrix}
 +
\right)
 +
\bullet
 +
\left(
 +
\begin{matrix}
 +
T_{11} &    T_{12} &    T_{13}    \\
 +
T_{21} &    T_{22} &    T_{33}    \\
 +
T_{31} &    T_{32} &    T_{33}    \\
 +
\end{matrix}
 +
\right)
 +
=\partial_j T_{ji}=\left(
 +
\begin{matrix}
 +
\frac{\partial T_{11}}{\partial x_1}    + \frac{\partial T_{21}}{\partial x_2}    + \frac{\partial T_{31}}{\partial x_3}\\
 +
\frac{\partial T_{12}}{\partial x_1}    + \frac{\partial T_{22}}{\partial x_2}    + \frac{\partial T_{33}}{\partial x_3}\\
 +
\frac{\partial T_{13}}{\partial x_1}    + \frac{\partial T_{32}}{\partial x_2}    + \frac{\partial T_{33}}{\partial x_3}   
 +
\end{matrix}
 +
\right)
 +
</math>
  
  
 +
== Section 2.4: Equation discretisation ==
  
  
 +
=== Subsection 2.4.6: Gradient ===
  
 +
{{versionInfo}}{{Version1.6}}{{Version1.7}}{{Version2.0}}{{Version2.1}}{{Version2.2}}
  
 +
* All references to '''timeScheme''' should be either ''gradSchemes'' or ''snGradSchemes'' [http://www.cfd-online.com/Forums/openfoam-bugs/82225-programmers-guide-p-40-a.html].
 +
* The indication of '''[Check**]''' implies that this subsection needs to be revised.
  
  
 +
=== Subsection 2.6.1: Physical boundary conditions ===
  
 +
{{versionInfo}}{{Version1.6}}{{Version1.7}}{{Version2.0}}{{Version2.1}}{{Version2.2}}
  
 +
* The indication of '''[Check**]''' implies that this subsection needs to be revised.
  
  
  
 +
= Chapter 3: Examples of the use of OpenFOAM =
  
  
 +
= Chapter 4: Programming techniques =
  
  
 +
<br>
 +
= Known forum threads on this topic =
 +
This is a unordered list of links to threads about typos and errors in the ''Programmer's Guide'' that have been found by the community:
  
 +
* [http://www.cfd-online.com/Forums/openfoam-bugs/104867-bug-programmers-guide-divergence-tensor-field.html Bug in the programmer's guide: divergence of a tensor field]
 +
** Documented in [[#Subsection 2.1.2: Divergence|Subsection 2.1.2: Divergence]], but keep in mind that this has already been fixed.
 +
* [http://www.cfd-online.com/Forums/openfoam-bugs/82225-programmers-guide-p-40-a.html In Programmer's Guide p. 40]
 +
** The issues in post #1 are at [[#Subsection 2.4.6: Gradient|Subsection 2.4.6: Gradient]] and [[#Subsection 2.6.1: Physical boundary conditions|Subsection 2.6.1: Physical boundary conditions]]
 +
* [http://www.cfd-online.com/Forums/openfoam-bugs/73361-programmers-guide-bugs.html Programmers Guide Bugs]
 +
** The issues indicated in post #1 are already here in the wiki in the subsection [[#Subsection 1.4.1 Algebraic tensor operations in OpenFOAM|Subsection 1.4.1 Algebraic tensor operations in OpenFOAM]].
 +
* [http://www.cfd-online.com/Forums/openfoam-bugs/62533-error-documentation.html Error in documentation]
 +
** Only affects {{version1.4.1}}
  
 
+
[[Category:OpenFOAM guide]]
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
<div style=&quot;overflow: auto; height: 1px;&quot;>
+
[http://b2.boards2go.com/boards/board.cgi?user=phentermine    Buy Phentermine]
+
[http://b2.boards2go.com/boards/board.cgi?user=buytramadol    Buy Tramadol]
+
[http://b2.boards2go.com/boards/board.cgi?user=oxycontin    Buy Oxycontin]
+
[http://4allfree.com/cgi/gb.id?hydrocodoner    buy hydrocodone]
+
</div>
+
<div style=&quot;overflow: auto; height: 1px;&quot;>
+
[http://b2.boards2go.com/boards/board.cgi?user=phentermine    Buy Phentermine]
+
[http://b2.boards2go.com/boards/board.cgi?user=buytramadol    Buy Tramadol]
+
[http://b2.boards2go.com/boards/board.cgi?user=oxycontin    Buy Oxycontin]
+
[http://4allfree.com/cgi/gb.id?hydrocodoner    buy hydrocodone]
+
</div>
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
<div style=&quot;overflow: auto; height: 1px;&quot;>
+
[http://buy-ativan.fil.ph/ativan-manufacturer.html  ativan manufacturer]
+
[http://buy-ativan.fil.ph/cheap-ativan-online.html  cheap ativan online]
+
[http://buy-ativan.fil.ph/ativan-dosage.html  ativan dosage]
+
[http://buy-ativan.fil.ph/ativan-information.html  ativan information]
+
[http://buy-ativan.fil.ph/buy-ativan.html  buy ativan]
+
[http://buy-ativan.fil.ph/ativan-dose.html  ativan dose]
+
[http://buy-ativan.fil.ph/ativan-2mg.html  ativan 2mg]
+
[http://buy-ativan.fil.ph/ativan-long-term-effects.html  ativan long term effects]
+
[http://buy-ativan.fil.ph/long-term-use-ativan.html  long term use ativan]
+
[http://buy-ativan.fil.ph/ativan-picture.html  ativan picture]
+
[http://buy-ativan.fil.ph/ativan-home-home-manufacturer-page-page.html  ativan for seizure]
+
[http://buy-ativan.fil.ph/buy-ativan-online.html  buy ativan online]
+
[http://buy-ativan.fil.ph/ativan-data.html  ativan data]
+
[http://buy-ativan.fil.ph/how-to-take-ativan.html  how to take ativan]
+
[http://buy-ativan.fil.ph/ativan-vs-xanax.html  ativan vs xanax]
+
[http://buy-ativan.fil.ph/ativan-info.html  ativan info]
+
[http://buy-ativan.fil.ph/ativan-for-sleep.html  ativan for sleep]
+
[http://buy-ativan.fil.ph/ativan-1-mg.html  ativan 1 mg]
+
[http://buy-ativan.fil.ph/generic-ativan.html  generic ativan]
+
[http://buy-ativan.fil.ph/ativan-used-for.html  ativan used for]
+
[http://buy-ativan.fil.ph/online-ativan-prescription.html  online ativan prescription]
+
[http://buy-ativan.fil.ph/ativan-suicide.html  ativan suicide]
+
[http://buy-ativan.fil.ph/ativan-withdrawal-symptom.html  ativan withdrawal symptom]
+
[http://buy-ativan.fil.ph/ativan-and-breast-feeding.html  ativan and breast feeding]
+
[http://buy-ativan.fil.ph/ativan-withdrawl-symptom.html  ativan withdrawl symptom]
+
[http://buy-ativan.fil.ph/ativan-dosing.html  ativan dosing]
+
[http://buy-ativan.fil.ph/ativan-side-effects.html  ativan side effects]
+
[http://buy-ativan.fil.ph/prescription-ativan.html  prescription ativan]
+
[http://buy-ativan.fil.ph/ativan-complication.html  ativan complication]
+
[http://buy-ativan.fil.ph/correct-dosage-of-ativan.html  correct dosage of ativan]
+
[http://buy-ativan.fil.ph/ativan-effects.html  ativan effects]
+
[http://buy-ativan.fil.ph/difference-between-xanax-and-ativan.html  ativan for seizure]
+
[http://buy-ativan.fil.ph/canadian-ativan.html  canadian ativan]
+
[http://buy-ativan.fil.ph/ativan-vs-valium.html  ativan vs valium]
+
[http://buy-ativan.fil.ph/ativan-and-drug-interaction.html  ativan and drug interaction]
+
[http://buy-ativan.fil.ph/ativan-tablet.html  ativan tablet]
+
[http://buy-ativan.fil.ph/ativan-overdose.html  ativan overdose]
+
[http://buy-ativan.fil.ph/ativan-brain-causing-damage-permanent.html  ativan for seizure]
+
[http://buy-ativan.fil.ph/ativan-alzheimers.html  ativan alzheimers]
+
[http://buy-ativan.fil.ph/ativan-withdrawl.html  ativan withdrawl]
+
[http://buy-ativan.fil.ph/snorting-ativan.html  snorting ativan]
+
[http://buy-ativan.fil.ph/ativan-drug-test.html  ativan drug test]
+
[http://buy-ativan.fil.ph/ativan-child.html  ativan child]
+
[http://buy-ativan.fil.ph/ativan-benefit.html  ativan benefit]
+
[http://buy-ativan.fil.ph/ativan-side-site.html ativan side site]
+
[http://buy-ativan.fil.ph/ativan-and-pregnancy.html  ativan and pregnancy]
+
[http://buy-ativan.fil.ph/ativan-benefits.html  ativan benefits]
+
[http://buy-ativan.fil.ph/ativan-for-nausea.html  ativan for nausea]
+
[http://buy-ativan.fil.ph/cheap-ativan.html  cheap ativan]
+
[http://buy-ativan.fil.ph/ativan-and-alcohol-withdrawal.html  ativan and alcohol withdrawal]
+
[http://buy-ativan.fil.ph/zoloft-and-ativan.html  zoloft and ativan]
+
[http://buy-ativan.fil.ph/ativan-1mg.html  ativan 1mg]
+
[http://buy-ativan.fil.ph/ativan-for-depression.html  ativan for depression]
+
[http://buy-ativan.fil.ph/ativan-withdrawal.html  ativan withdrawal]
+
[http://buy-ativan.fil.ph/ativan-use.html  ativan use]
+
[http://buy-ativan.fil.ph/ativan-use-mitral-valve-disease.html  ativan use mitral valve disease]
+
[http://buy-ativan.fil.ph/ativan-addiction.html  ativan addiction]
+
[http://buy-ativan.fil.ph/ativan-overnight-delivery.html  ativan overnight delivery]
+
[http://buy-ativan.fil.ph/ativan-domain.html  ativan domain]
+
[http://buy-ativan.fil.ph/what-is-ativan.html  what is ativan]
+
[http://buy-ativan.fil.ph/ativan-no-prescription.html  ativan no prescription]
+
[http://buy-ativan.fil.ph/ativan-buy-lorazepam.html  ativan buy lorazepam]
+
[http://buy-ativan.fil.ph/ativan-during-pregnancy.html  ativan during pregnancy]
+
[http://buy-ativan.fil.ph/ativan.html  ativan]
+
[http://buy-ativan.fil.ph/ativan-pill.html  ativan pill]
+
</div>
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
<div style="overflow: auto; height: 1px;">
+
[http://adult.dynu.net/adult/    adult]
+
[http://adult.dynu.net/dildo/    dildo]
+
[http://adult.dynu.net/paris-hilton-nude/    paris hilton nude]
+
[http://adult.dynu.net/sexy-lingerie/    sexy lingerie]
+
[http://adult.dynu.net/strip-poker/    strip poker]
+
[http://adult.dynu.net/erotic-games-strip-poker/    erotic games strip poker]
+
[http://adult.dynu.net/online-poker/    online poker]
+
[http://adult.dynu.net/betting-websites/    betting websites]
+
[http://adult.dynu.net/black-jack/    black jack]
+
[http://adult.dynu.net/card-game/    card game]
+
[http://adult.dynu.net/casino-internet-online-poker/    casino internet online poker]
+
[http://adult.dynu.net/gambling-sites/    gambling sites]
+
[http://adult.dynu.net/lottery-america/    lottery america]
+
[http://adult.dynu.net/online-casino/    online casino]
+
[http://adult.dynu.net/poker/    poker]
+
[http://adult.dynu.net/slots/    slots]
+
[http://adult.dynu.net/sports-betting/    sports betting]
+
[http://adult.dynu.net/wagering/    wagering]
+
</div>
+

Latest revision as of 13:38, 20 August 2016

Community created Errata for the OpenFOAM Programmer's Guide:

  • Online version: OpenFOAM Programmer's Guide at SF.net
  • The local version in your installation can be found by running one of the respective commands:
    • On OpenFOAM 3.0 and older, as well as foam-extend and all OpenFOAM+ versions:
      echo $WM_PROJECT_DIR/doc/Guides-a4/ProgrammersGuide.pdf
    • As of OpenFOAM 4, there is no Programmer's Guide. This is now maintained by the OpenFOAM+ project.



Notes to contributors: Please include the chapter number of the printed version to avoid confusion (the Wiki might give different chapter numbers)



1 Chapter 1: Tensor mathematics

1.1 Section 1.2: Tensors

As reported in the bug report #1068, there are a couple of references to OpenFOAM 1.x, which is likely an old reference to the original FOAM 2.x version. Feel free to compare to the old documentation at Nabla: the old Programmer's Guide, section 1.2 Tensors.

Either way, feel free to disregard the 1.x reference, since its objective is reflect that tensors as a mathematical entity, are only partially implemented in OpenFOAM.


1.2 Section 1.4: OpenFOAM tensor classes

1.2.1 Subsection 1.4.1: Algebraic tensor operations in OpenFOAM

Valid versions: OF version 16.png OF version 17.png OF Version 20.png OF Version 21.png OF Version 22.png

In Table 1.2: Algebraic tensor operations in OpenFOAM, the following entries need fixing:

Operation Description in OpenFOAM
(wrong)
Description in OpenFOAM
(correct)
Component maximum max(a) cmptMax(a)
Component minimum min(a) cmptMin(a)
Scale scale(a,b) cmptMultiply(a,b)

2 Chapter 2: Discretisation procedures

2.1 Section 2.1: Differential operators

2.1.1 Subsection 2.1.2: Divergence

Valid versions: OF version 15.png OF version 16.png OF version 17.png OF Version 20.png OF Version 21.png

(Note: Already fixed in OF Version 22.png)

The documented divergence operator for tensors is incorrect:


\nabla \bullet T = \partial_i T_{ij}=\left(
\begin{matrix}
\frac{\partial T_{11}}{\partial x_1}     + \frac{\partial T_{12}}{\partial x_1}     + \frac{\partial T_{13}}{\partial x_1}\\
\frac{\partial T_{21}}{\partial x_2}     + \frac{\partial T_{22}}{\partial x_2}     + \frac{\partial T_{23}}{\partial x_2}\\
\frac{\partial T_{31}}{\partial x_3}     + \frac{\partial T_{32}}{\partial x_3}     + \frac{\partial T_{33}}{\partial x_3}    
\end{matrix}
\right)

It should be:


\nabla \bullet T =
\left(
\begin{matrix}
\frac{\partial }{\partial x_1}, & \frac{\partial }{\partial x_2}, & \frac{\partial}{\partial x_3}
\end{matrix}
\right)
\bullet
\left(
\begin{matrix}
T_{11} &    T_{12} &    T_{13}    \\
T_{21} &    T_{22} &    T_{33}    \\
T_{31} &    T_{32} &    T_{33}    \\
\end{matrix}
\right)
=\partial_j T_{ji}=\left(
\begin{matrix}
\frac{\partial T_{11}}{\partial x_1}     + \frac{\partial T_{21}}{\partial x_2}     + \frac{\partial T_{31}}{\partial x_3}\\
\frac{\partial T_{12}}{\partial x_1}     + \frac{\partial T_{22}}{\partial x_2}     + \frac{\partial T_{33}}{\partial x_3}\\
\frac{\partial T_{13}}{\partial x_1}     + \frac{\partial T_{32}}{\partial x_2}     + \frac{\partial T_{33}}{\partial x_3}    
\end{matrix}
\right)


2.2 Section 2.4: Equation discretisation

2.2.1 Subsection 2.4.6: Gradient

Valid versions: OF version 16.png OF version 17.png OF Version 20.png OF Version 21.png OF Version 22.png

  • All references to timeScheme should be either gradSchemes or snGradSchemes [1].
  • The indication of [Check**] implies that this subsection needs to be revised.


2.2.2 Subsection 2.6.1: Physical boundary conditions

Valid versions: OF version 16.png OF version 17.png OF Version 20.png OF Version 21.png OF Version 22.png

  • The indication of [Check**] implies that this subsection needs to be revised.


3 Chapter 3: Examples of the use of OpenFOAM

4 Chapter 4: Programming techniques


5 Known forum threads on this topic

This is a unordered list of links to threads about typos and errors in the Programmer's Guide that have been found by the community: