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

Lookup transportproperties from BC

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By michielm
  • 1 Post By alberto

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   April 28, 2012, 05:57
Default Lookup transportproperties from BC
  #1
Member
 
Michiel
Join Date: Oct 2010
Location: Delft, Netherlands
Posts: 97
Rep Power: 15
michielm is on a distinguished road
Hi,
I am currently adapting the dynamicAlphaContactAngle BC and I want to access transportProperties. I found online (http://albertopassalacqua.com/?p=947) that the following piece of code should take care of that:
Code:
// Extract the dictionary from the database
const dictionary& transportProperties = db().lookupObject<IOdictionary>
(
 "transportProperties"
);

// Exctract subdictionary from the main dictionary
dictionary mySubDict
(
 transportProperties.subDict("mySubDict")
);

// Extracting scalar value
dimensionedScalar myScalar(mySubDict.lookup("myScalar"));
However, if I compile the library I get the following error message:
Code:
/fhome/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude/objectRegistryTemplates.C: In member
function `const Type& Foam::objectRegistry::lookupObject(const Foam::word&) const 
[with Type = Foam::IOdictionary]':newDynAngleFvPatchScalarField.C:153:   instantiated from here
/fhome/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude/objectRegistryTemplates.C:130: 
error: cannot dynamic_cast `(const Foam::Time*)((const Foam::objectRegistry*)this)->Foam::objectRegistry::time_' 
(of type `const struct Foam::Time*') to type `const class Foam::objectRegistry*' (source is a pointer to incomplete type) 
make: *** [Make/linux64GccDPOpt/newDynAngleFvPatchScalarField.o] Error 1
I don't really understand the error message. Does anyone know what could be the problem here?
atulkjoy likes this.

Last edited by michielm; April 28, 2012 at 10:37.
michielm is offline   Reply With Quote

 


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
transportProperties: CrossPowerLawCoeffs...? klausb OpenFOAM Running, Solving & CFD 2 March 25, 2016 14:45
Dynamic Viscosity at transportproperties dictionary NickolasPl Main CFD Forum 0 June 2, 2011 14:06
Convergence on anisotropic tetahedral meshes pbo OpenFOAM Running, Solving & CFD 12 December 14, 2010 11:59
Error with 'vanAlbada' scheme Julian K. OpenFOAM Running, Solving & CFD 0 June 18, 2009 09:31
Buoyancydriven cavity flow anita OpenFOAM Running, Solving & CFD 3 March 26, 2008 10:24


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