Ramakrishnan

182 Reputation

5 Badges

3 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

@tomleslie 

Thank you very much. I was not aware of that assignment till now. Here after, i shall be doubly careful when i see an = sign!

Thanks for spending your valuable time and saving my time as well in quickly removing the error.

Ramakrishnan V

I could get in two methods? Why the error in the first method below? Thanks for answering.

Ramakrishnan V
 

with(Statistics)

D4P5C = 1.9; D6*P5C = 1.7; D8P5C = 3.0; E4P10C = 1.8; D6P10C = 1.5; D8P10C = 1.7; D4P15C = 3.2; D6P15C = 2.2; D8P15C = 3.1

D4P5U = 2.2; D6P5U = 1.9; D8P5U = 3.2; D4P10U = 2.0; D6P10U = 1.7; D8P10U = 1.9; D4P15U = 3.3; D6P15U = 2.3; D8P15U = 3.2

C := Array([D4P5C, D6*P5C, E8*P5C, D4P5C, D6P5C, D8P5C, D4P5C, D6P5C, D8P5C])

Array(%id = 18446746484452843638)

(1)

NULL

rtable_options(C)

datatype = anything, subtype = Array, storage = rectangular, order = Fortran_order

(2)

U := Array([D4P5U, D6P5U, D8P5U, D4P5U, D6P5U, D8P5U, D4P5U, D6P5U, D8P5U])

Array(%id = 18446746484452839782)

(3)

ColumnGraph([C, U], title = "Optimum Performance", legend = ["Cooled", "Uncooled"])

Error, (in Statistics:-ColumnGraph) unable to store 'D4P5C' when datatype=float[8]

 

How do I correct the error above?

Thanks.

Ramakrishnan V

 

with(Statistics); A := Array([1.9, 1.7, 3.0, 1.8, 1.5, 1.7, 3.2, 2.2, 3.1])

Array(%id = 18446746484452836526)

(4)

NULL

NULL

E := Array([2.2, 1.9, 3.2, 2, 1.7, 1.9, 3.3, 2.3, 3.2])

Array(%id = 18446746484452838686)

(5)

ColumnGraph([A, E], title = "Column Graph", legend = ["COL A", "COL B"], offset = 1, distance = .5, width = 2.5)

 

How do I change colour above here?

Thanks for help.

Ramakrishnan V

dataDF := DataFrame( < 1.9, 1.7, 3.0; 1.8, 1.5, 1.7; 3.2, 2.2, 3.1;2.2, 1.9, 3.2; 2, 1.7, 1.9; 3.3, 2.3, 3.2>, 'rows' = [ 'r1','r2','r3','r4','r5','r6'], 'columns' = [ 'c1', 'c2', 'c3'] ):

colorDF := DataFrame( < yellow,green,black; yellow,green,black;yellow,green,black;yellow,green,black; yellow,green,black;yellow,green,blue >, 'rows' = [ 'r1','r2','r3','r4','r5','r6'], 'columns' = [ 'c3', 'c1', 'c2'] ):

ColumnGraph(dataDF, color = colorDF);

 

NULL


 

Download doPlot_3.mw

@Ramakrishnan 

@tomleslie 

Dear Prof., Thank you so much. [4,10,2] is right as you mentioned. I also did not mention that x and y are references and numbers as such. 4 mm diameter(x) with 10% recirculation(y) for cooled exhausr recirculation case(A) is referred to as case A [4,10, z] in which case please recommend a suitable command for (column) chart which is easy to visualise given a proper scale and width of each column.

Is it ok if i assume COLA [col1 is A 4 5,; col2 is A 4 10; col3 is A 4 15; ]

COLB[col4 is A 6 5,; col5 is A 6 10; col6 is A 6 15;]

COLC [col7 is A 8 5,; col8 is A 8 10; col9 is B 8 15; ]

COLE [col10 is B 4 5,; col11 is B 6 5; col2 is B 8 5;]

COLF [col13 is B 4 10,; col14 is B 6 10; col15 is B 8 10; ]

COLG
 

COLA to COLG are defined as A to G (D omitted)

with(Statistics); A := Array([1.9, 1.7, 3.0])

