Ramakrishnan

239 Reputation

5 Badges

4 years, 320 days
I have retired as Professor-Mechanical in Sri Venkateswara College of Engineering and Technology under Anna University affiliated colleges in TamilNadu, India. I have 19 years of Industrial and 20 years of teaching experience. I am learning Maple for the past three and half years hoping to make atleast one appreciable maple presentation.

MaplePrimes Activity


These are replies submitted by Ramakrishnan

@Joe Riel 

Dear Sir, Thanks for your procedure. It works outside, but when I take it inside textbox edit action, the string remains for one value and one gets converted. I am still working on it and hope to succeed calling the procedure from inside the textarea edit region. Cheers. Ramakrishnan V


 


NULL

NULL

NULL

NULL


 

Download I_gotNumericAnswerinTextArea.mw

 

@Carl Love 

Oh! It is an excellent one line command I used inside the edit changed textbox(0 and 1) content 's and it worked fine. I have not used the word macro (deleted the word macro) and it still works. Why the word macro is there? 

Thanks.

Regards.

RamakrishnanV

 

@Carl Love 

Thanks. Awaiting an example for procedure and module combination. Cheers. Ramki..

 

@Zeineb 

Dear Sir,

I give below the command obtained using explorer (it is a simple exercise in maple)

Explore(evalf(3/13+16/13*x), parameters = [[x = 0 .. 30, controller = slider]], loop = never, size = NoUserValue, numeric = false, echoexpression = true)

I also attach the document for your use.

Make the best use of it for any value of x 


                               x (30) = 483/13 = 37.15 for my data.


 


y := a*x+b; d := [[3, 4], [5, 6], [6, 8], [8, 10]]; c := CurveFitting[LeastSquares](d, x, curve = y); Printf(c)

Printf(3/13+(16/13)*x)

(1)

plot(c, x = 0 .. 10)

 

``

Explore(3/13+(16/13)*x, parameters = [[x = 0 .. 30, controller = slider]], loop = never, size = NoUserValue, numeric = false, echoexpression = true)

(2)

Explore(evalf(3/13+(16/13)*x), parameters = [[x = 0 .. 30, controller = slider]], loop = never, size = NoUserValue, numeric = false, echoexpression = true)

``

NULL

 

Download Fix_plot_stLineData.mw

 

Fix_plot_stLineData.mw


 

 

@Carl Love 

Thank you very much for the detailed clarification. This will be useful very much. Ramakrishnan.V

@Carl Love 

Thank you very much. It works fine both ways now radian to degree and degree to radian.

Why is the if in if statement inside single quotes.

Can we use if statement to assign before the set property statement?

I will be using a procedure outside the table, use 'if else' statement and try to achieve the same results. Hope I will get it..

radianToDegree.mw
 

NULL

``

``

 

``Degrees

``Radians

``

``

To verify 1800  = 6.28 radians

To verify 6.28 radians = 1800  

 

 

``


 

Download radianToDegree.mw

 

Thanks.

Ramakrishnan V 

Dear group member,

In the first place, I request you not to react immediately to my my message. The caption and the message are contradicting as it indicates that there is a maple account and there is another account of yours in the group. Let me not take this issue at all.

I also felt like deleting myself from different groups, but after me getting deleted (not myself, but by the group itself), I felt bad with an inferiority complex.

Ask yourself, what was your expectation when you joined the group. Certainly we were not and in fact no one, was an expert in maths and maple at the time of joining the group. Therefore the purpose was mainly to learn and share peer views apart from many other like getting good friends and knowing solutions to problems that we did not even know existed in maths.

I was doing a probe why I should quit?

First, I thought I am unfit and did not understand anything in the questions and answers. Then my mind said that is the main reason you should still continue in the group to improve yourself over time.

Next, I thought I am much superior to those participating in the group and know every thing. Then again my mind said that is main reason you should still continue in the group to contribute your approach to solutions, get pride and win thousands of hearts .

Either way, I find no reason why I should delete myself wheen I donot know how to do now Wait. Watch. You will see the light and bright future ahead. All the best.

Ramakrishnan V

@acer 

Thanks.

Now I understand the difference between the use of open brackets and square brackets.

Thanks again.

Ramakrishnan V

Just have a procedure to vary the range till y approximately equal to zero (y < 1 e -12).
 

restart; de := diff(y(t), t, t) = -1; ic := y(0) = 1, (D(y))(0) = 0; Events := [y(t) = 0, diff(y(t), t) = -.5*(diff(y(t), t))]; dsol := dsolve({de, ic}, numeric, events = [Events], range = 0 .. 4); plots[odeplot](dsol, thickness = 3, color = red)

 

dsol

dsol

(1)

``


 

Download bouncingBall.mw

Hope attached doc helps you to an extent. Please note, the function values, only you can determine with values of constants and variable r values.
 

Let r = r1, r2, r3, r4 and r5

At r, find V and E0

V := [1, 2, 3, 4, 5, 6]; E0 := [6, 5, 4, 3, 2, 1]

[6, 5, 4, 3, 2, 1]

(1)

E0B0 := [12, 20, 8, 12, 4, 4]

Plot of V vs E0 is given below. Only points are plotted

plot(`<|>`(`<,>`(1, 2, 3, 4, 5, 6), `<,>`(6, 5, 4, 3, 2, 1)), style = point)

 

