CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

boundBox in OpenFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 13, 2021, 02:24
Default boundBox in OpenFoam
  #1
New Member
 
Ibaraki
Join Date: Jul 2021
Posts: 9
Rep Power: 4
kraf is on a distinguished road
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);
kraf is offline   Reply With Quote

Old   October 13, 2021, 04:24
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,675
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
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.
LuckyTran is offline   Reply With Quote

Old   October 15, 2021, 00:08
Default
  #3
New Member
 
Ibaraki
Join Date: Jul 2021
Posts: 9
Rep Power: 4
kraf is on a distinguished road
Thank you very much! It really helped me to understand the code.
kraf is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Frequently Asked Questions about Installing OpenFOAM wyldckat OpenFOAM Installation 3 November 14, 2023 11:58
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 cfd.direct OpenFOAM Announcements from Other Sources 2 August 31, 2015 13:36
OpenFOAM Foundation Releases OpenFOAM v2.3.0 opencfd OpenFOAM Announcements from OpenFOAM Foundation 3 December 23, 2014 03:43
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 09:04
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 18:07


All times are GMT -4. The time now is 14:03.