|
[Sponsors] |
August 24, 2016, 08:16 |
Is it a Class or an Object?
|
#1 |
Member
Join Date: Apr 2016
Posts: 90
Rep Power: 10 |
Hi,
I'm not sure wether fvOptions is a class or an object? In the fvOptions Dict it is said: Class: Dictionary Object: fvOptions Consequently it is an object? And when I chose for example in fvOptions the source "MRF" , this is also an object? Same for the file: porosityProperties? Which is located in constant folder? Thank you |
|
August 24, 2016, 10:46 |
|
#2 |
New Member
Dominic
Join Date: May 2016
Posts: 27
Rep Power: 9 |
Let me first distinguish between a class and object before I answer your question.
An "Object" in C++ is essentially a variable with multiple properties. For example, you could have an object called "Andrew" in the class of "Humans". Andrew would have different properties like Age, Gender, Favorite Pizza, etc... all of which you can assign values/information to. This is something you can't do with a normal variable. You can also have member functions (eg. Andrew.growOlder()) to change the properties of the object (so in my example, it would be to increase the age by 1). A "Class" is a data structure which has the data and functions to define objects (so in the previous example, the class would be "Humans" and member functions would be functions which change some attributes of the object). Now, to finally answer your question. "fvOptions" is an object of the "Foam" class. That means you can access different parameters in fvOptions, like MRF, using built-in OpenFOAM member functions. You'll have to do a bit of digging yourself to discover what those member functions are, OpenFOAM is notoriously bad in keeping documents. Properties like "porosityProperties" are files that you'll have to define yourself. -Verse |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
The udf.h headers are unable to open- in VISUAL STUDIO 13 | sanjeetlimbu | Fluent UDF and Scheme Programming | 4 | May 2, 2016 05:38 |
[foam-extend.org] Error compiling OpenFOAM-1.6-ext | Canesin | OpenFOAM Installation | 137 | January 20, 2016 14:56 |
Compilation error OF1.5-dev on Suse10.3 | darenyang | OpenFOAM Installation | 0 | April 29, 2009 04:55 |
[blockMesh] BlockMeshmergePatchPairs | hjasak | OpenFOAM Meshing & Mesh Conversion | 11 | August 15, 2008 07:36 |
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug | unoder | OpenFOAM Installation | 11 | January 30, 2008 20:30 |