NULL

B0 := [2, 4, 2, 4, 2, 4]

[2, 4, 2, 4, 2, 4]

(2)

Plot of V vs B0 is given below.

plot(`<|>`(`<,>`(1, 2, 3, 4, 5, 6), `<,>`(2, 4, 2, 4, 2, 4)), style = line)

 

``

Plot of V vs E0 is given below.

NULL

NULLSimilarly, find E0*B0 as a list and plot as below

plot(`<|>`(`<,>`(1, 2, 3, 4, 5, 6), `<,>`(12, 20, 8, 12, 4, 4)), style = pointline)

 

NULL


 

Download howDoIplot.mw

Cheers. Ramakrishnan V

@Preben Alsholm 

it is great. Nice way for using it in a session. But any way out for only few lines in a session?

Cheers. Thanks.

Ramakrishnan V

@Christopher2222 

Dear Christopher, Thank you for the tips. It works and label are not visible. I also unselected [ Format -> Equation Labels -> Worksheet] and labels were removed.

I was wondering how the equations (two cells) between 10 and 11 and two equations (cells) were not included. I found the after typing the assignment command, if "ctrl+equal" to is entered, label  is not coming. If i use just "enter", then equan label comes out. I donot know if it is proper that way only or not.

In your recommendation, i believe no labels are provided for all lines (all labels are removed). If a few labels are needed and a few are not needed, then,i just wanted to know wheter use of " ctrl+equal " for no label  and " enter key " for label requirement are ok or not. There must be a way out in maple for this. I am just searching for it.

Thanks for you tips again as it works well for me.

Cheers. Ramakrishnan V

@Kitonum 

Hope the contents of file enclosed will be ok.

Thanks for comments and help

Ramakrishnan VExperimentalData.xlsxRequest_Plot_from_ProfKitonum.mw
 

restart; with(ExcelTools)

plotplease := proc (f1, f2, f3, f4, f5) description "plotting the curves"; plot([f1, f2, f3, f4, f5], x = 2 .. 5, color = [red, blue, green, black, orange], view = [2 .. 5, 20 .. 45], legend = Legend, title = Title, caption = Caption, color = [black], linestyle = [1, 2, 4, 3, 6], thickness = [3, 1, 2, 4, 2], labels = [xdataVar, ydataVar], labeldirections = ["horizontal", "vertical"]) end proc

proc (f1, f2, f3, f4, f5) description "plotting the curves"; plot([f1, f2, f3, f4, f5], x = 2 .. 5, color = [red, blue, green, black, orange], view = [2 .. 5, 20 .. 45], legend = Legend, title = Title, caption = Caption, color = [black], linestyle = [1, 2, 4, 3, 6], thickness = [3, 1, 2, 4, 2], labels = [xdataVar, ydataVar], labeldirections = ["horizontal", "vertical"]) end proc

(1)

``

ObtainyValues := proc (P, a::list) local j, yVal, z; j := 0; yVal := []; for z in a do if j = 0 then yVal := evalf[3](eval(S2, [x = z])) else yVal := yVal, evalf[3](eval(S2, [x = z])) end if; j := j+1 end do; yVal end proc

proc (P, a::list) local j, yVal, z; j := 0; yVal := []; for z in a do if j = 0 then yVal := evalf[3](eval(S2, [x = z])) else yVal := yVal, evalf[3](eval(S2, [x = z])) end if; j := j+1 end do; yVal end proc

(2)

M1 := Import("C:/Users/dell/Desktop/ExperimentalData.xlsx", 1)

Matrix(%id = 18446746374273448774)

(3)

``

for i to 21 do N[i] := NULL; for j to 7 do N[i] := N[i], M1[j, i] end do; d[i] := NULL; for j to 7 do d[i] := d[i], N[i][j] end do end do; y := a*x^2+b*x+c; for i from 2 to 21 do d[i] := [d[i]] end do

``

d[1]

"BrakePower", 2.356, 2.749, 3.142, 3.534, 3.927, 4.32

(4)

d[1]

"BrakePower", 2.356, 2.749, 3.142, 3.534, 3.927, 4.32

(5)

xdataVar := d[1][1]

"BrakePower"

(6)

ydataVar := "Brake Thermal Efficiency" = "Brake Thermal Efficiency"NULL

``

xdata := [d[1][2], d[1][5], d[1][7]]

[2.356, 3.534, 4.32]

(7)

S2BTE := d[2][1]

"S2"

(8)

S2_BTE_ydata := [d[2][2], d[2][5], d[2][7]]

[27.0, 32.8, 34.0]

(9)

S4_BTE_yVar := d[3][1]

"S4"

(10)

S4_BTE_ydata := [d[3][2], d[3][5], d[3][7]]

[32.0, 40.0, 41.6]

(11)

D4P5U_BTE_yVar := d[4][1]

"D4P5U"

(12)

D4P5U_BTE_ydata := [d[4][2], d[4][5], d[4][7]]

[29.4, 36.3, 37.7]

(13)

D4P10U_BTE_yVar := d[5][1]

"D4P10U"

(14)

D4P10U_BTE_ydata := [d[5][2], d[5][5], d[5][7]]

[30.1, 37.3, 38.7]

(15)

D4P15U_BTE_yVar := d[6][1]

"D4P15U"

(16)

D4P15U_BTE_ydata := [d[6][2], d[6][5], d[6][7]]

