|
[Sponsors] |
Error when <dictionary>.lookup("variable"). OpenFOAM 1.6-ext |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Malthe V. Eisum
Join Date: Nov 2015
Location: Nibe, Denmark
Posts: 5
Rep Power: 11 ![]() |
I'm making my owen solver from icoFoam, where I add a body force B = U0m*(2*pi/period)*cos((2*pi/period)*t).
Where the period and free stream velocity (U0m) is to be loaded fra a dictionary. I think I have figured out the syntax from looking in "createFields.H" to keep it simple I started with the assumption that the variables was gonna be placed in "transportProperties". Code:
IOdictionary transportProperties ( IOobject ( "transportProperties", runTime.constant(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE ) ); scalar period(transportProperties.lookup("period")); scalar U0m(transportProperties.lookup("U0m")); Code:
createFields.H: In function 'int main(int, char**)': createFields.H:20: error: cannot convert 'Foam::ITstream' to 'Foam::scalar' createFields.H:21: error: cannot convert 'Foam::ITstream' to 'Foam::scalar' in initialization
__________________
Malthe Eisum |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Malthe V. Eisum
Join Date: Nov 2015
Location: Nibe, Denmark
Posts: 5
Rep Power: 11 ![]() |
Have spend 48 hours searching for an answer for my problems and the 15 min after posting my thread I find my own answer.
http://www.cfd-online.com/Forums/ope...nt-solver.html
__________________
Malthe Eisum |
|
![]() |
![]() |
![]() |
Tags |
.lookup(""), openfoam 1.6-ext |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Map of the OpenFOAM Forum - Understanding where to post your questions! | wyldckat | OpenFOAM | 10 | September 2, 2021 06:29 |
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 | cfd.direct | OpenFOAM Announcements from Other Sources | 2 | August 31, 2015 14:36 |
Suggestion for a new sub-forum at OpenFOAM's Forum | wyldckat | Site Help, Feedback & Discussions | 20 | October 28, 2014 10:04 |
Test directory missing in OpenFOAM 1.6 ext | andrewryan | OpenFOAM | 2 | March 20, 2011 16:41 |
Openfoam 1.6 | ar_mofidi | OpenFOAM | 1 | November 4, 2009 06:26 |