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

Template in advective (and mixed) BC

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 28, 2010, 13:33
Default Template in advective (and mixed) BC
  #1
Member
 
Pascal
Join Date: Jun 2009
Location: Montreal
Posts: 65
Rep Power: 17
Pascal_doran is on a distinguished road
Hi all,

I'm trying to understand advective BC (derived from mixed BC). More precisely I would like to understand why refGrad is alway equal to 0 ?? Since this BC solves D(psi)/Dt = 0 I was expected to observe such equation in the source code, but it seems that this BC is implemented only with a combination of Newman an Dirichlet condition.

More, I'm still a little bit confused about knowing which template are used or not (in mixed BC). Are those templates always used/called (from somewhere I don't know: help would be appreciate on this point to)? How can I know? I'm not able to use the full potential of the Doxygen documentation yet... (I'm still learning it )

BTW when I look for information on Doxygen about :
virtual tmp< fvPatchField< Type > > clone () const
it tells me that "Construct and return a clone." Is it possible to have further information on that.

Thank you for your time/help

Pascal
Pascal_doran is offline   Reply With Quote

Old   July 29, 2010, 04:09
Default
  #2
New Member
 
Join Date: Mar 2010
Posts: 27
Rep Power: 16
astein is on a distinguished road
Hi Pascal!
This thread should answer your questions about the mixed BC in general:
http://www.cfd-online.com/Forums/ope...-mixed-bc.html

The constructor you mention is a standard constructor available in all BCs. I'd say, for your plans you can just ignore it...

-Andreas.
astein is offline   Reply With Quote

Old   February 3, 2012, 18:34
Default
  #3
Senior Member
 
Francois
Join Date: Jun 2010
Posts: 107
Rep Power: 21
Fransje will become famous soon enough
Quote:
Originally Posted by Pascal_doran View Post
Hi all,

I'm trying to understand advective BC (derived from mixed BC). More precisely I would like to understand why refGrad is alway equal to 0 ?? Since this BC solves D(psi)/Dt = 0 I was expected to observe such equation in the source code, but it seems that this BC is implemented only with a combination of Newman an Dirichlet condition.

More, I'm still a little bit confused about knowing which template are used or not (in mixed BC). Are those templates always used/called (from somewhere I don't know: help would be appreciate on this point to)? How can I know? I'm not able to use the full potential of the Doxygen documentation yet... (I'm still learning it )

BTW when I look for information on Doxygen about :
virtual tmp< fvPatchField< Type > > clone () const
it tells me that "Construct and return a clone." Is it possible to have further information on that.

Thank you for your time/help

Pascal
A bit late, but just in case somebody might be looking for some extra information related to the Doxygen question..

The keyword virtual is used in C++ to specify to the compiler that the function under consideration will be matched dynamically at runtime.
This basically means that the compiler should expect the implementation of that function to be made in a child of the current class. And by using the virtual keyword, you can ensure that the compiler will call the redefined virtual function in the derived class, even if you call the function by using a pointer to the base class.

Yes.. C++ can be a difficult beast to tame..
Fransje is offline   Reply With Quote

Reply

Tags
advective, boundary condition, template


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 17:24.