Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > got stuck in equation

Reply
Thread Tools

got stuck in equation

 
 
usamazohad@gmail.com
Guest
Posts: n/a
 
      01-01-2013
hi . . my name is usama khan
i am the student of civil engeering and we got assignment to make a project program on flexible pavement design using python.

i know very litle about programing. still learning from tutorials. u can call me a beginner.
now i need to solve this equation so that i can put this in python but the formula of design is very complex

Formula is :

log(W1 = (Z)(S)+9.36log(SN+1) -2.0+(log(dpsi/(4.5-1.5))(/(.40+1094/(SN+1)^2.5)+2.32log(Mr-)-8.07

every thing is constant except this SN. . i want to seperate SN like SN= rest of the stuff. how can i seprate it because manualy its impossible to take SN out.
so plz help me out
 
Reply With Quote
 
 
 
 
Chris Angelico
Guest
Posts: n/a
 
      01-01-2013
On Wed, Jan 2, 2013 at 2:40 AM, <> wrote:
> hi . . my name is usama khan
> i am the student of civil engeering and we got assignment to make a project program on flexible pavement design using python.
>
> i know very litle about programing. still learning from tutorials. u can call me a beginner.
> now i need to solve this equation so that i can put this in python but the formula of design is very complex
>
> Formula is :
>
> log(W1 = (Z)(S)+9.36log(SN+1) -2.0+(log(dpsi/(4.5-1.5))(/(.40+1094/(SN+1)^2.5)+2.32log(Mr-)-8.07
>
> every thing is constant except this SN. . i want to seperate SN like SN= rest of the stuff. how can i seprate it because manualy its impossible to take SN out.
> so plz help me out


This isn't a Python question, it's an algebra one. I don't know what
Z, S, and so on are, but for the most part, the basic rule of solving
equations applies: Do the same thing to both sides and it's still
true. Work on it until you can isolate SN on one side.

I don't know what this bit means, though:

2.32log(Mr-)

Is this a transcription error? You can't subtract nullness from something.

ChrisA
 
Reply With Quote
 
 
 
 
Dave Angel
Guest
Posts: n/a
 
      01-01-2013
On 01/01/2013 10:40 AM, wrote:
> hi . . my name is usama khan
> i am the student of civil engeering and we got assignment to make a project program on flexible pavement design using python.
>
> i know very litle about programing. still learning from tutorials. u can call me a beginner.
> now i need to solve this equation so that i can put this in python but the formula of design is very complex
>
> Formula is :
>
> log(W1 = (Z)(S)+9.36log(SN+1) -2.0+(log(dpsi/(4.5-1.5))(/(.40+1094/(SN+1)^2.5)+2.32log(Mr-)-8.07
>
> every thing is constant except this SN. . i want to seperate SN like SN= rest of the stuff. how can i seprate it because manualy its impossible to take SN out.
> so plz help me out


Tk Solver is (or was) a program for getting numerical results from
equations where you couldn't (or didn't want to) express the equation
with the independent variable isolated on its own side of the equals
sign. I don't know where it's available for purchase or download now;
I do see references to it on the web, plus books still available about
it. Apparently it's up to version 5.

Anyway, since everything else is a constant, use some program like Tk
Solver to get the value for SN, then the Python program becomes simply:

SN = 4.7732

or whatever.

On the other hand, perhaps you didn't mean the other values were
constant, but rather known. For example, perhaps your program is
supposed to ask the user for values to W18, to dpsi, etc., then it is to
calculate one or more values for SN that make the equation work.


SN might be "structural number" as indicated on this web page:

http://classes.engr.oregonstate.edu/.../06-3_body.htm

The big equation on that page looks kinda like the one you present,
though I didn't study every term.


1)
Is there a finite range of values that SN might fall into? I know
nothing about pavement design, other than what I just read there, but
there might well be a specific range that's reasonable to expect.

2)
Take the present equation, and subtract log(w1 from both sides. Now,
you want a value for SN that produces zero, or something close for the
left hand side. Call that side "error". Is the value "error"
relatively predictable for changes in SN ? For example, in the simplest
case, any increase in SN will result in an increase of error. The worst
case would be where any tiny change in SN might result in enormous
changes in a random direction to error.

3)
Figure an acceptable value for error, so you'll know when you're close
enough.

4)
if the first three questions have good answers, then you could write a
function that transforms FN into error. Then write a controlling loop
that calls that function repeatedly, picking values for FN that will
converge the error into ever-smaller value. The first iteration might
go over the entire range, dividing it into maybe ten steps. Then pick
the two smallest values for error, and treat those particular two FN
values as your new range.

Repeat until the error value is below the threshold figured in #3, or
until you've iterated an unreasonable number of times.

There are ways to improve on that, but they generally require you know
the approximate behavior of the function. For example, Newton's method
is a method of calculating square roots, starting with end points of 1
and N, and it converges more rapidly because it effectively calculates
the slope of the curve over each range.





--

DaveA

 
Reply With Quote
 
Dave Angel
Guest
Posts: n/a
 
      01-01-2013
On 01/01/2013 11:03 AM, Chris Angelico wrote:
> On Wed, Jan 2, 2013 at 2:40 AM, <> wrote:
>> hi . . my name is usama khan
>> i am the student of civil engeering and we got assignment to make a project program on flexible pavement design using python.
>>
>> i know very litle about programing. still learning from tutorials. u can call me a beginner.
>> now i need to solve this equation so that i can put this in python but the formula of design is very complex
>>
>> Formula is :
>>
>> log(W1 = (Z)(S)+9.36log(SN+1) -2.0+(log(dpsi/(4.5-1.5))(/(.40+1094/(SN+1)^2.5)+2.32log(Mr-)-8.07
>>
>> every thing is constant except this SN. . i want to seperate SN like SN= rest of the stuff. how can i seprate it because manualy its impossible to take SN out.
>> so plz help me out

> This isn't a Python question, it's an algebra one. I don't know what
> Z, S, and so on are, but for the most part, the basic rule of solving
> equations applies: Do the same thing to both sides and it's still
> true. Work on it until you can isolate SN on one side.


Such a rule may not be able to solve an equation when there SN appears
more than once on the RHS, and where it's inside a transcental
function. I don't consider this an algebra problem, but a programming
problem.

> I don't know what this bit means, though:
>
> 2.32log(Mr-)
>
> Is this a transcription error? You can't subtract nullness from something.
>
> ChrisA


Mr- was apparently intended to mean "M sub r", the subgrade resilient
modulus
<http://classes.engr.oregonstate.edu/cce/winter2012/ce492/Modules/04_design_parameters/04-2_body.htm#mr> (in
psi). Just a number.

The only thing i know about any of this is from here:

http://classes.engr.oregonstate.edu/.../06-3_body.htm



--

DaveA

 
Reply With Quote
 
Usama Khan
Guest
Posts: n/a
 
      01-01-2013
am just a begginer bro. . jus learnt if elif while nd for loop. .

can u just display me the coding u want. .it could save my time that i havewhile searchning SN out. . i will give u that dependable variables values.
 
Reply With Quote
 
Usama Khan
Guest
Posts: n/a
 
      01-01-2013
am just a begginer bro. . jus learnt if elif while nd for loop. .

can u just display me the coding u want. .it could save my time that i havewhile searchning SN out. . i will give u that dependable variables values.
 
Reply With Quote
 
Usama Khan
Guest
Posts: n/a
 
      01-01-2013
Sn range is given in here. .

www.dot.state.fl.us/rddesign/DS/08/IDx/514.pdf
 
Reply With Quote
 
Usama Khan
Guest
Posts: n/a
 
      01-01-2013
Sn range is given in here. .

www.dot.state.fl.us/rddesign/DS/08/IDx/514.pdf
 
Reply With Quote
 
Chris Angelico
Guest
Posts: n/a
 
      01-01-2013
On Wed, Jan 2, 2013 at 3:42 AM, Dave Angel <> wrote:
> On 01/01/2013 11:03 AM, Chris Angelico wrote:
>> This isn't a Python question, it's an algebra one. I don't know what
>> Z, S, and so on are, but for the most part, the basic rule of solving
>> equations applies: Do the same thing to both sides and it's still
>> true. Work on it until you can isolate SN on one side.

>
> Such a rule may not be able to solve an equation when there SN appears
> more than once on the RHS, and where it's inside a transcental
> function. I don't consider this an algebra problem, but a programming
> problem.


It's a tad more complicated than your average equation, and I haven't
the time now to prove the point by actually solving it, but every
operation that I can see in that formula can be reversed. The hairy
bit is that there are two references to SN, so it's going to be a bit
messy to untangle, and might end up as a higher-order equation.

But you're likely right that other forms of solver may be more useful
here. Algebra definitely _could_ be the solution, but it isn't
necessarily the best.

ChrisA
 
Reply With Quote
 
Roy Smith
Guest
Posts: n/a
 
      01-01-2013
In article <mailman.1521.1357061130.29569.python->,
Usama Khan <> wrote:

> am just a begginer bro.


That's fine, we were all beginners once. You will discover that people
here are willing to invest a lot of time and effort helping beginners
get started.

> now can u give me the coding of this equation as i need to save my time. . .i
> am learning from tutorials. . so its taking lot of time. kindly consider my
> request nd give me the code so that i can put it. .i dont want to losen up my
> grade. .am trying hard. . .


You will also discover that people are not willing to invest any effort
to help if you are not also willing to invest your own effort. Nobody
is going to just give you some code for your homework assignment so you
don't have to put any time into it.
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
got stuck in equation Usama Khan Python 0 01-01-2013 06:55 PM
window explorer got stuck spidervn General Computer Support 1 09-27-2006 03:44 PM
GOT STUCK IN JAVA PROBLEM FACER Java 10 02-13-2006 09:30 PM
Got stuck with wchar_t *argv[] Sumpfman C Programming 6 11-18-2004 02:38 PM
got stuck with my first struts example sonali Java 2 03-03-2004 12:53 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57