[28.7, 35.4, 36.8]

(17)

D4P5C_BTE_yVar := d[7][1]

"D4P5C"

(18)

D4P5C_BTE_ydata := [d[7][2], d[7][5], d[7][7]]

[29.2, 36.0, 37.5]

(19)

D4P10C_BTE_yVar := d[8][1]

"D4P10C"

(20)

D4P10C_BTE_ydata := [d[8][2], d[8][5], d[8][7]]

[31.4, 39.2, 40.7]

(21)

D4P15C_BTE_yVar := d[9][1]

"D4P15C"

(22)

D4P15C_BTE_ydata := [d[9][2], d[9][5], d[9][7]]

[30.7, 37.6, 39.1]

(23)

NULL

NULL

NULL

NULL

S2BTE := d[2][1]

"S2"

(24)

S2_BTE_ydata := [d[2][2], d[2][5], d[2][7]]

[27.0, 32.8, 34.0]

(25)

S4_BTE_yVar := d[3][1]

"S4"

(26)

S4_BTE_ydata := [d[3][2], d[3][5], d[3][7]]

[32.0, 40.0, 41.6]

(27)

D6P5U_BTE_yVar := d[10][1]

"D6P5U"

(28)

D6P5U_BTE_ydata := [d[10][2], d[10][5], d[10][7]]

[30.0, 36.9, 38.3]

(29)

D6P10U_BTE_yVar := d[11][1]

"D6P10U"

(30)

D6P10U_BTE_ydata := [d[11][2], d[11][5], d[11][7]]

[30.7, 38.1, 39.5]

(31)

D6P15U_BTE_yVar := d[12][1]

"D6P15U"

(32)

D6P15U_BTE_ydata := [d[12][2], d[12][5], d[12][7]]

[29.4, 35.6, 37.1]

(33)

D6P5C_BTE_yVar := d[13][1]

"D6P5C"

(34)

D6P5C_BTE_ydata := [d[13][2], d[7][5], d[7][7]]

[30.0, 36.0, 37.5]

(35)

D6P10C_BTE_yVar := d[14][1]

"D6P10C"

(36)

D6P10C_BTE_ydata := [d[14][2], d[14][5], d[14][7]]

[31.7, 39.5, 41.1]

(37)

D6P15C_BTE_yVar := d[15][1]

"D6P15C"

(38)

D6P15C_BTE_ydata := [d[15][2], d[14][5], d[9][7]]

[30.6, 39.5, 39.1]

(39)

NULL

NULL

``

S2BTE := d[2][1]

"S2"

(40)

S2_BTE_ydata := [d[2][2], d[2][5], d[2][7]]

[27.0, 32.8, 34.0]

(41)

S4_BTE_yVar := d[3][1]

"S4"

(42)

S4_BTE_ydata := [d[3][2], d[3][5], d[3][7]]

[32.0, 40.0, 41.6]

(43)

D8P5U_BTE_yVar := d[16][1]

"D8P5U"

(44)

 

D8P5U_BTE_ydata := [d[16][2], d[16][5], d[16][7]]

[29.1, 35.8, 37.1]

(45)

D8P10U_BTE_yVar := d[17][1]

"D8P10U"

(46)

D8P10U_BTE_ydata := [d[17][2], d[17][5], d[17][7]]

[29.5, 36.2, 37.5]

(47)

D8P15U_BTE_yVar := d[18][1]

"D8P15U"

(48)

D8P15U_BTE_ydata := [d[18][2], d[18][5], d[18][7]]

[28.2, 34.9, 36.2]

(49)

 

D8P5C_BTE_yVar := d[19][1]

"D8P5C"

(50)

D8P5C_BTE_ydata := [d[19][2], d[19][5], d[19][7]]

[28.7, 35.5, 37.0]

(51)

D8P10C_BTE_yVar := d[20][1]

"D8P10C"

(52)

D8P10C_BTE_ydata := [d[20][2], d[20][5], d[20][7]]

[31.1, 38.7, 40.2]

(53)

D8P15C_BTE_yVar := d[21][1]

"D8P15C"

(54)

D8P15C_BTE_ydata := [d[21][2], d[21][5], d[21][7]]

[30.1, 37.3, 38.8]

(55)

NULL

``

NULL

NULL

with(CurveFitting)

NULL

Title := " Effect on Brake Thermal Efficiency for 5 % Uncooled EGR"; Caption := "Fig.4.1 Brake Power Vs Brake Thermal Efficiency  for 5 % Uncooled EGR"; Legend := ["S2 ", "S4 ", "D4P5U", "D6P5U", "D8P5U"]

S2 := PolynomialInterpolation(xdata, S2_BTE_ydata, x, form = Lagrange)

11.67016483*(x-3.534)*(x-4.32)-35.42468582*(x-2.356)*(x-4.32)+22.02494779*(x-2.356)*(x-3.534)

(56)

"(->)"

eval(S2, [x = 3])

30.76559126

(57)

BP := xdata

[2.356, 3.534, 4.32]

(58)

NULL

addList := proc (a::list, b::integer)::integer; local x, i, s; description "add a list of numbers and multiply by a constant"; x := b; s := 0; for i in a do s := s+a[i] end do; s := s*x end proc

