CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Mesh Generation & Pre-Processing Software > Pointwise & Gridgen

Getting error when solving pow(x,y)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 15, 2016, 12:50
Default Getting error when solving pow(x,y)
  #1
New Member
 
Join Date: Jan 2016
Posts: 18
Rep Power: 10
weigl is on a distinguished road
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)
what am I doing wrong here?
weigl is offline   Reply With Quote

Old   January 16, 2016, 13:35
Default
  #2
Senior Member
 
Travis Carrigan
Join Date: Jul 2010
Location: Arlington, TX
Posts: 161
Rep Power: 15
tcarrigan is on a distinguished road
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))}]
__________________
Travis Carrigan
Manager, Business Development
Pointwise, Inc.
tcarrigan is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 17:54.