Ask Your Question

madan26's profile - activity

2019-07-10 23:29:59 +0100 received badge  Popular Question (source)
2016-11-15 03:48:29 +0100 received badge  Popular Question (source)
2015-06-13 06:55:30 +0100 answered a question No able to get the results from the last segment

dear kcrisman, thanks for your comments. I am not getting any error. Just not able to get the show results. If I dont use the interact than it is working fine. This problem is that I am using the def command with in def and not able to get the values from the first def. if I use last def as different, means without indents than I got no error but it also dont show the results.

2015-06-11 11:44:00 +0100 answered a question How to save the worksheet to PC on windows &

I am using virtual machine.

2015-06-11 11:41:15 +0100 received badge  Editor (source)
2015-06-11 11:40:20 +0100 commented question No able to get the results from the last segment

Still looking for the answer from someone. Please help me out..

2015-06-09 05:58:41 +0100 answered a question How do I upgrade sage 5.9 to 6.4.1?

is while update sage from 6.6 to 6.7 on windows 7 will lost my data

2015-06-09 05:51:40 +0100 asked a question How to save the worksheet to PC on windows &

How I can save my sage file to PC on windows 7 to share with others.

2015-06-09 05:47:56 +0100 received badge  Scholar (source)
2015-06-09 05:47:19 +0100 answered a question Interact layout

Thanks it is a great help. Is it possible to update button in center of both column.

2015-06-09 05:35:28 +0100 asked a question No able to get the results from the last segment

I am giving my full code below. I am unable to get the results from code marked in red. Rest is working fine

html('<center><h2>Tyre Design</h2></b>by : Madan Saini')
#Input Parameters
PI = pi.n()
def myplot(t_size=input_box('3.00-18',label='Tyre Size',width=20),od=input_box(round(627,2),label='Tyre Outer Dia.',width=20), sw=input_box(round(80,2),label='Tyre Section Width',width=20), nsd=input_box(round(6.5,2),label='Non Skid Depth',width=20), ut=input_box(round(2.5,2),label='Under Tread',width=20), bn=input_box(round(0,0),label='No of Breakers',width=20), bg=input_box(round(1.2,2),label='Breaker Gauge',width=20), pn=input_box(round(2,0),label='No of Plies',width=20), pg=input_box(round(0.85,2),label='Ply Gauge',width=20), rg=input_box(round(2.5,2),label='Side Rubber Gauge',width=20), rim_d=input_box(round(458.7,2),label='Rim Dia (D)',width=20), rim_w=input_box(round(65,0),label='Rim Width(A)', width=20),rim_f=input_box(round(14,2),label='Rim Flange Height(G)',width=20), beta_c=input_box(40,label='Crown Angle',width=20), auto_update=False):

#Initial guess: Assume the closest ellipse
    rc = ((od/2)-nsd-ut-(bn*bg)-(pn*pg/2))
    W = ((sw/2)-rg-(pn*pg/2))
    rb = ((rim_d/2)+rim_f-(pn*pg*1.5))
    zb = rim_w/2.0
    rw_init = rc*(rb/rc+sqrt(1-(zb/W)^2))/(1+sqrt(1-(zb/W)^2))
    rw = var('rw')
    Bc = var('Bc')
    def find_tire_width(data):
        rw = data[0]
        Bc = data[1]
        r = var('r')
        F = (r^2-rw^2)*sqrt(rc^2-r^2*sin(Bc)^2)/sqrt((rc^2-rw^2)^2*rc^2*cos(Bc)^2-(r^2-rw^2)^2*(rc^2-r^2*sin(Bc)^2))
        z = function('z',r)
        d2 = desolve_rk4(diff(z,r)+F,z,ics=[rc*0.9999,0],end_points=(rw-(rc-rw)/2),step=-(rc-rw)/2000)
        S = spline(d2)
        return [S(rw), S(rb)]

    Bc = (90-beta_c)/180*PI
    zwb = find_tire_width([rw_init, Bc])
    show("calculated rc = " + str(rc))
    show("calculated W = " + str(W))
    show("calculated rb = " + str(rb))
    show("calculated zb = " + str(zb))
    show("calculated Bc = " + str(Bc))    
    show("rw_init based on elliptical approximation = "+str(rw_init))
    show("zw in the natural shape = " + str(zwb[0]))
    show("zb in the natural shape = " + str(zwb[1]))

from this point the code is not showing any results

def f(input):
    zwb = find_tire_width(input)
    return ((W-zwb[0])^2+(zb-zwb[1])^2);

c1 = lambda input: input[0]-rb
c2 = lambda input: rc - input[0]
c3 = lambda input: input[1]
c4 = lambda input: pi/2 - input[1]
a = minimize_constrained(f,[c1, c2, c3, c4],[rw_init, Bc])
show("rw in the optimal shape = " + str(a[0]))
show("Beta in the optimal shape = " + str(a[1]) + " radians")

please help me out to solve this issue..

2015-06-03 09:42:57 +0100 asked a question Interact layout

How to make the auto_update button to the center of 2 column interact layout. Please advice

2015-06-03 09:40:44 +0100 answered a question Using layout option with auto_update=false

How to make the 'update' button in center.