proc (a::list, b::integer)::integer; local x, i, s; description "add a list of numbers and multiply by a constant"; x := b; s := 0; for i in a do s := s+a[i] end do; s := s*x end proc

(59)

NULL

NULL

S4 := PolynomialInterpolation(xdata, S4_BTE_ydata, x, form = Lagrange)

13.83130647*(x-3.534)*(x-4.32)-43.20083637*(x-2.356)*(x-4.32)+26.94817141*(x-2.356)*(x-3.534)

(60)

NULL

NULL

D4P5U := PolynomialInterpolation(xdata, D4P5U_BTE_ydata, x, form = Lagrange)

12.70751282*(x-3.534)*(x-4.32)-39.20475900*(x-2.356)*(x-4.32)+24.42178034*(x-2.356)*(x-3.534)

(61)

````

``

D6P5U := PolynomialInterpolation(xdata, D6P5U_BTE_ydata, x, form = Lagrange)

12.96684982*(x-3.534)*(x-4.32)-39.85277155*(x-2.356)*(x-4.32)+24.81045589*(x-2.356)*(x-3.534)

(62)

D8P5U := PolynomialInterpolation(xdata, D8P5U_BTE_ydata, x, form = Lagrange)

12.57784432*(x-3.534)*(x-4.32)-38.66474855*(x-2.356)*(x-4.32)+24.03310479*(x-2.356)*(x-3.534)

(63)

NULLM1[1][1]

"BrakePower"

(64)

NULLNULL

NULLNULL

plotplease(S2, S4, D4P5U, D6P5U, D8P5U)

 

NULL

NULL

Title := " Effect on Brake Thermal Efficiency for 5 % Cooled EGR"; Caption := "Fig.4.2 Brake Power Vs Brake Thermal Efficiency  for 5 % Cooled EGR"; Legend := ["S2 ", "S4 ", "D4P5C", "D6P5C", "D8P5C"]

D4P5C := PolynomialInterpolation(xdata, D4P5C_BTE_ydata, x, form = Lagrange)

12.62106715*(x-3.534)*(x-4.32)-38.88075273*(x-2.356)*(x-4.32)+24.29222182*(x-2.356)*(x-3.534)

(65)

NULLNULL

NULL

D6P5C := PolynomialInterpolation(xdata, D6P5C_BTE_ydata, x, form = Lagrange)

12.96684982*(x-3.534)*(x-4.32)-38.88075273*(x-2.356)*(x-4.32)+24.29222182*(x-2.356)*(x-3.534)

(66)

D8P5C := PolynomialInterpolation(xdata, D8P5C_BTE_ydata, x, form = Lagrange)

12.40495299*(x-3.534)*(x-4.32)-38.34074228*(x-2.356)*(x-4.32)+23.96832553*(x-2.356)*(x-3.534)

(67)

````

````

plotplease(S2, S4, D4P5C, D6P5C, D8P5C)

 

NULL

NULL

NULL

Title := " Effect on Brake Thermal Efficiency for 10 % Uncooled EGR"; Caption := "Fig.4.3 Brake Power Vs Brake Thermal Efficiency  for 10 % Uncooled EGR"; Legend := ["S2 ", "S4 ", "D4P10U", "D6P10U", "D8P10U"]

D4P10U := PolynomialInterpolation(xdata, D4P10U_BTE_ydata, x, form = Lagrange)

13.01007265*(x-3.534)*(x-4.32)-40.28477991*(x-2.356)*(x-4.32)+25.06957292*(x-2.356)*(x-3.534)

(68)

````

``

D6P10U := PolynomialInterpolation(xdata, D6P10U_BTE_ydata, x, form = Lagrange)

13.26940965*(x-3.534)*(x-4.32)-41.14879664*(x-2.356)*(x-4.32)+25.58780699*(x-2.356)*(x-3.534)

(69)

D8P10U := PolynomialInterpolation(xdata, D8P10U_BTE_ydata, x, form = Lagrange)

12.75073565*(x-3.534)*(x-4.32)-39.09675691*(x-2.356)*(x-4.32)+24.29222182*(x-2.356)*(x-3.534)

(70)

NULLNULL

NULLNULL

NULLNULL

plotplease(S2, S4, D4P10U, D6P10U, D8P10U)

 

NULL

NULL

Title := " Effect on Brake Thermal Efficiency for 10 % Cooled EGR"; Caption := "Fig.4.4 Brake Power Vs Brake Thermal Efficiency  for 10% Cooled EGR"; Legend := ["S2 ", "S4 ", "D4P10C", "D6P10C", "D8P10C"]

D4P10C := PolynomialInterpolation(xdata, D4P10C_BTE_ydata, x, form = Lagrange)

13.57196947*(x-3.534)*(x-4.32)-42.33681964*(x-2.356)*(x-4.32)+26.36515809*(x-2.356)*(x-3.534)

(71)

````

``

D6P10C := PolynomialInterpolation(xdata, D6P10C_BTE_ydata, x, form = Lagrange)

13.70163797*(x-3.534)*(x-4.32)-42.66082591*(x-2.356)*(x-4.32)+26.62427512*(x-2.356)*(x-3.534)

(72)

D8P10C := PolynomialInterpolation(xdata, D8P10C_BTE_ydata, x, form = Lagrange)

13.44230098*(x-3.534)*(x-4.32)-41.79680919*(x-2.356)*(x-4.32)+26.04126180*(x-2.356)*(x-3.534)

