# Engineering Applications

72 replies to this topic

### #1 unique33

unique33

Casio Freak

• Possibly hacked
• 229 posts
• Gender:Male
• Location:Iran

• Calculators:

Posted 03 November 2005 - 09:20 PM

-------------------------------DISCUSS ENGINEERING PROBLEMS HERE------------------------------

post your problems , acivities , solutions , programs Describtion,...

---------------------------------------------------------------------------------------------------------------------

> an example :
related field:
MECHANICS OF FLUIDS

. Problem statement :

A jet of water having a velocity of 10 m/s and a diameter of 50 mm is di?rected against a trough
in a horizontal plane, as shown in Fig. The trough can have an angle shown as (theta) with
line A-A which is normal to the jet. The water splits up along the trough such that the volume
flow rates Q1 and Q2 are related as QI = Q2 (cos (theta))^2. We will neglect friction and gravity
effects on the speed of the water at all times. Plot the algebraic sum of the force components at the
hinge B for (theta) going from 0 in steps of 2 degrees. Also, what is the torque at B?
The trough is held in equilibrium by B at each setting of (theta).

. Strategy:

In Fig. , we choose a control volume that is at the interface between the water and the trough surface
while cutting the pin at B and the incoming and the exiting jets. We will use the linear momentum
and angular momenlum equa?tions in simple forms at each stationary angular setting of the trough.

. Figures:

. Code:
here theta=x

```pi/180  ->  c

% it is for convertion.

.019635/(1+1/((cos(x*c))^2))  ->  q1

% This is the volume flow to the top at all times as a
% function of theta. This was solved using
% conservation of mass.

q1/((cos(x*c))^2)   - > q2
%We know how ql and q2 are related so we can solve
%for q2 once we have ql. Now that we know the flow
%going to either end at all times as a function of
%theta all that remains is finding the forces and
%moments involved with these flows.

f=fx+fy=
-196.3495- (10000*q1*sin(x*c)+(10000*q1*sin(x*c) /(cos(x*c))^2))+
10000*q1*cos(x*c)-(10000*q1/cos(x*c))```

. Debriefing
The plot of total force vs. angle is shown in Fig.
Torque at the base of the trough will not change throughout the rotation of the trough.
Since the flows toward the end of the trough have no moment arm,
the only flow that will cause a torque is the constant incoming flow.
The force from this flow will not change throughout,
and the moment arm will not change during rotation either.
It will always remain length/2, which in this case is 4.5 m.
The constant torque value of 883.573 was determined in the following way:

4.5*10*(1000*10*(pi/4)*0.05A2)=883.573

where 4.5 equals the moment arm when the trough is 9 m long,
10 is the velocity of the incoming water, 1000 is the density of the water,
and the remaining terms give the area of the incoming water stream.

. plot :
now we plot the Total force on the trough vs. Theta
be sure the angle is in Radian.

Variable range :
theta=x = 2..60
y=-210..-150

. Eactivity files :
here is the Eactivity .

----------------------------------------------------------------------------------
we could change the subtitle before . why it is not possible now.
I wanted to change Activities,Programs to
discuss Engineering problems
• sma4t likes this

### #2 unique33

unique33

Casio Freak

• Possibly hacked
• 229 posts
• Gender:Male
• Location:Iran

• Calculators:

Posted 03 November 2005 - 10:59 PM

related field :
Thermodynamics & Mechanics of Fluids

. Ejector Nozzle

. problem Statement
we are going to give the apparatus the ability to change the depth that the ejector-nozzle system
is below the free surface. This will permit operation above the ocean floor to be adjustable
(see Fig. ). We shall make the 30 ft height a variable which we denote as h.
We will assume that the dis?tribution of oysters on the average is some function of the depth
below the free surface for this case. We wish to plot the power of the pump needed for a flow of
1500 gpm of a mix of water and oysters into the boat versus the depth h of the ejector-nozzle
centerline below the free surface including an initial value of 30 ft. We will propose here that the
specific gravity sg of the water and oyster mix at the entrance to the ejector-nozzle is given as
sg = 1.5 - (2.54204 - 0.08404.*depth).1\0.416
This equation is assumed to be valid from the depth of 28 ft above where there
are no oysters, and the water is clear to the maximum depth of 30 ft.

. Strategy
We will form a hypothetical continuum of water and oysters with the above specific gravity.
The control volume will be the entire interior of the pipe system and pump.
We will use the first law of thermodynamics, the continuity equation,
and we will assume isothermal, steady, incompressible flow throughout. Also,
we will consider that we have very close to hydrostatic pressure at the inlet to the jet-ejector nozzle.
The height h will be the variable.

. Figures

. code
```clear_a_z

1.5-(2.54204-.08404*depth)^.416   - > sg

6.48+1.0806*sg  -> flow3

flow3/3.8997  ->  density3

-((13718.16+2287.6302*sg)/density3)-34.795*depth*sg-375.3024*sg+34.8*depth+6945.292  ->  dwsdt
-dwsdt/550  ->  pump

pump|depth=x```

. Debriefing
The specific gravity of the oyster-water mix is just a hypothetical estimation. Of course, for actual use there
would have to be experimental verification and adjustment of the proposed specific gravity equation.
In Fig notice that in the plot pump power must increase as the height h is increased.
This obtains because of the increase in the specific gravity we have used for the incoming mix and also because
of the greater height the mix has to be raised.

. plot
now we plot the pump power vs. Depth

depth=x=28..30 scale=.2
power=y=3..3.9 scale=.1

. Eactivity files :
here is the Eactivity .
• sma4t likes this

### #3 unique33

unique33

Casio Freak

• Possibly hacked
• 229 posts
• Gender:Male
• Location:Iran

• Calculators:

Posted 11 November 2005 - 03:36 PM

Can anyone solve this nonlinear third-order ordinery differential equation?
(because the problem statement need 2D form , I provided an Activity file!)

. the main equation that should be solved is Eq(5) with boundary conditions Eq(6).

. requirements:
> power series expantion
> 4th-order runge kutta

If anyone know the solution please post it precisely. thanks.

here is the eActivity file.

-- related field : Mechanics of fluid --
• sma4t likes this

### #4 PAP

PAP

Casio Overlord

• Members
• 681 posts
• Gender:Male
• Location:Somewhere in Europe.
• Interests:Computer Algebra, Numerical Analysis.

• Calculators:
ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 11 November 2005 - 05:14 PM

Can anyone solve this nonlinear third-order ordinery differential equation?
(because the problem statement need 2D form , I provided an Activity file!)

. the main equation that should be solved is Eq(5) with boundary conditions Eq(6).

. requirements:
> power series expantion
> 4th-order runge kutta
If anyone know the solution please post it precisely. thanks.

here is the eActivity file.

-- related field : Mechanics of fluid --

