seeking help with solving implicit equation



Folks,

 

I'm writing a routine which makes use of the Colebrook equation for
calculating friction factors:

 

1/sqrt(f) = -2log(e/3.7D + 2.51 / (Re*sqrt(f))

 

In other words, the equation is implicit in the friction factor f.

 

How do I properly define the equation and solve for f once I have
defined e, D, Re?  I thought it was as simple as 

 

1/sqrt(f):= ..etc.., define the other variables via the : operator and
solve (%,f) but this makes Maxima swear at me.  It seems like this
should be fairly straightforward root finding, but then again I am not a
mathematician and there's likely some fundamental problem staring me
full in the face.

 

A clue for the clueless?

Thanks

Len

 

 

 

Len de Vlaming

Project Consultant

 

Geomatrix Consultants

420 Weber St. N, Unit G

Waterloo, Ontario  N2L 4E7

 

Tel        519 886 7500 ext 224

Cell      519 729 7048  **new**

Fax       519 886 7419