(73)

NULLNULL

NULLNULL

plotplease(S2, S4, D4P5C, D6P5C, D8P5C)

 

NULL

``

NULL

NULL

Title := " Effect on Brake Thermal Efficiency for 15 % Uncooled EGR"; Caption := "Fig.4.5 Brake Power Vs Brake Thermal Efficiency  for 15 % Uncooled EGR"; Legend := ["S2 ", "S4 ", "D4P15U", "D6P15U", "D8P15U"]

D4P15U := PolynomialInterpolation(xdata, D4P15U_BTE_ydata, x, form = Lagrange)

12.40495299*(x-3.534)*(x-4.32)-38.23274019*(x-2.356)*(x-4.32)+23.83876702*(x-2.356)*(x-3.534)

(74)

D6P15U := PolynomialInterpolation(xdata, D6P5C_BTE_ydata, x, form = Lagrange)

12.96684982*(x-3.534)*(x-4.32)-38.88075273*(x-2.356)*(x-4.32)+24.29222182*(x-2.356)*(x-3.534)

(75)

D8P15U := PolynomialInterpolation(xdata, D8P15U_BTE_ydata, x, form = Lagrange)

12.18883883*(x-3.534)*(x-4.32)-37.69272973*(x-2.356)*(x-4.32)+23.45009147*(x-2.356)*(x-3.534)

(76)

 

````

``NULL

plotplease(S2, S4, D4P15U, D6P15U, D8P15U)

 

NULL

NULL

Title := " Effect on Brake Thermal Efficiency for 15 % Cooled EGR"; Caption := "Fig.4.6 Brake Power Vs Brake Thermal Efficiency  for 15 % Cooled EGR"; Legend := ["S2 ", "S4 ", "D4P15C", "D6P15C", "D8P15C"]

D4P15C := PolynomialInterpolation(xdata, D4P15C_BTE_ydata, x, form = Lagrange)

13.26940965*(x-3.534)*(x-4.32)-40.60878619*(x-2.356)*(x-4.32)+25.32868996*(x-2.356)*(x-3.534)

(77)

NULLNULL

NULL

D6P15C := PolynomialInterpolation(xdata, D6P15C_BTE_ydata, x, form = Lagrange)

13.22618681*(x-3.534)*(x-4.32)-42.66082591*(x-2.356)*(x-4.32)+25.32868996*(x-2.356)*(x-3.534)

(78)

D8P15C := PolynomialInterpolation(xdata, D8P15C_BTE_ydata, x, form = Lagrange)

13.01007265*(x-3.534)*(x-4.32)-40.28477991*(x-2.356)*(x-4.32)+25.13435218*(x-2.356)*(x-3.534)

(79)

``````

plotplease(S2, S4, D4P15C, D6P15C, D8P15C)

 

``

``

NULL

NULL

NULL

Title := " Effect on Brake Thermal Efficiency for varying manifold orifice "; Caption := "Fig.4.7 Brake Power Vs Brake Thermal Efficiency  for 10 mm orifice and Cooled EGR"; Legend := ["S2 ", "S4 ", "D6P5C", "D6P10C", "D8P15C"]

plotplease(S2, S4, D6P5C, D6P10C, D8P15C)

 

NULL

NULL

NULL

``

xVal := [d[1][2], d[1][3], d[1][4], d[1][5], d[1][6], d[1][7]]

xVal

[2.356, 2.749, 3.142, 3.534, 3.927, 4.32]

(80)

NULL

S2_BTE_ydataNew := [ObtainyValues(S2, xVal)]

[26.8, 29.3, 31.3, 32.7, 33.7, 34.1]

(81)

Export(S2_BTE_ydataNew, "C:/Users/dell/Desktop/RoughExperimentalData.xlsx", "NewBTE", "B2")

NULL

NULL

S4_BTE_ydataNew := [ObtainyValues(S4, xVal)]

[26.8, 29.3, 31.3, 32.7, 33.7, 34.1]

(82)

Export(S4_BTE_ydataNew, "C:/Users/dell/Desktop/RoughExperimentalData.xlsx", "NewBTE", "B3")

NULL

D4P5U_BTE_ydataNew := [ObtainyValues(D4P5U, xVal)]

[26.8, 29.3, 31.3, 32.7, 33.7, 34.1]

(83)

Export(D4P5U_BTE_ydataNew, "C:/Users/dell/Desktop/RoughExperimentalData.xlsx", "NewBTE", "B4")

NULL

NULL

D6P5U_BTE_ydataNew := [ObtainyValues(D6P5U, xVal)]

[26.8, 29.3, 31.3, 32.7, 33.7, 34.1]

(84)

Export(D6P5U_BTE_ydataNew, "C:/Users/dell/Desktop/RoughExperimentalData.xlsx", "NewBTE", "B5")

NULL

D8P5U_BTE_ydataNew := [ObtainyValues(D8P5U, xVal)]

[26.8, 29.3, 31.3, 32.7, 33.7, 34.1]

(85)

Export(D8P5U_BTE_ydataNew, "C:/Users/dell/Desktop/RoughExperimentalData.xlsx", "NewBTE", "B6")

NULL

NULL

D4P5C_BTE_ydataNew := [ObtainyValues(D4P5C, xVal)]

[26.8, 29.3, 31.3, 32.7, 33.7, 34.1]