Although I'm not an engineer, your topic is interesting, and it is actually a very good idea. You obviously work hard for it.
This is a boundary-value problem, and, as such, it can be solved numerically by a "shooting" method, which uses a "differential-equation solver" iteratively. This "solver" can be any numerical method for solving differential equations, preferrably with adaptive stepsize control (a simple Runge-Kutta method with fixed step is definitely a bad idea).
Currently, LuaNumAn has the function RK4Rich, which is able to solve initial-value problems with a Runge-Kutta method. This function is highly accurate, because it uses adaptive stepsize control via Richardson extrapolation. However, boundary value problems are not supported so far by LuaNumAn. I'm planning to add a shooting method in LuaNumAn in the near future. I can accelerate this proccess, if it is important to you .
However, you should overpass a problem first: your equation has a boundary condition at infinity, which must be transformed to an equivalent boundary condition at a fixed point. This can be done in two ways:
(1) Change the independent variable x so that the condition at x=infinity becomes a condition at x'=C, where x' is the new independent variable, and C is a real number (as x->infinity, x'->C).
(2) Depending on the underlying physics problem, you may be able to avoid the transformation, and keep the original independent variable. In that case, the condition at infinity is replaced by an equivalent condition at a fixed point. Usually, that fixed point is obvious from the physical problem at hand.
I don't know much about the physical problem you are trying to solve, so I cannot tell which method is suitable for this problem. If you have a paper describing Howarth's solution, you will easily figure out how the condition at infinity is treated.
Once you overpass the boundary condition at infinity, let me know. I can then add a shooting method in LuaNumAn. This way we will prove (once again) that ClassPad can be used for solving really difficult numerical problems .

### #5 unique33

unique33

Casio Freak

• Possibly hacked
• 229 posts
• Gender:Male
• Location:Iran

• Calculators:

Posted 12 November 2005 - 10:43 AM

I can accelerate this proccess, if it is important to you .

It is so important to me .

I do not know but I try to overpass the boundary condition at infinity.
If you have the time ,and solve my problem ,I do not know how to reply your help!

### #6 PAP

PAP

Casio Overlord

• Members
• 681 posts
• Gender:Male
• Location:Somewhere in Europe.
• Interests:Computer Algebra, Numerical Analysis.

• Calculators:
ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 12 November 2005 - 06:05 PM

It is so important to me .
I do not know but I try to overpass the boundary condition at infinity.
If you have the time ,and solve my problem ,I do not know how to reply your help!

Well, problem solved (with ClassPad, of course ). Here are some screenshots:

The key is that the missing initial condition is f''(0)=0.3320573362151945, as you can see in the first screenshot. I have calculated this number using the shooting method, which is included in the upcoming LuaNumAn version 1.50. I haven't released this version yet, since I'm planning to add more methods before releasing it. Nevertheless, you can solve your problem using LuaNumAn version 1.40 with this program.
In the second screenshot, you can see the functions f(eta), f'(eta), and f''(eta) (thin, thicker, and thickest lines, respectively). The third screenshot shows the derivative f'(eta), which is what you want .
Note that the program uses the LuaNumAn function RK4Rich. This means that the algorithm selects the appropriate integration points so that the error is much less than 1e-6. In this problem, RK4Rich selects 172 points from eta=0 to eta=8, and ClassPad needs about 9 seconds to execute the program.
For convinience, I'm posting the solution at fixed points:

```eta	 f(eta)	   f'(eta)	  f''(eta)
-------------------------------------------
0.00	0.0000000	0.0000000	0.3320573
0.25	0.0103763	0.0830054	0.3319138
0.50	0.0414928	0.1658853	0.3309110
0.75	0.0932824	0.2483188	0.3282057
1.00	0.1655717	0.3297800	0.3230071
1.25	0.2580325	0.4095573	0.3146330
1.50	0.3701385	0.4867893	0.3025805
1.75	0.5011353	0.5605192	0.2865992
2.00	0.6500244	0.6297657	0.2667515
2.25	0.8155673	0.6936057	0.2434434
2.50	0.9963111	0.7512597	0.2174116
2.75	1.1906342	0.8021678	0.1896615
3.00	1.3968082	0.8460444	0.1613603
3.25	1.6130707	0.8829019	0.1337027
3.50	1.8376986	0.9130404	0.1077726
3.75	2.0690759	0.9370047	0.0844292
4.00	2.3057464	0.9555182	0.0642341
4.25	2.5464494	0.9694053	0.0474325
4.50	2.7901344	0.9795143	0.0339809
4.75	3.0359592	0.9866529	0.0236104
5.00	3.2832737	0.9915419	0.0159068
5.25	3.5315937	0.9947885	0.0103898
5.50	3.7805719	0.9968788	0.0065786
5.75	4.0299679	0.9981835	0.0040377
6.00	4.2796209	0.9989729	0.0024020
6.25	4.5294273	0.9994359	0.0013851
6.50	4.7793223	0.9996991	0.0007741
6.75	5.0292671	0.9998441	0.0004193
7.00	5.2792388	0.9999216	0.0002202
7.25	5.5292248	0.9999617	0.0001120
7.50	5.7792180	0.9999819	0.0000553
7.75	6.0292149	0.9999917	0.0000264
8.00	6.2792134	0.9999963	0.0000122```
As you can see, the results for f'(eta) are similar to those given in the table at your eActivity. In fact, the results posted here are much more accurate .

### #7 unique33

unique33

Casio Freak

• Possibly hacked
• 229 posts
• Gender:Male
• Location:Iran

• Calculators:

Posted 12 November 2005 - 06:44 PM

wawwwww,thanks.

I have overpassed the infinity problem.

f'=u/U=1 is the definition of infinity in physical viewpoint.
so we should continue the results upto f'(eta)=1

also we can change the second boundary condition with
eta=( A value that makes f'(eat)=1) , f'(eta)=1
( If you see the result table in the Activity file ( eta=8 , f'(8)=1))
-------------
also see the f'(eta) plot in the Activity . the coordinates should be changed.

since I do not have my classpad now, I will try your program tomorrow .

thanks alot , I do not know how to reply your help PAP .

edited.

### #8 PAP

PAP

Casio Overlord

• Members
• 681 posts
• Gender:Male
• Location:Somewhere in Europe.
• Interests:Computer Algebra, Numerical Analysis.

• Calculators:
ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 12 November 2005 - 07:03 PM

( If you see the result table in the Activity file (eta=8, f"(8)=1))

I think that f'(8)=1 is only an effect of rounding the true value at 5 (or less) decimal digits. The results I have posted (and those obtained by my Lua program) are computed by setting f'(eta)->1 as eta->infinity, as described in your eActivity. I'm not sure that using the boundary condition f'(8)=1 is a good idea, since it is only an approximation. However, if you really want the results for f'(8) equal to exactly 1, I can post them easily.

thanks alot , I do not know how to reply your help PAP .

Well, you can reply by telling me a good proverb of your native language (translated in english, of course). I like learning foreign proverbs.

### #9 The_AFX_Master

The_AFX_Master

Casio Overlord

• 519 posts
• Gender:Male
• Location:Black Mesa Research Facility (sector C)
• Interests:BASIC +FORTRAN 90+ C++.....and HALF LIFE

• Calculators:
Casio Algebra FX 2.0 Plus, Casio fx 570 ms, Classpad 300, And a crowbar

Posted 12 November 2005 - 08:50 PM

AMAZING PAP!!!....100 points for LUAnuman!....i have an exam the next monday, about these methods,
runge kutta?s, finite differences, and shoting methods..i will test your library any day!

Good topic unique33, but, nothing seems to be interested on enginnering problems, i don?t know why!!! , the calcs are for calculus, not for games....surely, if we program mario (for example),
a lot of people will post in this topic! ...thats not have sense.. desafortunately, i havnt a CP now... go forward with this topic, is a good job

### #10 betoe

betoe

UCF Spanish Translator

• 846 posts
• Gender:Male
• Interests:Electronics, SW development, automotive. Swim->bike->run

• Calculators:

Posted 13 November 2005 - 05:32 PM

Im reading daily this topic, its interesting but its useless for me (at least at this time). I will try to contribute this topic with some electronics examples, but my priorities right now are have fun (baseball nights & weekends), learn PLC's and labview, and have all my stuff in order coz i will move to another city.

### #11 unique33

unique33

Casio Freak

• Possibly hacked
• 229 posts
• Gender:Male
• Location:Iran

• Calculators:

Posted 15 November 2005 - 12:31 PM

The key is that the missing initial condition is f''(0)=0.3320573362151945,

I read more books on this problem and I saw that Blasius used a far value for eta instead of infinity too.
also we do not know anything about f"(eta)

a lot of people will post in this topic! ...thats not have sense.. desafortunately, i havnt a CP now... go forward with this topic, is a good job

Science explains what is.
Engineering creat what never was.
Mathematics is the base of science and engineering.
Physics and Chemistry are science but not engineering

Mathematics,Statisticsm Computer , Graphics,Language are combined to produce a plan , which , when carried out , produces a product that is functional , safe, reliable, competitive , usable , marketable , manufacturable , and marketable , regardless of who builds it or who uses it.

and consider this proverb that sayes:

One hand does not have sound

### #12 PAP

PAP

Casio Overlord

• Members
• 681 posts
• Gender:Male
• Location:Somewhere in Europe.
• Interests:Computer Algebra, Numerical Analysis.

• Calculators:
ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 15 November 2005 - 01:01 PM

I read more books on this problem and I saw that Blasius used a far value for eta instead of infinity too.

Using a"far value" for eta may give accurate results, provided that it's "far enough". However, strictly speaking, it's not mathematically correct. A transformation is the best way to proceed. But for an engineer, who wants an accurate result without being bothered with numerical analysis details, a "far value" for eta will be more than sufficient.

also we do not know anything about f"(eta)

Indeed, we don't know anything about f''(eta). I have found the value f''(0)=0.3320573362151945 by using a LuaNumAn shooting method (not released yet - be patient, I have many things to do). I bet my ClassPad that this value for f''(0) is highly accurate.

One hand does not have sound

Nice proverb. If I understood well, it's similar to another proverb I know: "one hand washes the other, and both hands wash the face".

### #13 2072

2072

Casio over god

• 1554 posts
• Gender:Male
• Location:Somewherebourg
• Interests:Cinema, Programming, Music and a lot of thing...

• Calculators:
AFX2 ROM 1.02, CFX-9940GT+, FX-180P-Plus

Posted 16 November 2005 - 05:30 AM

I don't conpletely agree with:

"Mathematics is the base of science and engineering."

because science and engineering (at basic state of course) could exists without Mathematics (that are just a tool to manipulate/build entities used in those fields...)

### #14 unique33

unique33

Casio Freak

• Possibly hacked
• 229 posts
• Gender:Male
• Location:Iran

• Calculators:

Posted 16 November 2005 - 06:30 AM

Indeed, we don't know anything about f''(eta). I have found the value f''(0)=0.3320573362151945 by using a LuaNumAn shooting method (not released yet - be patient, I have many things to do). I bet my ClassPad that this value for f''(0) is highly accurate.

Is it possible to solve the equation without using this boundary condition . (f''(0)=0.3320573362151945)?
I mean is it possible to solve it numerically just using the boundary conditions involving f(eta) and f'(eta) ?
-- f(0) , f'(0) , f'(8 or a better value "for eta>7.5 we have f'=u/U=1" ) --

I don't conpletely agree with:

"Mathematics is the base of science and engineering."

because science and engineering (at basic state of course) could exists without Mathematics (that are just a tool to manipulate/build entities used in those fields...)

maybe PAP can give us a better Definition for " Mathematics " .

### #15 PAP

PAP

Casio Overlord

• Members
• 681 posts
• Gender:Male
• Location:Somewhere in Europe.
• Interests:Computer Algebra, Numerical Analysis.

• Calculators:
ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 16 November 2005 - 09:38 PM

Is it possible to solve the equation without using this boundary condition . (f''(0)=0.3320573362151945)?
I mean is it possible to solve it numerically just using the boundary conditions involving f(eta) and f'(eta) ?
-- f(0) , f'(0) , f'(8 or a better value "for eta>7.5 we have f'=u/U=1" ) --

Of course it is possible. How do you think I have found the correct value for f'(0)?
There are two categories of methods for solving boundary-value problems: (1) "shooting" methods and (2) "relaxation" methods, often reffered to as "Numerov" methods. Both methods are complex, time consuming, and they have their advantages and disadvantages. Currently, I have implemented a LuaNumAn shooting method (which is somewhat easier than relaxation methods), but I'm not sure if I need to add both methods in LuaNumAn. This is the reason for the delay on releasing LuaNumAn 1.50. Be patient, you will be able to solve boundary value problems in ClassPad soon. I'm working on it. LuaNumAn is my personal "free-time devourer" .

maybe PAP can give us a better Definition for " Mathematics " .

Well, I don't feel like an expert on the subject, but I think I have something to say: Mathematics is a greek word, and, literally, it means something like "the science of studying", or "to study everything". The name says it all. I believe that Mathematics is the base for every science (except, of course, human sciences). The founder of Mathematics, Pythagoras (famous for one of his theorems and the invention of music scales) said: "Everything is numbers".
On the other hand, I can understand 2072's stance. Indeed, science and engineering could exist without Mathematics, but only at basic state of course. However, I don't think that Mathematics is just a tool to manipulate/build entities used in those fields. In fact, it's an absolutely necessary tool, a must. Can you imagine Physics or Civil Engineering, or even Medicine without Mathematics?

### #16 unique33

unique33

Casio Freak

• Possibly hacked
• 229 posts
• Gender:Male
• Location:Iran

• Calculators:

Posted 24 November 2005 - 03:28 PM

I,m now working on a project :
Interpolating Thermodynamic Tables

we need to have files which contain the T,SF,SG,HF,HG tables and export
the desired values to the main program.
because there are plenty of Cases that should be considered and the tables
will contain many values so we should have different files containing just one table.

Can anyone do me a favor and change my code in the following form :
main program : governing the tables and interpolate them
table files: containing T, SF , Sg , HF , HG tables and export the desired values to the main program .
• sma4t likes this

### #17 unique33

unique33

Casio Freak

• Possibly hacked
• 229 posts
• Gender:Male
• Location:Iran

• Calculators:

Posted 25 November 2005 - 10:28 PM

Ok.I found an other way to work with the Tables.

-------------------------------------------------------------------------------------------------------
To anyone who works to have improvement and better classpad .
Take a look ,I think you will like it.
They are Natural ( I have plenty of them in springs at my home , but less now in fall ) !

here is the second which is good for background !

-------------------------------------------------------------------------------------------------------

### #18 PAP

PAP

Casio Overlord

• Members
• 681 posts
• Gender:Male
• Location:Somewhere in Europe.
• Interests:Computer Algebra, Numerical Analysis.

• Calculators:
ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 27 November 2005 - 02:47 PM

Can anyone do me a favor and change my code in the following form :
main program : governing the tables and interpolate them
table files: containing T, SF , Sg , HF , HG tables and export the desired values to the main program .

I didn't had had the time to see your code, but since you have found a way to solve the problem, I'm not needed anyway.
If you are working on interpolation, you might found useful to know that LuaNumAn 1.50 will support cubic spline interpolation. I worked hard on this, and I can say that it is very robust; it can even approximate first and second derivatives very accurately. So, if you need cubic spline interpolation, maybe it is a good idea to wait for LuaNumAn 1.50.

Take a look ,I think you will like it.
They are Natural ( I have plenty of them in springs at my home , but less now in fall ) !

Nice pictures, really strange flowers. Is it some kind of cactus?

### #19 -Tom-

-Tom-

Casio Freak

• Members
• 104 posts
• Location:Poland

• Calculators:

Posted 27 November 2005 - 07:56 PM

Ok.I found an other way to work with the Tables.

-------------------------------------------------------------------------------------------------------
To anyone who works to have improvement and better classpad .
Take a look ,I think you will like it.
They are Natural ( I have plenty of them in springs at my home , but less now in fall ) !

here is the second which is good for background !

-------------------------------------------------------------------------------------------------------

Whats the name of this flower? They are very nice!
My brother studies biology... maybe he will find one for me...

### #20 unique33

unique33

Casio Freak

• Possibly hacked
• 229 posts
• Gender:Male
• Location:Iran

• Calculators:

Posted 27 November 2005 - 10:05 PM

If you are working on interpolation, you might found useful to know that LuaNumAn 1.50 will support cubic spline interpolation. I worked hard on this, and I can say that it is very robust; it can even approximate first and second derivatives very accurately. So, if you need cubic spline interpolation, maybe it is a good idea to wait for LuaNumAn 1.50.

Nice .
Interpolating thermodynamic tables just needs Linear Interpolation .
"Chemical Engineering and Mechanical Engineering Students be hopefull they will feel free to interpolate thermodynamic tables (Saturated , Superheat , Compressed) ( Steam for now )."

btw: to solve the nonlinear differential equation I used f''(0)=0.332059191735445 , I found it using shooting method , Nonlinear Interpolation. again thanks for your program " LuaNumAn" !

Nice pictures, really strange flowers. Is it some kind of cactus?

Whats the name of this flower? They are very nice!
My brother studies biology... maybe he will find one for me...

No they are not Cactus . as you can see it has leaf ( which is very hard compared to other flowers but
brittle when strong force applied ) and the flower itself is so soft like silk and Velvet !
I do not know the name of this flower , I saw it somewhere else and the leafs were strange to me (it did not had flowers at all) ,
so I decided to bring them to my home just because of the leafs ,
but Now it has flowers ( I think because of the change in the weather) .
So it is a really starge Flower .

### #21 PAP

PAP

Casio Overlord

• Members
• 681 posts
• Gender:Male
• Location:Somewhere in Europe.
• Interests:Computer Algebra, Numerical Analysis.

• Calculators:
ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 28 November 2005 - 05:49 PM

btw: to solve the nonlinear differential equation I used f''(0)=0.332059191735445 , I found it using shooting method , Nonlinear Interpolation.

If you need a more precise value (obtained without any interpolation), just give me the boundary conditions you want to use; I can post the correct value for f''(0). However, don't expect a major change: I bet that the value you have obtained by interpolation is too close to the correct value. With LuaNumAn 1.50 you will not need me anymore, since I'm planning to add a shooting method, so you will be able to solve boundary value problems directly. Unfortunately, the release of version 1.50 will take some more time, because it will have many new features and improvements, and my free time is shooort .

### #22 Nexus_t1000

Nexus_t1000

Newbie

• Members
• 17 posts

Posted 13 December 2005 - 04:50 PM

I don't conpletely agree with:

"Mathematics is the base of science and engineering."

because science and engineering (at basic state of course) could exists without Mathematics (that are just a tool to manipulate/build entities used in those fields...)

Science without math is only speculation (Method and demonstration are both needed) ask the greeks, engineering without math is a simple mind game (ask to egyptians ).

Science create, Engineering build.
Maths gives light to the science making visible the hidden things and supports engineering with formal models.

• sma4t likes this

### #23 unique33

unique33

Casio Freak

• Possibly hacked
• 229 posts
• Gender:Male
• Location:Iran

• Calculators:

Posted 12 February 2006 - 12:37 PM

I have compeleted 80% of the first step ( Water Tables ) of the Cplua project :
CATT " Classpad Aided Thermodynamic Tables"
within my last 3 month free times.

here is some screen shots of the current look:

because it needs lots of test to be sure of reliability and also
20% of the project is remained maybe it will need another month to be compeleted.

A request :
although I studied some thermodynamic books but I did not find anything about the "Fluid Region ->(P>P critical , T>T critical)"
( as far as I understood "Fluid" here does not mean the one that is in minds )

### #24 Kilburn

Kilburn

Casio Technician

• Members
• 491 posts
• Gender:Male
• Location:France
• Interests:Blah

• Calculators:
FX-7500 G

Posted 12 February 2006 - 12:54 PM

Nice interface!

### #25 unique33

unique33

Casio Freak

• Possibly hacked
• 229 posts
• Gender:Male
• Location:Iran

• Calculators:

Posted 12 February 2006 - 01:36 PM

If anyone needs DATA of different phases of a specific substance let me know.
for example If anyone is working with refrigerators, chillers, air conditioner ,boiler , heater .....
which uses a specific substance .for example R-22 or R-23 or ....
If I had the tables I will choose that substance for the next step .

Nice interface!

thanks.

### #26 The_AFX_Master

The_AFX_Master

Casio Overlord

• 519 posts
• Gender:Male
• Location:Black Mesa Research Facility (sector C)
• Interests:BASIC +FORTRAN 90+ C++.....and HALF LIFE

• Calculators:
Casio Algebra FX 2.0 Plus, Casio fx 570 ms, Classpad 300, And a crowbar

Posted 12 February 2006 - 11:36 PM

WOWOWOWOWOWOWOOW!!!!!..congratulations unique33!...your'e fast man!

i was thinking to post here about creating steam tables on LUA...so late no?

question? you generate the tables using database, searcher algorithm, an a linear interpolation routine, or..
equations of state (Beattie-Bridgeman, Strobridge..etc)

Proposing project unique, I am an Mechanical Engineering student as you. what abuout a library of material resistance analysis. i have a some programs that works fine on my classpad and my AFX 2.0, of course. coded on LUA

.- Mohr circles
.-Beam Analyzer (isostatic at the moment, coding deformations and hiperstatic problems)
.-structure solver (isostatic, coding for deformation plotting and tracing)
.- Moment of inertia of sections, classic sections and custom section builder, with center of mass
.- small routines, crossp, dotp, resultant force and moment with equivalent force and his line of action

thanks

PS: More ideas? i would code it!

### #27 unique33

unique33

Casio Freak

• Possibly hacked
• 229 posts
• Gender:Male
• Location:Iran

• Calculators:

Posted 13 February 2006 - 02:45 PM

WOWOWOWOWOWOWOOW!!!!!..congratulations unique33!...your'e fast man!

thanks.
but the project is incompelete yet.
I posted some screenshots here just to introduce the program and to get help from the ones like you (Mechanical or chemical engineering students or the graduated ones ) about the "Fluid Region" .
In my mind blocking this area is not a good solution at all , although it is less needed because in this special region we have Supernumerary high temperature and pressure.

question? you generate the tables using database, searcher algorithm, an a linear interpolation routine, or..
equations of state (Beattie-Bridgeman, Strobridge..etc)

At the first I wanted to use the equations of states but the equations that are in fundamental books like van wylen is not good for such a program , because the result is not as accurate as the experimental DATA . also the equations that estimate the result accuratelly are commerical and maybe they are not good for a calc like classpad with little memory , because as you know they are so long and needs huge operations when compared with the process that simply interpolate the tables. ( but I,m not so sure about the commerical ones , because I do not have such equations yet )
so I decided to plug the tables to classpad as databases and interpolate them .

now I am waiting for the Cplua to support the text files , because at that time there will be no need for the tables to allocate memory.
at this time the program calls the table which is needed and at the end of interpolation it frees the memory by assigning nil to the table.

Proposing project unique, I am an Mechanical Engineering student as you. what abuout a library of material resistance analysis. i have a some programs that works fine on my classpad and my AFX 2.0, of course. coded on LUA

.- Mohr circles
.-Beam Analyzer (isostatic at the moment, coding deformations and hiperstatic problems)
.-structure solver (isostatic, coding for deformation plotting and tracing)
.- Moment of inertia of sections, classic sections and custom section builder, with center of mass
.- small routines, crossp, dotp, resultant force and moment with equivalent force and his line of action

thanks

PS: More ideas? i would code it!

Nice . such programs are so needed .

*beam analyzer:
I do not know how you define the loads ( forces ) on beams . I was thinking about a program which uses the process that ANSYS uses to define the loads , but since I have not try to write such a program I,m not sure that such a process is possible or not.

*plotting the deformed shape :
Does your program plot the deformed shape of a beam that is loaded under any type of force ? distributed and centered forces and moments and .... ?

* Moment of inertia & center of mass:
Moment of inertia & center of mass of custom sections is a nice program.

### #28 PAP

PAP

Casio Overlord

• Members
• 681 posts
• Gender:Male
• Location:Somewhere in Europe.
• Interests:Computer Algebra, Numerical Analysis.

• Calculators:
ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 14 February 2006 - 12:12 AM

so I decided to plug the tables to classpad as databases and interpolate them .

First of all, I have to say that unique33 had a very good idea. Furthermore, judging from the screenshots, the interface is excellent.
Now, consider to use cubic spline interpolation instead of linear interpolation. This way, you will be also able to compute the first and second derivatives accurately. LuaNumAn 1.50 will include cubic spline interpolation, but if you need it right now, I can upload LuaNumAn version 1.41 with full cubic spline support.

Edit: I just realized that I have posted something similar about cubic splines before; sorry, I forgot it.
Again, nice work, unique33.

Edited by PAP, 14 February 2006 - 12:19 AM.

### #29 unique33

unique33

Casio Freak

• Possibly hacked
• 229 posts
• Gender:Male
• Location:Iran

• Calculators:

Posted 14 February 2006 - 12:41 AM

judging from the screenshots, the interface is excellent.

thanks . I hope that the program will be like its interface.
(although the result is satisfactory to me, but I should say that I am a little worry about the structured programming ,but however it is my first serious programming that I have ever had)

Now, consider to use cubic spline interpolation instead of linear interpolation. This way, you will be also able to compute the first and second derivatives accurately. LuaNumAn 1.50 will include cubic spline interpolation, but if you need it right now, I can upload LuaNumAn version 1.41 with full cubic spline support.

I said thermodynamic tables need Linear interpolation because the DATA in the tables are so near to each other , but essentially using a nonlinear interpolation will have more accurate result.

let me give an example:
we want to find the corresponding pressure to the temperature 100 (C degree)
assume that we searched the tables and now we have :

```T				   P
----------------------
95				 226
100				------> ?  ( I used Linear interpolation here )
105				257```
as you see ,the valuable process here is the search process .
If you have any Idea let me know.

### #30 PAP

PAP

Casio Overlord

• Members
• 681 posts
• Gender:Male
• Location:Somewhere in Europe.
• Interests:Computer Algebra, Numerical Analysis.

• Calculators:
ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 16 February 2006 - 09:03 AM

let me give an example:
we want to find the corresponding pressure to the temperature 100 (C degree)
assume that we searched the tables and now we have :

```T				   P
----------------------
95				 226
100				------> ?  ( I used Linear interpolation here )
105				257```
as you see ,the valuable process here is the search process .
If you have any Idea let me know.

Well, this is linear interpolation (only data for T=95 and T=105 is used; the rest of data is not involved). This may work very well, provided that you have a dense grid of data. But what exactly means "dense"? In your example, it means that P does not change considerably between T=95 and T=105 (percent difference is small, say less than 5%).
I usually generate a cubilc spline interpolation function, and I use this function to estiimate P for any T. If you wish, give me the whole table of data for T and P. I can then post a cubic spline interpolation example using your data.

### #31 unique33

unique33

Casio Freak

• Possibly hacked
• 229 posts
• Gender:Male
• Location:Iran

• Calculators:

Posted 16 February 2006 - 07:15 PM

but I think that it is not that easy . let me explain more.
the purpose of interpolating thermodynamic tables is to find all properties of a specific substance
with the sufficient entrance DATA.
for example we consider the Pressure and temperature the entrance Datas and we want to find
all other properties of the substance corresponding to this pressure and temperature.

here we have different Regions and in each region we have different relationsheeps between
the properties.
for example in a specific region ( we call it Saturated region) for each pressure we have just
one temperature.but other properties vary. so here the pressure and tempreture as the
entrance data are inssuficient and we can not find other properties.( the state is not fixed)

but in other regions for each pressure there are plenty of tempretures.but the other properties
do not vary . I mean that for each set of pressure and temperature we have just one value
for other properties.So here the pressure and temperature as the entrance DATA are sufficient
and we can interpolate the tables to find other properties.
( the state is fixed)

here I consider just 2 region and continue :
Saturated Region
here for each pressure we have just one tempressure:
the tables are as follows:

>>>>>DATA:
---------------------------
*Saturated Region Tables:
--Saturated Pressure:
P={0.6113,0.8721,1.2276,1.705,2.339,3.169,4.246,5.628,7.384,9.593,12.350,15.758,
19.941,25.03,
31.19,38.58,47.39,57.83,70.14,84.55,101.3,120.8,143.3,169.1,198.5,232.1,270.1,31
3.0,361.3,415.4,
475.9,543.1,617.8,700.5,791.7,892.0,1002.2,1122.7,1254.4,1397.8,1553.8,1723.0,19
06.3,2104.2,
2317.8,2547.7,2794.9,3060.1,3344.2,3648.2,3973.0,4319.5,4688.6,5081.3,5498.7,594
1.8,6411.7,
6909.4,7436.0,7992.8,8581.0,9201.8,9856.6,10547,11274,12040,12845,13694,14586,15
525,16514,
17554,18651,19807,21028,22089}

--Saturated temperature corresponding to the pressure :
T={0.01,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,
120,125,130,
135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,
235,240,
245,250,255,260,265,270,275,280,285,290,295,300,305,310,315,320,325,330,335,340,
345,350,
355,360,365,370,374.14}

---Saturated Entalpy (Liquid) corresponding to each pressure or temperature:
HF={0.00,20.98,41.99,62.98,83.94,104.87,125.77,146.66,167.54,188.42,209.31,230.2
0,251.11,
272.03,292.96,313.91,334.88,355.88,376.90,397.94,419.02,440.13,461.27,482.46,503
.69,
524.96,546.29,567.67,589.11,610.61,632.18,653.82,675.53,697.32,719.20,741.16,763
.21,
785.36,807.61,829.96,852.43,875.03,897.75,920.61,943.61,966.77,990.10,1013.61,10
37.31,
1061.21,1085.34,1109.72,1134.35,1159.27,1184.49,1210.05,1235.97,1262.29,1289.04,
1316.27,
1344.01,1372.33,1401.29,1430.97,1461.45,1492.84,1525.29,1558.98,1594.15,1631.17,
1670.54,
1713.13,1760.48,1815.96,1890.37,2099.26}

---Saturate Entalpy (Vapor) corresponding to each pressure or temperature:
HG={2501.35,2510.54,2519.74,2528.91,2538.06,2547.17,2556.25,2556.28,2574.26,2583
.19,
2592.06,2600.86,2609.59,2618.24,2626.80,2635.28,2643.66,2651.93,2660.09,2668.13,
2676.05,
2683.83,2691.47,2698.96,2706.30,2713.46,2720.46,2727.26,2733.87,2740.26,2746.44,
2752.39,
2758.09,2763.53,2768.70,2773.58,2778.16,2782.43,2786.37,2789.96,2793.18,2796.03,
2798.48,
2800.51,2802.12,2803.27,2803.95,2804.13,2803.81,2802.95,2801.52,2799.51,2796.89,
2793.61,
2789.65,2784.97,2779.53,2773.27,2766.13,2758.05,2748.94,2738.72,2727.27,2714.44,
2700.08,
2683.97,2665.85,2645.35,2622.01,2595.19,2563.92,2526.72,2481.00,2421.40,2332.12,
2099.26}

,......(-> other properties )
( the entalpy (h) can vary between HF and HG)

now I consider another region
*(Suprerheat region)
> definition:
If for each pressure the corresponding temperature is greater than the Saturated temperature we have Superheat region.

here because for each pressure we have different temperatures I used T,P together.

--Superheat pressure and temperatures:
PsupT=psupT.zip

--SuperHeat pressure and Entalpy ( as you see for each pressure
we have different entalpies which correspond to different temperatures)

Psuph=psuph.zip

>>>>>Example:
ok.
now assume that we have P=200(kpa) , T=350 (c degree) and we want to find the
corresponding entalpy (h) what is the procces?
first we consider the saturated region :
for p=200 (kpa) we have from saturated presure and temperature tables:
```P			 T
------------------
198.1		 120
200			 ---->?=120.2232
232.1		 125```

up to now we know that 350>(120.2232) and the region is superheat.

now we go to the superheat tables:
first we find the pressure:
p=200 and we have (different temperatures):
....,,{200,200},{200,250},{200,300},{200,400},....

we search the table to find the index of the corresponing tempreture T=350
T1,p=200 -> {P=200,T1=300}
T2,p=200 -> {P=200,T2=400}
350 is between this 2 tables contents.(T1<T<T2)

we go to the entalpy tables and we find the coressponding entalpies to these indexes:
....,{200,3071.79},{200,3276.55},....
now we have :

```T				 h
--------------------
T1=300			3071.79
T=350			  -------------->?=3174.17
T2=400			3276.55```

we use the same indexes to find other datas for example ( S=entropy , v=specific volum ,
u=specific Internal energy)

----------------------------------------------------------
.Is there a way to find a function ( for example) for the superheat region ,
I mean h=f(P,T)? using the psupT,psuph tables ?
If it is possible it will be so nice.

then I can use s=f(P,T) , u=f(P,T) , v=f(P,T) ,...
and there will be no need for the search procces.

### #32 The_AFX_Master

The_AFX_Master

Casio Overlord

• 519 posts
• Gender:Male
• Location:Black Mesa Research Facility (sector C)
• Interests:BASIC +FORTRAN 90+ C++.....and HALF LIFE

• Calculators:
Casio Algebra FX 2.0 Plus, Casio fx 570 ms, Classpad 300, And a crowbar

Posted 18 February 2006 - 09:47 PM

Hi to all

unique33, the Beam Analyzer V1.00cp is totally coded an succesfully tested (the first part)
this prog solves isostatic beams with any combination of point forces,point moments, and loads
includes a stress analysis module with moment of inertia calculation, of custom sections (if this sections are constructed by rectangular parts ---> ALL THE BEAMS ON MARKET .),also you can put the moment of inertia on X and Y for a commercial section, provided by tabulated data, then, via Mohr?s circle for moments of inertia, you can solve assimetric flection problems

*beam analyzer:
I do not know how you define the loads ( forces ) on beams . I was thinking about a program which uses the process that ANSYS uses to define the loads , but since I have not try to write such a program I,m not sure that such a process is possible or not.

This prog needs to know a bit about their working. in order to know how to use it. Any beam could be divided into "pure" sections, what are them?, are sectors of the beam that have or not have a distributed load (D load) separated by the bounds of a D load, or concentrated loads and moments, summarized SIMPLY LOADED SECTORS OF THE BEAM, this section (if you "cut" it from the beam). are on equilibrium. and have their corresponding punctual forces and moments on the left bound. if this forces or moments does not exist, the prog stores 0.

What is the trick for solve any beam?

to put a beam you would recognize the "pure sections", how? there are a guide:
-punctual forces and moments are start or finish of a pure section (priority grade 1)
-D loads WITHOUT punctual forces within the bounds, are on pure sections
-if you see a force or moment within the bounds of any D load, ths load must be divided in two sections
that are pure and FREE of punctual loads

a bit heavy by spelling, but so easy by using the prog

the prog calculates shear and moment in the pure sections taking the shear and flection moment vectors on the last iteration, to make the shear-moment equations, the program see the "order" of the Dload on the section and does n+3 iterations (n is the order), a zero D Load section---> order=-1, a constant D load---->order =0, linear load ---> order = 1 and so on.

at the end of section calculus, the prog interpolates the points and stores the polynomials in a matrix
and stores the shear and moment at the right bound of the current section in a list, that will be used on the next section calculus

last step, sequence with data (using shear - moment equations obtained), and Stat Graph for shear and moment separatedly (due the moment is so big in some cases an the shear does not appear correctly)

*plotting the deformed shape :
Does your program plot the deformed shape of a beam that is loaded under any type of force ? distributed and centered forces and moments and .... ?

At the moment, no. because i?m not coursing deformations at this month. would be possible, using superposition methods, and the fact that the prog uses pure sections, (we have tabulated equations for deformations on beams on simple load state), and a bit of thinking

* Moment of inertia & center of mass:
Moment of inertia & center of mass of custom sections is a nice program.

for "built by squares" sections the routine is fully coded and tested, only remains the drawing of the sections (useful for data imput errors)

many ideas ......i would code it

ps: For the AFX 2.0 +, i could rewrite B.Analyzer for your calcs, i need to fit some problems at this month
AFX basic is so poor for this problem

### #33 Guest_Guest_*

Guest_Guest_*
• Guests

Posted 08 March 2006 - 12:41 AM

I don't conpletely agree with:

"Mathematics is the base of science and engineering."

because science and engineering (at basic state of course) could exists without Mathematics (that are just a tool to manipulate/build entities used in those fields...)

hi, i think mathematics is the base for science because you cannot actually show something as science without being able to convince someone else and people in general without contradiction something its truth for sure with out mathematics and all the tecnics developed all of these years. there was once the need to explain things with not confussion and math was born . now we cannot blow math away not even for living in a basic concept.

math student at usb (universidad simon bolivar) caracas, venezuela

### #34 The_AFX_Master

The_AFX_Master

Casio Overlord

• 519 posts
• Gender:Male
• Location:Black Mesa Research Facility (sector C)
• Interests:BASIC +FORTRAN 90+ C++.....and HALF LIFE

• Calculators:
Casio Algebra FX 2.0 Plus, Casio fx 570 ms, Classpad 300, And a crowbar

Posted 12 March 2006 - 11:21 PM

math student at usb (universidad simon bolivar) caracas, venezuela

Welcome to the UCF!!!

Hi to all. I finished Beam Analyser V1.00cp today. the previous version was rotten and a will upload the new version this week after debug

Functions:

.-Isostatic beam solving
.-Moment of inertia of custom "built by squares" sections, with section drawing
.-New common sections library ( "C", "I", "T", "L" ) for fast drawing and solving
.-New Torsion module: Calculates the rotation angles on a shaft with many torsion moments, with this respective relative angles. graph the data.
.-Stress tensor: Solves the stress matrix then aply basic failure criteria as Tresca or Von Misses theories
giving the principal stresses calculated with the stress tensor
.-GIFT: An eActivity with all the equations related to this program

wait a few days.

Report bugs and suggestions here

To Unique33. Where you are now man??? .. surely you sell your great thermodynamics tables and got a vacations ....

### #35 unique33

unique33

Casio Freak

• Possibly hacked
• 229 posts
• Gender:Male
• Location:Iran

• Calculators:

Posted 14 March 2006 - 06:04 PM

. Saturated Water
. Superheat Vapor Water
. Compressed Liquid Water
. Saturated Solid-Saturated Vapor ,Water

* "The Power Of Water Has Changed more in this world than emperors of kings."
(Leonardo da Vinci)

> Also Includes E-Notes Contianing Thermodynamic Cycles Through An E-Activity File:

. Brayton Cycle (Simple Gas Turbin)
. Gas Turbin With Regenerator
. Erricson Cycle (Simple & With Regenerator)
. Modification Of Brayton Cycle In Direction Of Erricson Cycle
. The Air Standard Cycle For Jet Propulsion
. Reciprocating Engine Power Cycles
. OTTO Cycle
. The Diesle Cycle (Compression - Ignition)
. The Stirling Cycle (Simple & With Regenerator)
. The Vapor Compression Refrigeration Cycle
. Air Standard Refrigeration Cycle

*************************************************

> Notice :
The programmer of this software has used his best efforts
in preparing this software. These efforts include the development ,
research , and testing of the theories and programs to determine
their effectivness.The programmer make no warranty of any kind with
regard to this software. The programmer shal not be liable in any event
for incidental or consequential damages in connection with ,
or arising out of , the performance , or use of this software.

*************************************************
> The software needs CPLUA version .8C.
is maintaining by Orwell.

*************************************************

CATT
CATT help
Cycles E-Notes
CPLUA .8C

(This vesion of CATT just run on this version of Cplua ,
Do not use Older or Newer versions for now
.)

*************************************************
> Example:
. Siplified Nuclear Power Plant :

A Somewhat simplified flow diagram for a nuclear power plat is
given in Figure .Mass flow rates and various states in the cycle
are shown in the accompaning table.

The cycle includes a number of heaters in which heat is transferred
from steam , taken out of the turbin at some intermediate pressure,
to liquid water pumped from the condenser on it way to the steam drum.
The heat echanger in the reactor supplies 157 MW, and it may be assumed
that there is no heat transfer in the turbin.

a. Assuming the moisture separator has no heat transfer between the two
turbin sections, determine the enthalpy and quality ( h4,x4 )

b. Determine the power output of the low-pressire turbin.

c. Determine the power output of the high-pressire turbin.

c. Find the ratio of the total power output of the two turbins to the
total power delivered by the reactor.

e. Determine the quality of the steam leaving the reactor.

f. What is the power to the pump that feeds water to the reactor?

a)
> Control Volume : Moisture Separator

1st law: Q'+m'3h3=W'+m'4h4+m'9h9

W'=Q'=0 -> m'3h3=m'4h4+m'9h9

h4=2673.89 kJ/kg

> CATT:
General Entrance : P=310 kpa , h4=2673.89 kJ/kg

Result:x4=0.9755

-------------------------------------------------
b )
> Continuity Equation:
Sigma m'i=Sigma m'e

m'4=m'5+m'8
m'5=58.22-2.772 =55.44 kg/s

> Control Volume : Low Pressur Turbin:
1st law W'LPT=m'4h4-m'5h5+m'8h8

W'LPT=22.49 MW
--------------------------------------------------
c )
> Control Volume : High Pressure Turbin
1st law W'HPT=m'2h2-m'3h3-m'12h12-m'17h17

W'HPT=18.4 W

--------------------------------------------------
d)
W't=W'HPT+W'LPT=18.4+722.49=4.89 MW

W'T/Q'=40.89/157=0.2604

--------------------------------------------------
e)
> Control Volume :Reactor
1st law. Q'+m'2h2=w'+m'21h21

W'=0
157000+1386*1221=1386 h21

h21=1334.27 kJ/kg

> CATT
General Entrance : P=7310 kpa , h21=1334.27 kJ/kg

Result: x21=0.0348

--------------------------------------------------
f)
Cotrol Volume : Pump

