HP Forums
How to print out chemical equation - 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: How to print out chemical equation (/thread-7738.html)



How to print out chemical equation - mop80087 - 02-07-2017 02:32 PM

Hi All,

I'd like to make a simple program to my prime for a chemical equation, but i don't find
the best way to print out the formula of the image:

[Image: untitled-jpg--391]
https://uploaddeimagens.com.br/imagens/untitled-jpg--391

m and n are var's and n1, n2, n3, n4 are solutions...
What is your best option to print out a chemical equation?

Cumprimentos/Sincères salutations/Cordiali saluti/
Best regards/Mit freundlichen Grüßen/Saludos
Diamantino Valente
Portugal


RE: How to print out chemical equation - mop80087 - 02-07-2017 02:46 PM

I only need your suggestion so that it looks, graphically, with a chemical equation when print out.

Whith TEXTOUT_P() or PRINT() or other...


RE: How to print out chemical equation - compsystems - 02-07-2017 03:51 PM

print("CmHn+n₃(O₂+3.76N₂) → n₁CO₂+n₂H₂0+n₃N₂"); [enter] But makes a line adjustment =( The terminal view does not have a horizontal scroll


RE: How to print out chemical equation - mop80087 - 02-08-2017 08:59 AM

(02-07-2017 03:51 PM)compsystems Wrote:  print("CmHn+n₃(O₂+3.76N₂) → n₁CO₂+n₂H₂0+n₃N₂"); [enter] But makes a line adjustment =( The terminal view does not have a horizontal scroll

Compsystems, thanks for the reply...
...but what I'm trying to look for it's print friendly chemical equation


RE: How to print out chemical equation - mop80087 - 02-08-2017 11:55 AM

Working on...
PHP Code:
EXPORT COMBUSTAO()
BEGIN

LOCAL M
,N,R;
LOCAL n1,n2,n3,n4;
LOCAL n5,n6,n7,n8;
PRINT;
INPUT({{M,[0],{35,30,2}},{N,[0],{35,30,3}},{R,[0],{35,30,4}}},"COMBUSTÃO",{"Carbono =","Hidrogénio =","Rendimento ="},{"Introduza Nº Átomos Carbono","Introduza Nº Átomos Hidrogénio","Introduza Rendimento"});
   
   
n1:=ROUND(M,3);
   
n2:=ROUND(N/2,3);
   
n4:=ROUND(M+(N/4),3);
   
n3:=ROUND((3.76*n4)/2,3);

   
n5:=ROUND((1+(R/100))*(M+(N/4)),3);
   
n6:=ROUND((3.76*n4)/2,3);
   
n7:=ROUND((R/100)*n4,3);

   
n8:=ROUND(n5*(2*3.76*14+2*16)/((12*M)+(1*N)),3);
   
PRINT(
"");
PRINT(
"Equação teorica:");
PRINT(
"C"+M+"H"+" + "+n4+"(O2+3.76N2) ->");
PRINT(
"                  "+n1+"CO2 + "+n2+"H20 + "+n3+"N2");
PRINT(
"");
PRINT(
"");
PRINT(
"Com rendimento= "+R+"%");
PRINT(
"Equação real:");
PRINT(
"C"+M+"H"+" + "+n5+"(O2+3.76N2) ->");
PRINT(
"                  "+n1+"CO2 + "+n2+"H20 + "+n6+"N2 + "+n7+"O2");
PRINT(
"");
PRINT(
"Relação Ar-Combustivel");
PRINT(
"(AC) "+n8+"="+n5+"*(2*3.76*14+2*16)/((12*"+M+")+(1*"+N+"))");

WAIT(-1);

END



RE: How to print out chemical equation - RickP330 - 01-15-2023 09:10 PM

Hello all,
I know this is an old thread, but I'm very interested in this topic. Has a combustion type app program been written on this? Anything you are willing to share?
RickP