CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

MRFZone

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 22, 2008, 10:55
Default Is it possible to get access t
  #1
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
Is it possible to get access to the private variable "dict_" in a smart way? The only idea that I have is to rewrite the classes MRFZone and MRFZones...which is not very smart
Or how can I read the constant/MRFZones file into an IOdictionary? If I try the classic way:
IOdictionary mrfDict
(
<blockquote>IOobject
(
<blockquote>"MRFZones",
runTime.constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)</blockquote>
);
const wordList mrfPatches = mrfDict.lookup("patches");</blockquote>

I get an error saying that "patches" is not found in the MRFZones file.
Any suggestions?

Dragos
dmoroian is offline   Reply With Quote

Old   April 23, 2008, 04:59
Default Hi Dragos Is it just the "p
  #2
Senior Member
 
Join Date: Mar 2009
Posts: 248
Rep Power: 18
jaswi is on a distinguished road
Hi Dragos

Is it just the "patches" for which you are getting the error. Did you try reading in the other variables such as origin, axis etc.

Another option can be adding a member function to the MRFZone class which will returns you the dict_ variable.

Regards
Jaswi
jaswi is offline   Reply With Quote

Old   April 23, 2008, 05:20
Default Hi Jaswi, I didn't try to loo
  #3
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
Hi Jaswi,
I didn't try to lookup for origin or axis because I didn't believe they will work if finding patches didn't work.
As a work around I wrote a new set of MRFZone*.{H,C} with a public member function that returns the requested variables (see on wiki: computeTorq). But as I said also above this is not an elegant solution.

Dragos
dmoroian 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



All times are GMT -4. The time now is 12:15.