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

Sharing a scalar Solver -> Boundary

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   February 21, 2012, 11:20
Default Sharing a scalar Solver -> Boundary
  #1
Senior Member
 
Aurelien Thinat
Join Date: Jul 2010
Posts: 148
Rep Power: 6
Aurelien Thinat is on a distinguished road
Hello everyone,

It's maybe a simple question. I'd like to share a value (integer, float, table or whatever...) store in the main solver with a boundary condition.

Is it possible to have an access to this value from the BC code ?

Thank you all.
Aurelien Thinat is offline   Reply With Quote

Old   March 1, 2012, 07:38
Default
  #2
Member
 
Laurens Van Dyck
Join Date: Jul 2011
Location: Netherlands/Germany
Posts: 34
Rep Power: 5
laurensvd is on a distinguished road
const volScalarField& someScalar = this->db().objectRegistry::lookupObject<volScalarFiel d> ("someScalar");

where you change someScalar with the name of what you are looking for, and in case its a vector,tensor,... just change volScalarField& to the appropriate type.
laurensvd is offline   Reply With Quote

Old   March 1, 2012, 12:15
Default
  #3
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 386
Rep Power: 10
marupio is on a distinguished road
single element types can't be registered in the objectRegistry. You could use an IOlist, or the IOreferencer (just google it). Also, an objectRegistry lookup returns a const reference, so you can't change it.
__________________
~~~
Follow me on twitter @DavidGaden
marupio is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Water subcooled boiling Attesz CFX 7 January 5, 2013 03:32
CFX13 Post Periodic interface EtaEta CFX 7 December 8, 2011 17:15
natural convection mehrdadeng CFX 10 February 25, 2011 05:25
Calculated gradient boundary condition similar to gammaContactAngle adona058 OpenFOAM Running, Solving & CFD 0 September 26, 2007 15:23
Scalar boundary condition inside the fluid domain Ethan CD-adapco 3 May 2, 2007 16:02


All times are GMT -4. The time now is 19:57.