(86)

Export(D4P5C_BTE_ydataNew, "C:/Users/dell/Desktop/RoughExperimentalData.xlsx", "NewBTE", "B7")

NULL

D6P5C_BTE_ydataNew := [ObtainyValues(D6P5C, xVal)]

[26.8, 29.3, 31.3, 32.7, 33.7, 34.1]

(87)

Export(D6P5C_BTE_ydataNew, "C:/Users/dell/Desktop/RoughExperimentalData.xlsx", "NewBTE", "B8")

NULL

D8P5C_BTE_ydataNew := [ObtainyValues(D8P5C, xVal)]

[26.8, 29.3, 31.3, 32.7, 33.7, 34.1]

(88)

Export(D8P4C*_BTE_ydataNew, "C:/Users/dell/Desktop/RoughExperimentalData.xlsx", "NewBTE", "B9")

NULL

NULL

D4P10U_BTE_ydataNew := [ObtainyValues(D4P10U, xVal)]

[26.8, 29.3, 31.3, 32.7, 33.7, 34.1]

(89)

Export(D4P10U_BTE_ydataNew, "C:/Users/dell/Desktop/RoughExperimentalData.xlsx", "NewBTE", "B10")

NULL

D6P10U_BTE_ydataNew := [ObtainyValues(D6P10U, xVal)]

[26.8, 29.3, 31.3, 32.7, 33.7, 34.1]

(90)

Export(D6P10U_BTE_ydataNew, "C:/Users/dell/Desktop/RoughExperimentalData.xlsx", "NewBTE", "B11")

NULL

D8P10U_BTE_ydataNew := [ObtainyValues(D8P10U, xVal)]

[26.8, 29.3, 31.3, 32.7, 33.7, 34.1]

(91)

Export(D8P10U_BTE_ydataNew, "C:/Users/dell/Desktop/RoughExperimentalData.xlsx", "NewBTE", "B12")

NULL

NULL

D4P10C_BTE_ydataNew := [ObtainyValues(D4P10C, xVal)]

[26.8, 29.3, 31.3, 32.7, 33.7, 34.1]

(92)

Export(D4P10C_BTE_ydataNew, "C:/Users/dell/Desktop/RoughExperimentalData.xlsx", "NewBTE", "B13")

NULL

D6P10C_BTE_ydataNew := [ObtainyValues(D6P10C, xVal)]

[26.8, 29.3, 31.3, 32.7, 33.7, 34.1]

(93)

Export(D6P10C_BTE_ydataNew, "C:/Users/dell/Desktop/RoughExperimentalData.xlsx", "NewBTE", "B14")

NULL

D8P10C_BTE_ydataNew := [ObtainyValues(D8P10C, xVal)]

[26.8, 29.3, 31.3, 32.7, 33.7, 34.1]

(94)

Export(D8P10C_BTE_ydataNew, "C:/Users/dell/Desktop/RoughExperimentalData.xlsx", "NewBTE", "B15")

NULL

NULL

D4P15U_BTE_ydataNew := [ObtainyValues(D4P15U, xVal)]

[26.8, 29.3, 31.3, 32.7, 33.7, 34.1]

(95)

Export(D4P15U_BTE_ydataNew, "C:/Users/dell/Desktop/RoughExperimentalData.xlsx", "NewBTE", "B16")

NULL

D6P15U_BTE_ydataNew := [ObtainyValues(D6P15U, xVal)]

[26.8, 29.3, 31.3, 32.7, 33.7, 34.1]

(96)

Export(D6P15U_BTE_ydataNew, "C:/Users/dell/Desktop/RoughExperimentalData.xlsx", "NewBTE", "B17")

NULL

D8P15U_BTE_ydataNew := [ObtainyValues(D8P15U, xVal)]

[26.8, 29.3, 31.3, 32.7, 33.7, 34.1]

(97)

Export(D8P15U_BTE_ydataNew, "C:/Users/dell/Desktop/RoughExperimentalData.xlsx", "NewBTE", "B18")

NULL

NULL

D4P15C_BTE_ydataNew := [ObtainyValues(D4P15C, xVal)]

[26.8, 29.3, 31.3, 32.7, 33.7, 34.1]

(98)

Export(D4P15C_BTE_ydataNew, "C:/Users/dell/Desktop/RoughExperimentalData.xlsx", "NewBTE", "B19")

NULL

D6P15C_BTE_ydataNew := [ObtainyValues(D6P15C, xVal)]

[26.8, 29.3, 31.3, 32.7, 33.7, 34.1]

(99)

Export(D6P15U_BTE_ydataNew, "C:/Users/dell/Desktop/RoughExperimentalData.xlsx", "NewBTE", "B20")

NULL

D8P15C_BTE_ydataNew := [ObtainyValues(D8P15C, xVal)]

[26.8, 29.3, 31.3, 32.7, 33.7, 34.1]

(100)

Export(D8P15C_BTE_ydataNew, "C:/Users/dell/Desktop/RoughExperimentalData.xlsx", "NewBTE", "B21")

NULL

NULL

NULL


 

Download Request_Plot_from_ProfKitonum.mw

 

@Kitonum 

Dear Kitonum,

BP is brake power in kW, D4 EFF is efficiency value for model with 4 mm Dia orifice for a particular  say 5%EGR (P5) and with Cooling (P5C) or without cooling (P5U).