Array(%id = 18446746509132408942)

(1)

B := Array([1.8, 1.5, 1.7])

Array(%id = 18446746509132410502)

(2)

C := Array([3.2, 2.2, 3.1])

Array(%id = 18446746509132404366)

(3)

E := Array([2.2, 1.9, 3.2])

Array(%id = 18446746509132405686)

(4)

F := Array([2, 17, 1.9])

Array(%id = 18446746509132398950)

(5)

G := Array([3.3, 2.3, 3.2])

Array(%id = 18446746509132400150)

(6)

ColumnGraph([A, B, C, E, F, G], title = "Column Graph", legend = ["5%C-A", "10%C-B", "15%C-C", "5%U-E", "10%U-F", "15%U-G"], offset = 1, distance = 1, width = 1)

 

The chart i want is different in 6 groups and not 3 groups. Colour also i need to change. Please do help me with right commands. Thanks.

Ramakrishnan v

 

Effect of A and B on z values

NULL

Cooled Recirculation

``

Uncooled Recirculation

x                y

5% EGR

10% EGR

15% EGR

5% EGR

10% EGR

15% EGR

4 mm

1.9

1.8

3.2

2.2

1.9

3.2

6 mm

1.7

1.5

2.2

2.0

1.7

1.9

8 mm

30

1.7

3.1``

3.3

2.3

3.2

NULL

NULL

Table 1: Effect of Modified Parameters on z output

 

Dear Prof.,
Thank you for your answer given below. It helped me understand simple ideas. I want a suitable plot for the above data. I have given the values as [ x  y  z] for z values to be plotted for the two cases, A and B in the same graph to compare and get the best option x ,    y and A or B .

Mathematically an x vs y vs z plot. Any bar or similar plot is what seems suitable to me.

I could not locate any help for plotting 3D data values in help page.

 

Any suggestions and solution please.

Thanks.

Ramakrishnan V

NULL

with(plots):
Avals:= [ [ 4, 5, 1.9],  [ 6, 5, 1.7],  [ 8, 5, 3.0],
          [ 4, 10, 1.8], [ 6, 10, 1.5], [ 8, 10, 1.7],
          [ 4, 15, 3.2], [ 6, 15, 2.2], [ 8, 15, 3.1]
        ]:
Bvals:= [ [ 4, 5, 2.2],  [ 6, 5, 1.9],  [ 8, 5, 3.2],
          [ 4, 5, 2.0],  [ 6, 10, 1.7], [ 8, 10, 1.9],
          [ 4, 15, 3.3], [ 6, 15, 2.3], [ 8, 15, 3.2]
        ]:
p1:=pointplot3d(Avals, symbol=sphere, symbolsize=20, color=red):
p2:=pointplot3d(Bvals, symbol=sphere, symbolsize=20, color=blue):
display([p1, p2]);

 

``


 

Download doPlot_1.mw

[col16 is B 4 15,; col7 is B 6 15; col8 is B 8 15;] 

Your answer has given me the way to proceed in a simpler way for the combinations i have. After seein the plot in your doc only, i realised that giving values to x and y is a gross mistake because point plots show scattered points and difficult to notice the corresponding optimum case combination. Thank you again. Ramakrishnan V

@Daniel Skoog 

Dear Daniel,

Thank you very much for being very practical in your answers to the doubts raised by me long ago. In fact I was about to lose hope of getting help, when this response from you has rekindled my energy to continue working with plot components more and more. Very useful answer it is for me.

Cheers. Ramakrishnan V


 

The following supporting points may be considered.

restart

sqrt(x)=-I can be solved as follows;Hence coulditbe(sqrt(x)=-I)  is true as per Maple.

sqrt(x) = -I

x := (-I)^2

-1

(1)

Dividing by zero is undefined; Hence solve(1/x=0,x) is not answered by Maple.

However as an approximation, 0.00001 is zero.Hence coulditbe(1/x)=0) is true as per Maple.

solve(1/x1 = 0.1e-7, x1)"(->)"0.10000e6

1/1000000

1/1000000

(2)

"(->)"

0.10000e-5

(3)

