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 questions asked by Ramakrishnan

Can any one do the addition of values (in string format) x in textarea0, y in textarea1 and get the mathcontainer result in the text box2.

Thanks

Ramakrishnan V


y := GetProperty(TextArea1,value);
Do(%TextArea2 = Do(%MathContainer0,x=%TextArea0,y=%TextArea1));

``

``

``

NULL


howTogetNumericAnswerinTextArea.mw

Download howTogetNumericAnswerinTextArea.mw

 

Dear users,

Can any one give a correct model statement (if what I have suggested is incorrect) for each one of the following in a module:

module() export eseq;  local lseq;  global gseq;  option optseq; 

 description dseq;  uses usesSequence;  statementSequence   end

My model statements:

export x1, y1;

# x1 and y1 are variables calculated here and sent to main document

 local a, b;  

# a and b are local constants are variables used here inside module only


global z1; 

# z1 is a constant or variable used all over the document can be read from and exported to main document and used in manipulation anywhere in the main document as well as inside the module.

option if x1 = .. else... end; 

 description dseq;

# Statements for self use and understanding the commands during execution

 usesSequence;

uses DocumentTools;

# Packages used in module like DocumentTools, Students Calculus

Statement Sequence

valid executable maple command  1

valid executable maple command  last

 

I want to understand the basic usage of  a module and procedure with a simple document.  

I am also confused over the following.


1) Is there any use of a module with zero statement (as given below) in it?

 module ()

end module

2) What is the major difference between module and procedure?

3) What is in module that is not possible in procedure?
I believe that procedure is like a function [for call from script(internally or eternally) or command window] in MATLAB and subroutine in FORTRAN or BASIC etc. What is module like in other programme siftwares?

Thanks for helping.

Ramakrishnan V


 

How do we use the command convert(expression, number format) in the conversion of number input in a textarea?radianToDegree.mw
 

``

``

 

``

``

``

``

 

 

 

I want conversion from string to float and evaluate radian to degree and show it in textareaDegree.

I am unable to do the operation. 6 radian = 6x180/2 (pi) degrees must be shown degree textbox.

Please help.

Thanks.

Ramki

``

``


 

Download radianToDegree.mw

 


The command L2(1,2) etc (statements 5 to 8) all are considered as valid and gives the complete list as the answer. Can anyone interpret the behaviour and logic behind the maple answers?

s := [1], [2]

[1], [2]

(1)

L2 := [s]

[[1], [2]]

(2)

type(L2, listlist)

true

(3)

L2__1

L2__1

(4)

"Following commands  give the list L2, which in my opinion is wrong."

L2(1)

[[1], [2]]

(5)

L2(1, 1)

[[1], [2]]

(6)

L2(1, 2)

[[1], [2]]

(7)

L2(2, 2)

[[1], [2]]

(8)

``

L2[2]

[2]

(9)

L2[1][2]

Error, invalid subscript selector

 

``


 

Download Doubt1.mw

Pl. help me remove the equation labels or hide the equation labels in my doc enclosed. What should i do to prevent equation labels from forming in my document. Please refer last two rows in the table below from the document.

Thanks for helping.Ramakrishnan V
 

restart

Conversion from ppm to % vol is 1ppm = 0.0001 %

Conversion from % vol to ppm is % = 10000*ppm

Avagadro's law between mass and volume is

"22.4 nm^(3)=1 kg mol; 22.4 lit = 1 g mol; at  101.325 kPa*(normal pressure) and (273+C ) K;"

ppm = 0.8205e-1*T*mg/(M*nm^3); mg/nm^3 = M*ppm/(0.8205e-1*T)

where T is abs temperature and M is molecular weight;

M/(0.08205T)]*ppm*((A/F)*EA+1) /ρex; Emission is mg/kg fuel

If SFC is x g/kWhr; then Mass flow of exhaust is  (x/1000)*[M/(0.08205T)]*ppm*((A/F)*EA+1) /ρex; Emission is mg/kWhr

If the distance covered per liter is DCL km/liter, then (SFC/1000)*(DCL)/`ρ__f`  is distance covered in km/kWhrNULL