A curve needs to be obtained for each model for each parameter (Efficiency here).

I enclose the doc new one which works, but feel needs improvement.

Regarding the errors, I found out of the many,  two of them made here were

d[i] has in its first pair, strings [["BrakePower", "S2"],[x1,y1]...]. Hence an error

M1 could not be assigned because import file was open without saving in my PC. I closed it and then it was fine.

                              -15                    
          -2.99760216648792 10    + 1.00000000000000 x
                                  -16  2
             + 3.88578058618805 10    x
The above answer is incorrect. For S2 one equation and S4 another equation are required.
d[2][1];PleasePlot_Doubt_(1).mw
 

restart; with(ExcelTools)

D6EFF := [20, 25, 23, 29]

[20, 25, 23, 29]

(1)

D6EFFP := evalf[3](CurveFitting:-LeastSquares(BP, D4EFF, v, curve = a*v^2+b*v+c))

Error, (in CurveFitting:-LeastSquares) data points not in recognizable format

 

 

M1 := Import("C:/Users/dell/Desktop/ExperimentalData.xlsx", 2)

Matrix(%id = 18446746264177821774)

(2)

M1[1, 11]

"D6P10U"

(3)

M1[1, 10]

"D6P5U"

(4)

M1[2, 15]

.267

(5)

D6EFFP := evalf[3](CurveFitting:-LeastSquares(BP, D4EFF, v, curve = a*v^2+b*v+c))

Error, (in CurveFitting:-LeastSquares) data points not in recognizable format

 

for i to 21 do N[i] := NULL; for j to 7 do N[i] := N[i], M1[j, i] end do; d[i] := NULL; for j to 7 do d[i] := d[i], [N[1][j], N[i][j]] end do end do; y := a*x^2+b*x+c; for i from 2 to 21 do d[i] := [d[i]]; c[i] := CurveFitting[LeastSquares](d[i], x, curve = y) end do

Error, (in CurveFitting:-LeastSquares) data points not in recognizable format

 

CurveFitting[LeastSquares]([[2.356, .303], [2.749, .271], [3.142, .256], [3.534, .249], [3.927, .244], [4.32, .241]], x, curve = y)

HFloat(0.5862119576375505)-HFloat(0.17186946196596695)*x+HFloat(0.02140719191937303)*x^2

(6)

``

A := Matrix([[["BrakePower", "BrakePower"], [2.356, 2.356], [2.749, 2.749], [3.142, 3.142], [3.534, 3.534], [3.927, 3.927], [4.32, 4.32]], [["BrakePower", "S2"], [2.356, .303], [2.749, .271], [3.142, .256], [3.534, .249], [3.927, .244], [4.32, .241]], [["BrakePower", "S4"], [2.356, .256], [2.749, .225], [3.142, .211], [3.534, .205], [3.927, .2], [4.32, .197]]]); y := a*x^2+b*x+c; CurveFitting[LeastSquares](convert(A[1, 2 .. -1], list), x, curve = y)

-HFloat(2.9976021664879227e-15)+HFloat(0.9999999999999998)*x+HFloat(3.885780586188048e-16)*x^2

(7)

``

The above answer is incorrect. For S2 one equation and S4 another equation are required.

d[2][1]

["BrakePower", "S2"]

(8)

``


Download PleasePlot_Doubt_(1).mw

Thanks.


 

 

Comparison of Performance of Two-Stroke Engine with Four-Stroke Engine

 Brake Power Vs Brake EfficiencyNULL

E2BD1P5 := [[1000, 20], [2000, 21], [3000, 32], [4000, 23], [5000, 23]]

``

Equn1 := CurveFitting[LeastSquares](E2BD1P5, x, curve = y)

52/5+(179/17500)*x-(11/7000000)*x^2

(1)

data2 := [[1000, 25], [2000, 26], [3000, 33], [4000, 25], [5000, 24]]

Equn2 := CurveFitting[LeastSquares](data2, x, curve = y)

18+(549/70000)*x-(19/14000000)*x^2

(2)

data3 := [[1000, 26], [2000, 27], [3000, 34], [4000, 26], [5000, 25]]

Equn3 := CurveFitting[LeastSquares](data3, x, curve = y)

19+(549/70000)*x-(19/14000000)*x^2

(3)

data4 := [[1000, 27], [2000, 28], [3000, 35], [4000, 27], [5000, 25]]

Equn4 := CurveFitting[LeastSquares](data4, x, curve = y)

97/5+(17/2000)*x-(3/2000000)*x^2

(4)

``

y := a*x^2+b*x+c

a*x^2+b*x+c

(5)

``

Equn1

52/5+(179/17500)*x-(11/7000000)*x^2

(6)

NULL

NULL

NULL

NULL

 

 

``

``

 

Comparison of Performance of Two-Stroke Engine with Four-Stroke Engine

 Brake Power Vs Brake Efficiency``

plot([Equn1, Equn2, Equn3, Equn4], x = 1000 .. 5000, color = [red, blue, green, gold], size = [800, 500], scaling = unconstrained, discont)

 

NULL

NULL

NULL

 

 

NULL

plot([18+(549/70000)*x-(19/14000000)*x^2, 19+(549/70000)*x-(19/14000000)*x^2, 52/5+(179/17500)*x-(11/7000000)*x^2, 97/5+(17/2000)*x-(3/2000000)*x^2], x = 1000 .. 5000, color = [red, blue, green, gold], size = [800, 500], scaling = unconstrained, discont)

 