solve(sqrt(x2) = -I, x2)``

Also, Maple keeps silence for above statement, because (-I)^2 is not defined.


 

Download coulditbe_points.mw

coulditbe_points.mw

@_Maxim_ 

@Markiyan Hirnyk 

I have not executed the doc after changing the < sign and hence the mistake. I am sorry. Maple gives the same correct answer always.


 

restart

coulditbe(3*I = 0)

false

(1)

coulditbe(3*I > 0)

false

(2)

coulditbe(3*I < 0)

false

(3)

coulditbe(-2+3*I = 0)

false

(4)

coulditbe(abs(I) > 0)

true

(5)

``

coulditbe(2+3*I < 0)

false

(6)

NULL

NULL

What is your opinion?

My opinion from the above is : When a is real and b is complex, a and b can not be compared.

Like number of goats and number of lions  can not be added to give an answer in number of lions alone or number of goats alone!!
Riemann's function Zeta is a function of Complex number

 

solve(abs(Zeta(s+2*I)) = 0, s)

-2*I+RootOf(Zeta(_Z))

(7)

"(->)"

-2.0000-2.*I

(8)

``

solve(Zeta(s+2*I) = 0, s)

-2*I+RootOf(Zeta(_Z))

(9)

"(->)"

-2.0000-2.*I

(10)

What does the above results convey??

Am I correct if i state that 's' should be a complex number only and not a real number.


 

Download s_is_complex.mw

"quod erat demonstrandum" i.e. "Proof neads demonstration" is absolutely right with Riemann's zeta as a function of complex numbers..

In my humble opinion, we can not answer if some one asks us, "what is 3a compared to 4b?", unless we know about a and b!!

In the assumption we have made here, s > 0 or s < 1/2, we compare s as only real number where as s is a complex number involving imaginary ones about which we donot know. I can not say (-1)^0.5 > 0. Not even 10((-1)^0.5) > 0.

I am just a novice with high regards for Riemann and hence commented. 

It seems from the attached doc, s may be a complex number only.

Thanks. Cheers.


 

restart; assume(s > 0, s < 1/2, t > 0); coulditbe(abs(Zeta(s+I*t)) = 0)

true

(1)

coulditbe(Zeta(s+I*t) = 0)

FAIL

(2)

solve(Zeta(s+I*t) = 0, s)

-I*t+RootOf(Zeta(_Z))

(3)

solve(abs(Zeta(s+I*t)) = 0, s)

-I*t+RootOf(Zeta(_Z))

(4)

``


 

Download what_is_s.mw

what_is_s.mw

@Carl Love 

Thank you very much for letting me know about the print levels and careful programming needs. It is great. Though i have undisputed confidence in Maple, in this particular case, I was little shaken by Maple. Your response has taught me that Maple does that with a purpose and I need to learn a lot more interesting facts about Maple! Cheers. Ramakrishnan V

@tomleslie 

Yes. Copy paste (No cut paste) may be the culprit. Also from your document (with subscripted like data 1,2 variables in place of indexed variables like data[1][2] in my doc), i suspect i have faulted in atomic variable option selection (I donot know much about it and typesetting). I understand it is my problem only tofind out the culprit text by comparing the original and this one. Unfortunately I am more worried about the old original doc (and the time and tension it generates i cannot stand at my age). Hence i will do by retyping the codes all and check. Thanks for the trouble taken by you and CarlLove.

Cheers.

Another excellent solution I got from Dr.Robert, to do it in single loop,
 

restart

R1 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 2.36; BTE := .271; sfc := .308; Data[1, 1] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]
NULL

R2 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 2.75; BTE := .298; sfc := .282; Data[1, 2] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R3 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 3.14; BTE := .318; sfc := .264; Data[1, 3] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

``

R1 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 2.37; BTE := .323; sfc := .258; Data[2, 1] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R2 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 2.76; BTE := .350; sfc := .239; Data[2, 2] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R3 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 3.15; BTE := .369; sfc := .229; Data[2, 3] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

``

Try doing it the following way:

NULL

NULL

for i to 2 do N[i] := seq(Data[i, k][4], k = 1 .. 3) end do

