HP Forums
Create an HP program - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Create an HP program (/thread-15445.html)

Pages: 1 2


Create an HP program - pallas23 - 08-08-2020 02:13 PM

I'm Santiago, a mechanical engineering student from UdelaR, Uruguay.

Nowadays I'm making my first subject about energy, more specifically Combustion. I've done a program in excel to calculate the temperature of the flame, that also could be useful to calculate other things such as energy balances, and some other things. I don't know how to make it a program for the HP, so I did it in excel. If anyone could make it for the calculator I'm sure it will be really useful for the community.

my email is santipallasatore@gmail.com


RE: Create an HP program - pinkman - 08-09-2020 12:02 AM

Could you share with us the formulas used in the Excel sheet?


RE: Create an HP program - Valentin Albillo - 08-09-2020 01:00 AM

.
Hi. Santiago, welcome to the forum:

I can't help with the Prime, sorry, but I'd advise you to not post your e-mail address in clear, ever, because you risk malware, spammer robots and the like to harvest it and use it for spamming or worse. Never post your e-mail in clear, like you did here.

The safe way is to ask people able and willing to help to send you a private message (PM) and then you can tell them your email address in another PM, if desired.

I suggest you edit your post as soon as possible, to remove your e-mail address before it's too late.

Regards from Spain.
V.


RE: Create an HP program - grsbanks - 08-09-2020 08:07 AM

Chances are, this is a "fire and forget" post.


RE: Create an HP program - Chr Yoko - 08-09-2020 02:18 PM

Hope he is not planning to work on ICEs (internal combustion engines).
No future there, no more new major developments worldwide.
It is more like a "run to the exits" situation.

Gas turbines for power generation does not look much better.
He should also avoid those pesky coal burning power plants swallowing over 50 000 Tons of coal a day....

Then maybe aeronautics or industrial applications ?


RE: Create an HP program - pallas23 - 08-09-2020 03:31 PM

(08-09-2020 12:02 AM)pinkman Wrote:  Could you share with us the formulas used in the Excel sheet?
May I explain a little how it works, and if you could make it for the calculator I'm sure it will be really useful for the community.

I imported 2 tables, one with the enthalpy (for process with constant Pressure), and other with internal energy (for process with constant Volume) both at 25C and 1atm.You have to fill the lockers in the N columb, being alpha the amount of O2, beta CO2, gamma H2O, delta SO2, mu N2, nu O2, epsilon CO, and theta H2.Then you fill the hfg or ufg with the value of the enthalpy (or internal energy) of evaporation of the water, here the people must be very careful to use the same units with the coefficients and hfg.

With all of this done, you have all the values of the Q (heat) for different temperatures.
Then in the Q4 cell, you can add the quantity of Q you have. This is for calculating the coefficients, and the program will tell you (Marking ESTE in the L column) with Temperature is the nearest. When this temperature is the same as the one you assumed, you have found it. But when it is different you don't, and you have to try again with another temperature, but knowing the nearest Temperature, to try to, is really useful to save time iterating.

Please, if you can do it, or have any questions let me know.


RE: Create an HP program - Valentin Albillo - 08-09-2020 03:57 PM

(08-09-2020 02:18 PM)Chr Yoko Wrote:  Hope he is not planning to work on ICEs (internal combustion engines).
[...]
Then maybe aeronautics or industrial applications ?

"Influencer" or "YouTuber" is the way nowadays to make easy money without having to study or even work.

Just buy a ton of "likes" for a few bucks and you're all set up ... Smile

V.


RE: Create an HP program - pinkman - 08-09-2020 09:33 PM

Please Santiago, modify your first post to suppress your email address, and let me a few hours to work on your excel sheet, good subject for the holidays even if, like others, I wish a world without (too much) combustion...

(08-09-2020 02:18 PM)Chr Yoko Wrote:  Hope he is not planning to work on ICEs (internal combustion engines).
No future there, [...]

Combining optimization and miniaturisation leaded to hybrid vehicles which are a good transition to cleaner forms of energy. I think there is still a lot to do.


RE: Create an HP program - pinkman - 08-10-2020 08:43 AM

Santiago,
I have a few questions:

Are some of the reference table columns linked by a formula or an equation? I guess the temperature in degrees and K are related by +273,15, but are there other relations that could help simplify the reference data?

Can you give me représentative values of the alpha to theta values, and also hfg?

You don’t seem to use alpha, is this a feature or a bug?


RE: Create an HP program - Chr Yoko - 08-10-2020 12:32 PM

(08-09-2020 09:33 PM)pinkman Wrote:  Combining optimization and miniaturisation leaded to hybrid vehicles which are a good transition to cleaner forms of energy. I think there is still a lot to do.

Correct !
MHEV ; HEV and PHEV are a great piece of engineering :
All major OEMs have their own versions in production or soon to be within a couple years.
They achieved some great fuel economies and emission reduction.
However, those require some additionnal system complexity to make the electric machines work seemlessly together with an ICE, and it has a cost.
Also the exhaust line and its "gas plant" is still needed.
With a special mention to diesel with their urea injection requirements that keeps growing so much that next generation will require an additionnal process to remove amoniac from tail pipe...
In parrallel, you get BEV that keeps improving in cost and efficiency.
Battery cells are now contracted bellow $100/kWh , meaning that soon or late , an hybrid ICE will cost more than its BEV equivalent.
As a consequence, OEMs are now freezing all new developments on ICE, just completing actual projects still in the [/u]pipeline if they don't require huge production investments.

History is just accelerating in front of us ! Great time to be an engineer ;-)


RE: Create an HP program - Chr Yoko - 08-10-2020 12:44 PM

@Santiago

the excel contains just raw data, does it means that it is built from experimental measurement into the combustion chamber ?

do you need a correlation formula ?

no NOx measurements ? (even H2 combustion in air is producing some NOx )


RE: Create an HP program - pinkman - 08-10-2020 01:25 PM

Having a correlation formula will dramatically improve and simplify the program.


RE: Create an HP program - roadrunner - 08-10-2020 03:32 PM

Attached is a spread sheet that seems to give results similar to the V cte tab in the OP's excel spreadsheet. It's not thoroughly tested, so use at your own risk.

[attachment=8695]

-road


RE: Create an HP program - pinkman - 08-22-2020 10:27 PM

12 days since the OP’s last visit, seems he’s not interested anymore with his subject.


RE: Create an HP program - pallas23 - 08-24-2020 06:37 PM

(08-10-2020 12:44 PM)Chr Yoko Wrote:  @Santiago

the excel contains just raw data, does it means that it is built from experimental measurement into the combustion chamber ?

do you need a correlation formula ?

no NOx measurements ? (even H2 combustion in air is producing some NOx )

Yes, its built from experimental measurements.


RE: Create an HP program - pallas23 - 08-24-2020 06:44 PM

(08-10-2020 08:43 AM)pinkman Wrote:  Santiago,
I have a few questions:

Are some of the reference table columns linked by a formula or an equation? I guess the temperature in degrees and K are related by +273,15, but are there other relations that could help simplify the reference data?

Can you give me représentative values of the alpha to theta values, and also hfg?

You don’t seem to use alpha, is this a feature or a bug?

Alpha to theta values are the coefficients of the products of combustion, each one represent the amount of each specie. The hfg is the enthalpy that needs the water to evaporate.
The alpha is useless I just put it in the excel for comfort and for avoiding mistakes


RE: Create an HP program - pinkman - 08-24-2020 08:37 PM

Ok thanks for answering, I’ll take a look.


RE: Create an HP program - pinkman - 08-24-2020 09:21 PM

Santiago,
If there is no correlation between cells in one row, the resulting app will essentially be a huge reference table with a small algorithm to highlight the right row and corresponding values. It will be hard to maintain, as the Prime calc is not designed to edit big spreadsheet tables.
I don’t share your motivation to have this in a calculator. Using Excel on a smartphone will be better, don’t you think? Or am I missing something?


RE: Create an HP program - roadrunner - 08-26-2020 11:43 AM

Would a smart phone be allowed on an exam?


RE: Create an HP program - pinkman - 08-26-2020 12:33 PM

I did not understand it was for an exam.
Maybe we could simply start with the simple formula and no use of the reference table. It will be calculator (and exam) compatible. But I need more inputs and reactivity from Santiago.