NULL


 

Download CurveFitting_BrakeEfficiency.mwCurveFitting_BrakeEfficiency.mw
 

 

Comparison of Performance of Two-Stroke Engine with Four-Stroke Engine

 Brake Power Vs Brake EfficiencyNULL

E2BD1P5 := [[1000, 20], [2000, 21], [3000, 32], [4000, 23], [5000, 23]]

``

Equn1 := CurveFitting[LeastSquares](E2BD1P5, x, curve = y)

52/5+(179/17500)*x-(11/7000000)*x^2

(1)

data2 := [[1000, 25], [2000, 26], [3000, 33], [4000, 25], [5000, 24]]

Equn2 := CurveFitting[LeastSquares](data2, x, curve = y)

18+(549/70000)*x-(19/14000000)*x^2

(2)

data3 := [[1000, 26], [2000, 27], [3000, 34], [4000, 26], [5000, 25]]

Equn3 := CurveFitting[LeastSquares](data3, x, curve = y)

19+(549/70000)*x-(19/14000000)*x^2

(3)

data4 := [[1000, 27], [2000, 28], [3000, 35], [4000, 27], [5000, 25]]

Equn4 := CurveFitting[LeastSquares](data4, x, curve = y)

97/5+(17/2000)*x-(3/2000000)*x^2

(4)

``

y := a*x^2+b*x+c

a*x^2+b*x+c

(5)

``

Equn1

52/5+(179/17500)*x-(11/7000000)*x^2

(6)

NULL

NULL

NULL

NULL

 

 

``

``

 

Comparison of Performance of Two-Stroke Engine with Four-Stroke Engine

 Brake Power Vs Brake Efficiency``

plot([Equn1, Equn2, Equn3, Equn4], x = 1000 .. 5000, color = [red, blue, green, gold], size = [800, 500], scaling = unconstrained, discont)

 

NULL

NULL

NULL

 

 

NULL

plot([18+(549/70000)*x-(19/14000000)*x^2, 19+(549/70000)*x-(19/14000000)*x^2, 52/5+(179/17500)*x-(11/7000000)*x^2, 97/5+(17/2000)*x-(3/2000000)*x^2], x = 1000 .. 5000, color = [red, blue, green, gold], size = [800, 500], scaling = unconstrained, discont)

 

NULL


 

Download CurveFitting_BrakeEfficiency.mw
The following recommended code with matrix A defined, gives me a single equation whereas my antincipation was for >1. I cld not workout the way it worked. Please do find the mistakes if possible. Thanks.

restart; with(ExcelTools)

D6EFF := [20, 25, 23, 29]

[20, 25, 23, 29]

(1)

D6EFFP := evalf[3](CurveFitting:-LeastSquares(BP, D4EFF, v, curve = a*v^2+b*v+c))

Error, (in CurveFitting:-LeastSquares) data points not in recognizable format

 

 

M1 := Import("C:/Users/dell/Desktop/ExperimentalData.xlsx", 2)

Matrix(%id = 18446745901927778382)

(2)

M1[1, 11]

"D6P10U"

(3)

M1[1, 10]

"D6P5U"

(4)

M1[2, 15]

.267

(5)

``

for i to 21 do N[i] := NULL; for j to 7 do N[i] := N[i], M1[j, i] end do; d[i] := NULL; for j to 7 do d[i] := d[i], [N[1][j], N[i][j]] end do end do; y := a*x^2+b*x+c; for i from 2 to 21 do d[i] := [d[i]]; c[i] := CurveFitting[LeastSquares](d[i], x, curve = y) end do

Error, (in CurveFitting:-LeastSquares) data points not in recognizable format

 

d[1]

["BrakePower", "BrakePower"], [2.356, 2.356], [2.749, 2.749], [3.142, 3.142], [3.534, 3.534], [3.927, 3.927], [4.32, 4.32]

(6)

d[2]

[["BrakePower", "S2"], [2.356, .303], [2.749, .271], [3.142, .256], [3.534, .249], [3.927, .244], [4.32, .241]]

(7)

d[3]

["BrakePower", "S4"], [2.356, .256], [2.749, .225], [3.142, .211], [3.534, .205], [3.927, .2], [4.32, .197]

(8)

``

A := Matrix([[["BrakePower", "BrakePower"], [2.356, 2.356], [2.749, 2.749], [3.142, 3.142], [3.534, 3.534], [3.927, 3.927], [4.32, 4.32]], [["BrakePower", "S2"], [2.356, .303], [2.749, .271], [3.142, .256], [3.534, .249], [3.927, .244], [4.32, .241]], [["BrakePower", "S4"], [2.356, .256], [2.749, .225], [3.142, .211], [3.534, .205], [3.927, .2], [4.32, .197]]]); y := a*x^2+b*x+c; CurveFitting[LeastSquares](convert(A[1, 2 .. -1], list), x, curve = y)

-HFloat(2.9976021664879227e-15)+HFloat(0.9999999999999998)*x+HFloat(3.885780586188048e-16)*x^2

(9)

``

``


 

Download PleasePlot_Doubt.mw

 

 

@Kitonum 

1 2 3 4 5 6 7 Last Page 1 of 9