>CATT :
General Entrance : P19=7240 kpa , T19=277 c

Result : No Result ! (I assume that you know the reason)

T sat.lig =277 c
Result :
hf=1220.4180

1st law
Q'+m'19h19=W'p+m'20h20
Q'=0
W'P=1386(1220.4180-1221)=-806.652 kW

### #36 unique33

unique33

Casio Freak

• Possibly hacked
• 229 posts
• Gender:Male
• Location:Iran

• Calculators:

Posted 14 March 2006 - 06:34 PM

To Unique33. Where you are now man??? .. surely you sell your great thermodynamics tables and got a vacations ....

I was busy within the past days. Yesterday I had free time and I decided to finish the project.
also I made lots of modifications on the project and now the beta version is ready to test.

Iranians: Here you are and Here is the Gift for the new year :
Happy New Year ( Nowruz ) To All Iranian in This Forum and in whole of the world .
Have a nice year .

I wanted to upload it 1385/1/1 but It got ready sooner than the time that was in my mind.

### #37 manuelfrank12

manuelfrank12

Casio Fan

• Members
• 34 posts

• Calculators:

Posted 16 March 2006 - 02:52 AM

i like this topic

if you can put a example with more explantion avout teh sofware
thanks

### #38 unique33

unique33

Casio Freak