2.37, 2.76, 3.15

(1)

``

N[1] = 2.36, 2.75, 3.14 

N[2] = 2.37, 2.76, 3.15 

 

NULL

``


 

Download ExcellentAnswer_A_ReactantValues.mw

ExcellentAnswer_A_ReactantValues.mw

is attached.

 

 

restart

R1 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 2.36; BTE := .271; sfc := .308; Data[1, 1] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]
NULL

R2 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 2.75; BTE := .298; sfc := .282; Data[1, 2] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R3 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 3.14; BTE := .318; sfc := .264; Data[1, 3] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

``

R1 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 2.36; BTE := .323; sfc := .258; Data[2, 1] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R2 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 2.75; BTE := .350; sfc := .239; Data[2, 2] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R3 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 3.14; BTE := .369; sfc := .229; Data[2, 3] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

``

``

``

for i to 2 do N[i] := NULL; for j to 3 do N[i] := N[i], Data[i, j][4] end do end do

Error, `,` unexpected

 

N[1]

2.36, 2.75, 3.14

(1)

N[2]

2.36, 2.75, 3.14

(2)


If I change NULL to [NULL], the Error, `,` unexpected does not show, but N[1] and N[2] has fisrt value as empty cell. that is [], 2.36, 2.75, 3.14

I want the error to be removed and output as it is 2.36, 2.75, 3.14 and not as
"[],2.36,2.75,3.14  Can you help please"?""


 

Download Doubt_A_ReactantValues.mw

@Carl Love 

ok Thanks

 


 

eq1 := 3*x^2+x+2

HERE BRING THE MOUSE and PRESS CTRL+DELETE buttons.

if diff(eq1(x), x) = 6*x+1 then print(yes) else print(no) end if

yes

(1)

"Another command Prompt(>). HERE BRING THE MOUSE and PRESS CTRL+DELETE buttons."

eq1 := 3*x^2+x+2


 

Download where.mw

where.mw

an empty cell. Where does it show? Thannks.

 

If it is command pronpts with no commands in the line, then what CarlLove is correct. I used to cut the next command lines and paste there!!
 

 

@Carl Love 

I hv attached the doc and copied from edit menu the startup code in the worksheet. Hope this helps to you to guide me. However module output is not used by me in this doc. The first loop can be removed to prevent module function to perform.

If i use [NULL], then the error goes, but [ ] is assed in the list as first value.

Thanks.Doubt_A_ReactantValues.mw
 

Data made for Data[i,j] [k] where i =1,2; j=1..8. Each Data has 6 values. k = 1..6

For each data i got an output list of 6 values using a module;

I made a for do statement which performs but gives an error "unexpected ','.

Can any onr help to find my mistake. Thanks.

 

restart

R1 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 2.36; BTE := .271; sfc := .308; Data[1, 1] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]
``

R2 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 2.75; BTE := .298; sfc := .282; Data[1, 2] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R3 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 3.14; BTE := .318; sfc := .264; Data[1, 3] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R4 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 3.53; BTE := .330; sfc := .253; Data[1, 4] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R5 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 3.88; BTE := .334; sfc := .249; Data[1, 5] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R6 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 3.93; BTE := .334; sfc := .249; Data[1, 6] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R7 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 4.32; BTE := .330; sfc := .253; Data[1, 7] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R8 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 4.71; BTE := .318; sfc := .264; Data[1, 8] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

``

R1 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 2.36; BTE := .323; sfc := .258; Data[2, 1] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R2 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 2.75; BTE := .350; sfc := .239; Data[2, 2] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R3 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 3.14; BTE := .369; sfc := .229; Data[2, 3] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R4 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 3.53; BTE := .380; sfc := .219; Data[2, 4] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R5 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 3.88; BTE := .383; sfc := .217; Data[2, 5] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R6 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 3.88; BTE := .383; sfc := .217; Data[2, 6] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R7 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 4.32; BTE := .378; sfc := .221; Data[2, 7] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R8 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 4.71; BTE := .365; sfc := .229; Data[2, 8] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

 

NULL

Data[1, 8][4]

4.71

(1)

NULL

NULL

