Lookup transportproperties from BC
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 Code:
/fhome/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude/objectRegistryTemplates.C: In member |
Hi Michiel,
I have the code compiling in one of the boundary conditions I implemented (posted below as example). I think the error is somewhere else Code:
const dictionary& transportProperties = db().lookupObject<IOdictionary> Best, |
Hi Alberto,
Thanks for the quick response. If I comment out this piece of code, the library compiles as it should (and can be used with interFoam). So maybe there is something earlier in my code that has a weird interaction with the lookup piece? Anyway, the rest of the member functions section (which is the only part I touched), is added below: Code:
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // Is there any change that it is a version issue?! I'm using OF-1.7.1 (as you might have seen already in the error message) Cheers, |
I modified the BC in ~/OpenFOAM/OpenFOAM-2.1.x/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/dynamicAlphaContactAngle/ including your exact lines of code, and it compiles. I am not sure what's going on in your code.
|
Thanks for trying that!
Since the newDynContactAngle was a separately compiled library (copied from the dynamicAlphaContactAngle) I decided to try putting the piece of code directly in the dynamicAlphaContactAngle.C file and recompile it. Just to see whether I messed up when copying and recompiling the new library. Probably I didn't, because I get the same error message again. So either my openfoam installation has some error somewhere, or there is a difference between 1.7.1 and 2.1.x that causes the problem. I think I'll switch to 2.1.x. In both cases I mention above I have to recompile OpenFOAM so I might as well. I haven't done much custom coding yet so working with the newest version will help me in the future anyway. Thanks again for the help, it's much appreciated! |
All times are GMT -4. The time now is 10:58. |