|
[Sponsors] |
April 28, 2012, 05:57 |
Lookup transportproperties from BC
|
#1 |
Member
Michiel
Join Date: Oct 2010
Location: Delft, Netherlands
Posts: 97
Rep Power: 15 |
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")); 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 Last edited by michielm; April 28, 2012 at 10:37. |
|
|
|
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 |