• Possibly hacked
• 229 posts
• Gender:Male
• Location:Iran

• Calculators:

Posted 16 March 2006 - 10:25 PM

i like this topic

if you can put a example with more explantion avout teh sofware
thanks

Do you want explanation about how to run it on CPLUA ? or you want more explanation about the software itself ? or ....?

BTW: CATT does not run properlly on Cplua executable one !, I do not know why .
If you select a button the execution jumps to the desired portion of software but when the execution ends it does not goes back to the select menu .
but the version of Cplua that I uploaded here does not have any problem on the classpad itself.
Also I have some problems with the new version of cplua. I will try to find and remove all problems for the next version .

### #39 unique33

unique33

Casio Freak

• Possibly hacked
• 229 posts
• Gender:Male
• Location:Iran

• Calculators:

Posted 17 March 2006 - 08:27 PM

>> Topic:
Chemical Eguilibrium

> reliated Field:
Thermodynamics

> Software used:
(2) LuaNumAn:Matrix Algebra :Broyden
(Reference:LuaNumAn manual ; 4.2.8 ; page 40 )

> Problem Statement:
Methane is burned with theoretical oxygen in a steady-state process ,
and the products exit the combustion chamber at 3200 K, &00 kpa .
Calculate the equilibrium composition at this state, assuming that only
CO2 , CO, H2O , H2 , O2 and OH are present.