[kg*km/(kWh*liter)*(liter/kg) = km/kWh]

1 g/cc = 1 kg/lit; 1kg/m3 = 1 g/lit; Fuel density`ρ__f`  is 0.77 kg/litNULL

Emission in mg/km = 0.77*Emission is mg/kg fuel/(km/liter fuel)

[(kg/liter*(mg/kg))*km/liter = mg/km]

SFC is in g/kWhr  

Measured emission is  E in ppm  ``

Excess Air percentage is EA in per unit point

Molecular Weight of pollutant is M g/mol

Molecular weight of air = .21*32+.79*28 = 28.84 g/mol

 

SFC

       SFC := 200 g/kWh

`ρ__f`

rho__f

(1)

        `ρ__f` := .77   kg/liter

DCL

   DCL := 50    km/liter fuel

A/F

AFR := 14.5``

EA

EA := .1NULL

T__exh

T__exh

(2)

   T__exh := 450     K

`ρ__ex`

rho__ex

(3)

      `ρ__ex` := .457 kg/m3   

 

c := (AFR*EA+1)/`ρ__ex` = 5.361050328 

NULL

CO

CO2

HC

NO2

O2

N2

Air

M [g/mol]

M__co := 28

NULL

M__co2 := 44

NULL

M__hc := 17

M__no2 := 46

M__o2 := 32

M__n2 := 28

M__air := 28.84

Emission [% ] or[ppm]

E__co := 10

                %

E__co2 := 10

                %

E__hc := 110

                ppm

E__no2 := 10

                ppm

E__o2 := 10

              %

E__n2 := 10

                 %

E__air := 10

                    %

Emission [mg/Nm3]

0.8205e-1*T__exh/M__co

1.318660714

(4)

0.8205e-1*T__exh/M__co2

.8391477273

(5)

0.8205e-1*T__exh/M__hc

2.171911765

(6)

0.8205e-1*T__exh/M__no2

.8026630435

(7)

0.8205e-1*T__exh/M__o2

1.153828125

(8)

0.8205e-1*T__exh/M__n2

1.318660714

(9)

0.8205e-1*T__exh/M__air

1.280253121

(10)

Emission

mg/kWh

k__1 := E__co*c/(1.318660714)
= 40.65526690NULL

k__2 := E__co*c/(.8391477273) = 63.88684799NULL

k__3 := E__co*c/(2.171911765)
 = 24.68355489NULL

k__4 := E__co*c/(.8026630435) = 66.79079562NULL

k__5 := E__co*c/(1.153828125)
 = 46.46316216NULL

k__6 := E__co*c/(1.318660714) = 40.65526690 

NULL

k__7 := E__co*c/(1.280253121) = 41.87492489NULL

Emission

mg/kg fuel

k__1f := k__1*SFC
 = 8131.053380NULL

k__2f := k__2*SFC
 = 12777.36960  NULL

k__3f := k__3*SFC
 =

4936.710978

(11)

 

k__4f := k__4*SFC =

13358.15912

(12)

 

k__5f := k__5*SFC
 =

9292.632432

(13)

 

k__6f := k__6*SFC
 = 8131.053380 =

``

k__7f := k__7*SFC
 = 8374.984978 

Emission

[mg/km]

 

Why in the above row, col2 and col3 have no equn nos?

What should i do to remove the equn numbers 11, 12 and 13?

 

 

Temperature of exhaust is in T K

Density of exhaust is say `ρ__ex` kg/m3 

DCL is distance covered per kWh

SFC := 100*g/kWh; ppm := 4.3; EA := .2; M := 28; `ρ__ex` := .457; T = 400

100*g/kWh

(14)

Emission in g/kWhr is

Emission g/g of fuel = Emission in g/kWhr/SFC in g/kWhrper

Emission in mg/km = 0.77*Emission is mg/kg fuel*(km/liter fuel)


 

Download ppm_to_g_per_km_conversion.mw

1 2 3 4 5 6 7 Page 1 of 8