|
[Sponsors] |
September 18, 2014, 13:10 |
Where has the code documentation gone
|
#1 |
New Member
Will
Join Date: Dec 2011
Posts: 17
Rep Power: 15 |
I'm find my self doing more and more customisation of OpenFOAM 2.3x and I'm gradually figuring things out, however every time I open a file I can't help but wonder where the in-code documentation has gone.
Surely the original authors would have documented what they were doing, even odd hints about the logic of the structure and why it was done one way over another. If nothing else but to help them in a future release/revision. I do appreciate I'm a mere mortal looking at code from the Gods. But even the more basic coding standard say you should document it. So I'm left assuming that there must be a version of OpenFOAM somewhere that does has documentation, but when they release it to the masses they delete all comments and paste in the copyright notices. If this is the case, then can I get a copy of the documented code, or is that propitiatory? |
|
September 19, 2014, 04:26 |
|
#2 | |
New Member
mohsen cheraghi
Join Date: Jun 2010
Location: Switzerland
Posts: 28
Rep Power: 16 |
Quote:
|
||
September 19, 2014, 13:02 |
|
#3 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
Have you looked at the Doxygen documentation? A lot of the comments you are looking for will be there. The most up to date version is always at:
http://www.openfoam.org/docs/cpp |
|
September 19, 2014, 13:27 |
|
#4 |
New Member
Will
Join Date: Dec 2011
Posts: 17
Rep Power: 15 |
yes the DOxygen documentation is a good start, which explains some bits in great detail, but most bits not at all. DOxygen also has a great ability to pick up variable names of functions and class members, and it would be great to see this in the documentation you mentioned.
To give an example. We've integrated Lagrangian Particle Tracking within WaveFoam. Now works like a dream if anyone wants the code. The actual modifications were not particular hard, though I am boggled by the code structure: seems as though there is twice as much code as needed - I digress.... So I come across these lines in solidParticle.C: Code:
scalar rhop = td.cloud().rhop(); scalar magUr = mag(Uc - U_); scalar ReFunc = 1.0; scalar Re = magUr*d_/nuc; if (Re > 0.01) { ReFunc += 0.15*pow(Re, 0.687); } scalar Dc = (24.0*nuc/d_)*ReFunc*(3.0/4.0)*(rhoc/(d_*rhop)); U_ = (U_ + dt*(Dc*Uc + (1.0 - rhoc/rhop)*td.g()))/(1.0 + dt*Dc); As I do start to document bits, where should this be posted. And how might we encourage all users of OpenFOAM to start document any bits they do understand. I'm sure some base work by all would accelerate the development of OpenFOAM. And we're happy to do our part. |
|
September 21, 2014, 13:48 |
|
#5 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
@Will:
Bruno
__________________
|
|
September 21, 2014, 17:07 |
|
#6 | |
New Member
mohsen cheraghi
Join Date: Jun 2010
Location: Switzerland
Posts: 28
Rep Power: 16 |
Quote:
|
||
September 21, 2014, 19:01 |
|
#7 |
New Member
Will
Join Date: Dec 2011
Posts: 17
Rep Power: 15 |
wyldckat, thanks for the detailed suggestions.
OpenFoamWiki seems to be a great starting point. Clearly needs a lot of work. As we document all the major changes we make on our own wiki, and it not a major step to upload to openfoamwiki also. I'll put up what we've learnt on LPT. Will. |
|
Tags |
documentation |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Give me some advice CFD in Fortran code or Matlab code. | tringuyenttt | Main CFD Forum | 4 | May 29, 2013 09:32 |
The FOAM Documentation Project - SHUT-DOWN | holger_marschall | OpenFOAM | 242 | March 7, 2013 13:30 |
Design Integration with CFD? | John C. Chien | Main CFD Forum | 19 | May 17, 2001 16:56 |
What is the Better Way to Do CFD? | John C. Chien | Main CFD Forum | 54 | April 23, 2001 09:10 |
public CFD Code development | Heinz Wilkening | Main CFD Forum | 38 | March 5, 1999 12:44 |