> Solution :
. Combustion equation:

CH4+2O2 -> CO2+2H2O

. Dissociation reactions:

1) 2H2O <-> 2H2 + O2
change: -2a +2a +a

2) 2H2O <-> H2 + 2OH
change: -2b +b +2B

3) 2CO2 <-> 2CO + O2
change: -2c +2c +c

. In equilibrium:
n(H2O) =2-2a-2b
n(O2) =a+c
n(CO2) =1-2c
n(H2) =2a+b
n(OH) =2b
n(CO) =2c

n(total)= 3+a+b+c

. products at 3200 K , 700 kpa

. Lua Code :
substituent : x=a , x=b , x=c
(Simply change the XBroyden file -> LuaNumAn ; LuaExamp ; XBroyden)

```require("table")
require("LuaNumAn/Broyden")

local function F(x)
return {((2*x[1]+x[2])/(2-2*x[1]-2*x[2]))^2*((x[1]+x[3])/(3+x[1]+x[2]+x[3]))*(7)-0.007328,((2*x[2])/(2-2*x[1]-2*x[2]))^2*((2*x[1]+x[2])/(3+x[1]+x[2]+x[3]))*(7)-0.012265,((2*x[3])/(1-2*x[3]))^2*((x[1]+x[3])/(3+x[1]+x[2]+x[3]))*(7)-0.426135}
end

local root
root=Broyden({0.02,0.2,.2},F)
print("Solution:")
table.foreach(root,print)
print("\nFunction value:")
table.foreach(F(root),print)```

. Solving this non-linear system of equations using Broyden method:
Results
:

```Component   H2O	  H2	   O2		OH		CO2	  CO
-----------------------------------------------------------------
n		   1.661	0.1935   0.260	 0.291	 0.528	0.472

y		   0.4877   0.0568   0.0764	0.0855	0.1550   0.1386```

### #40 unique33

unique33

Casio Freak

• Possibly hacked
• 229 posts
• Gender:Male
• Location:Iran

• Calculators:

Posted 18 March 2006 - 06:39 PM

I uploaded a help file including:

. How to Install Cplua on classpad 300
. How to use Cplua in windows environment
. How to Import a project into the Cplua in windows environment
. How to run an Inserted project
. How to run CATT on classpad
. How to run CATT on windows