Programming in mathcad
Programming in mathcad
(OP)
Hallo everyone.
I'm a newuser in M. and I'm trying to "convert" a simple
basic listing to mathcad.
Despite my efforts I still can't get any good result.
Following the prg. (heat transfer).
JJerman
10 alung = .02
20 are = .24 * alung
30 port = .01648
40 qint = 0
100 h = 60
110 t1 = 680
120 t2 = 80
140 FOR i = 1 TO 50
150 q = h * (t1 - t2)
160 qtot = are * q
170 cp = .64545 * (t1 - 500) + 687
180 dt = qtot / (port * cp)
190 t1 = t1 - dt
200 qint = qint + qtot
220 alung = alung + .02
230 NEXT i
I'm a newuser in M. and I'm trying to "convert" a simple
basic listing to mathcad.
Despite my efforts I still can't get any good result.
Following the prg. (heat transfer).
JJerman
10 alung = .02
20 are = .24 * alung
30 port = .01648
40 qint = 0
100 h = 60
110 t1 = 680
120 t2 = 80
140 FOR i = 1 TO 50
150 q = h * (t1 - t2)
160 qtot = are * q
170 cp = .64545 * (t1 - 500) + 687
180 dt = qtot / (port * cp)
190 t1 = t1 - dt
200 qint = qint + qtot
220 alung = alung + .02
230 NEXT i





RE: Programming in mathcad
RE: Programming in mathcad
RE: Programming in mathcad
That was the clearest example of a MathCad program I've ever seen (all of the examples in the book have extra stuff that muddies the water for me). I program in MathCad all the time and it always surprises me when a program works. I can read every line of your program and understand what it is doing and why it is there. Thank you.
David
RE: Programming in mathcad
As Tom suggests, you should look at the original problem in your book, and apply Mathcad directly to the solution, rather than trying to duplicate the results of the BASIC program.
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: Programming in mathcad
There's no great trick to programming in Mathcad except to realize that there is only one result. All of the other assignments within the program are local only and cannot be used outside the program. Only the last statement is returned as the value. The result can be a matrix, so you can get other values from it.
Most of the programs I use in Mathcad are short ones that probably could be done cleverly without programming, but not nearly as clearly. I use the programs for clarity in documentation as much as anything else.
RE: Programming in mathcad
RE: Programming in mathcad
David
RE: Programming in mathcad
RE: Programming in mathcad
RE: Programming in mathcad
RE: Programming in mathcad
2nd the code should compute heat tranfer and temperature
variation in a steel sheet moving through a cooler (1m lenght) where it
is cooled by nitrogen at high speed.
h is the film coefficient evaluate in a condition of
forced convectione inside the cooler.
Of course it could be solved via differential equation
(but I'm not able to use them with mathcad).
thanks again
RE: Programming in mathcad
TTFN
FAQ731-376: Eng-Tips.com Forum Policies