|
[Sponsors] |
October 13, 2021, 03:24 |
boundBox in OpenFoam
|
#1 |
New Member
Ibaraki
Join Date: Jul 2021
Posts: 9
Rep Power: 5 |
Hello, I'm having some problems to understand the source code of a program in openfoam. For instance what is the meaning of a command boundbox could somebody help me to understand this lines?
Thanks for your help! ----------------------------------------------------------------------------------------- Code: boundBox* meshBB = new boundBox(this->points(), false); vector span = meshBB->span(); delete meshBB; scalar waterDepth = meshBB->max()[2]; // What is this [2]? waterDepth = ibProperties().lookupOrDefault<scalar> ("waterDepth",waterDepth); waterDepth = objectDictList()[objectID].lookupOrDefault<scalar> ("waterDepth",waterDepth); |
|
October 13, 2021, 05:24 |
|
#2 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,747
Rep Power: 66 |
I'm not familiar with where these particular lines of code can be found in the OpenFOAM programming but:
A boundBox is a class or structure that is defined by the extreme points of a box. To say it again, a box that is defined by its corners. The 2nd line attempts to retrieve the extreme (the min and max) values using span. I presume this span gets used somewhere else in a way that is not shown here or maybe it is being used in a way that I don't intuitively understand right away. |
|
October 15, 2021, 01:08 |
|
#3 |
New Member
Ibaraki
Join Date: Jul 2021
Posts: 9
Rep Power: 5 |
Thank you very much! It really helped me to understand the code.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Frequently Asked Questions about Installing OpenFOAM | wyldckat | OpenFOAM Installation | 3 | November 14, 2023 12:58 |
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 | cfd.direct | OpenFOAM Announcements from Other Sources | 2 | August 31, 2015 14:36 |
OpenFOAM Foundation Releases OpenFOAM v2.3.0 | opencfd | OpenFOAM Announcements from OpenFOAM Foundation | 3 | December 23, 2014 04:43 |
Suggestion for a new sub-forum at OpenFOAM's Forum | wyldckat | Site Help, Feedback & Discussions | 20 | October 28, 2014 10:04 |
64bitrhel5 OF installation instructions | mirko | OpenFOAM Installation | 2 | August 12, 2008 19:07 |