Read in Formula via Dictionary
Hi guys,
quick question, I created an own Dict and reading in a formular via Code:
word cd(word(sensorDict.subDict("solving").lookup("cd"))); Code:
cd "1+10*Foam::exp(Re,0.66666667)"; Thanks for help |
Hi, I tried with
Code:
#include <cstdlib> Any ideas? |
This means you will need to have a parser/interpreter. I'm not sure if there is one in OpenFOAM, yiou might have some luck with swak4Foam though.
|
I think you might want equationReader.
swak4Foam could be suitable, but if you want to parse a user-entered equation and use it at your discretion within your application, then that is exactly what equationReader was intended for. Be careful, though... any interpreted equations will take longer to evaluate than hard-coded equations. |
All times are GMT -4. The time now is 20:56. |