for i to 2 do for j to 8 do y[i, j] := action1:-Mproc(Data[i, j]); print(Data[i, j], y[i, j]) end do end do

["4S", 3.88, .383, 4.71, .365, .229], ["4S", .4311313490, 0.5411807293e-1, 0.3357509744e-1, .4235561571, 0.6183000001e-1]

(2)

``

N1 := NULL; for j to 8 do N1 := N1, Data[1, j][4] end do; print(N1)

2.36, 2.75, 3.14, 3.53, 3.88, 3.93, 4.32, 4.71

(3)

for i to 2 do N[i] := NULL; for j to 8 do N[i] := N[i], Data[i, j][4] end do end do; print(N[2])

Error, `,` unexpected

 

N[2]

2.36, 2.75, 3.14, 3.53, 3.88, 3.88, 4.32, 4.71

(4)

N[1]

2.36, 2.75, 3.14, 3.53, 3.88, 3.93, 4.32, 4.71

(5)

with(MathematicalFunctions); action1 := module () export Mproc, y;  Mproc := proc (Data) R7 := Data[1]; BP__ref := Data[2]; BTE__optimum := Data[3]; BP := Data[4]; BTE := Data[5]; sfc := Data[6]; sfcmoles := (1/114)*sfc; ea := .1; c1 := .1; c2 := .2; n__f := sfcmoles; `n__air,act` := 12.5*n__f*(1+ea)*sfcmoles/.21; f__ncg := combine(piecewise(BTE < .5, 1-2*BTE, .5 <= BTE, BTE)); f__cg := 1-f__ncg; f__nox := combine(piecewise(BP < BP__ref, c1*BP/BP__ref, BP__ref < BP, c1*BP/BP__ref)); f__co := combine(piecewise(BP < BP__ref, c2*BP/BP__ref, BP__ref < BP, c2*BP__ref/BP)); k__o2 := 12.5; k__co := 8; `n__o2,st` := n__f*k__o2; `n__air,st` := `n__o2,st`/.21; f__ea := ea; `n__air,act` := `n__o2,st`*(1+f__ea)/.21; n__7 := f__ncg*n__f; n__N2 := .79*`n__air,act`; n__O2 := .21*`n__air,act`; n__2 := n__f*f__cg*f__co*k__co; n__1 := 8*n__f-n__2-8*n__7; n__3 := 9*n__f-9*n__7; n__5 := f__cg*f__nox*n__N2; n__4 := (1/2)*.21*2*`n__air,act`-n__1-(1/2)*n__2-(1/2)*n__3-n__5; n__6 := (1/2)*.79*2*`n__air,act`-(1/2)*n__5; y := [R7, 44*n__1, 28*n__2, 32*n__4, 46*n__5, 114*n__7] end proc end module


 

Download Doubt_A_ReactantValues.mw

 

@Carl Love 

Yes. It works and i enclose the doc... Thanks. 

Ramakrishnan V

 

 

 


 

                                                                                         
with(DocumentTools); for i to 12 do SetProperty("RotaryGauge0", value, 6); print(SetProperty("RotaryGauge1", value, .66*GetProperty("RotaryGauge0", value))); time*[]; 3^100; GetProperty("RotaryGauge0", value); print(SetProperty("RotaryGauge0", value, 4)); print(SetProperty("RotaryGauge1", value, .7*GetProperty("RotaryGauge0", value))); time[real](); 3^100; print(SetProperty("RotaryGauge0", value, 2)); print(SetProperty("RotaryGauge1", value, .5*GetProperty("RotaryGauge0", value))); time[real](); 3^100 end do

(1)

NULL


 

Download varying_input.mw

varying_input.mw

@Ramakrishnan 

 "Say No to dialogue box "Do you wish To save these results"." (This does not affect the performance when opened again.)
Rightclick in Navigator window attach file fig1.bmp
Save as workbook (.maple file).

Saying Yes to save summary results generates the error because semicolons and colons are missing in our doc. After correction, it saves well. I attach pdf of workbook since workbooks are not uploaded.

Fig3.pdf

Fig2.maple

Fig2.pdf

1 2 3 4 5 6 7 Page 1 of 8