|
[Sponsors] |
February 21, 2012, 12:20 |
Sharing a scalar Solver -> Boundary
|
#1 |
Senior Member
Aurelien Thinat
Join Date: Jul 2010
Posts: 165
Rep Power: 15 |
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. |
|
March 1, 2012, 08:38 |
|
#2 |
Member
Laurens Van Dyck
Join Date: Jul 2011
Location: Netherlands/Germany
Posts: 34
Rep Power: 14 |
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. |
|
March 1, 2012, 13:15 |
|
#3 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 21 |
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 |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Water subcooled boiling | Attesz | CFX | 7 | January 5, 2013 04:32 |
CFX13 Post Periodic interface | EtaEta | CFX | 7 | December 8, 2011 18:15 |
natural convection | mehrdadeng | CFX | 10 | February 25, 2011 06:25 |
Calculated gradient boundary condition similar to gammaContactAngle | adona058 | OpenFOAM Running, Solving & CFD | 0 | September 26, 2007 16:23 |
Scalar boundary condition inside the fluid domain | Ethan | Siemens | 3 | May 2, 2007 17:02 |