|
[Sponsors] |
January 15, 2016, 12:50 |
Getting error when solving pow(x,y)
|
#1 |
New Member
Join Date: Jan 2016
Posts: 18
Rep Power: 10 |
I have used the following equations:
Code:
set Re [expr {($velocity*$density*$bll)/$viscosity}] set cf [expr {pow((2*log10($Re))-0.65),(-2.3)}] set twall [expr {($cf/2)*$density*pow($velocity,2)}] set ustar [expr {sqrt($twall/$density)}] set deltas [expr {($yp*$viscosity)/($density*ustar)}] but i keep getting this error Code:
unexpected "," outside function argument list in expression "pow((2*log10($Re))-0.65),(-2.3)" (parsing expression "pow((2*log10($Re))-0.6...") invoked from within "expr {pow((2*log10($Re))-0.65),(-2.3)}" (procedure "afMesh" line 128) invoked from within "afMesh" invoked from within ".mesh.af2.dbb invoke " invoked from within ".mesh.af2.dbb instate {pressed !disabled} { .mesh.af2.dbb state !pressed; .mesh.af2.dbb invoke } " (command bound to event) |
|
January 16, 2016, 13:35 |
|
#2 |
Senior Member
Travis Carrigan
Join Date: Jul 2010
Location: Arlington, TX
Posts: 161
Rep Power: 15 |
You're missing a set of parentheses.
Your code: [expr {pow((2*log10($Re))-0.65),(-2.3)}] Correct code: [expr {pow(((2*log10($Re))-0.65),(-2.3))}] |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
simpleFoam error - "Floating point exception" | mbcx4jc2 | OpenFOAM Running, Solving & CFD | 12 | August 4, 2015 02:20 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 06:20 |
Unstabil Simulation with chtMultiRegionFoam | mbay101 | OpenFOAM Running, Solving & CFD | 13 | December 28, 2013 13:12 |
calculation stops after few time steps | sivakumar | OpenFOAM Running, Solving & CFD | 7 | March 17, 2013 06:37 |
Could anybody help me see this error and give help | liugx212 | OpenFOAM Running, Solving & CFD | 3 | January 4, 2006 18:07 |