• ×
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
  • ×
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
Guidelines
Seize the moment! nominate yourself or a tech enthusiast you admire & join the HP Community Experts!
Archived This topic has been archived. Information and links in this thread may no longer be available or relevant. If you have a question create a new topic by clicking here and select the appropriate board.
HP Recommended
HP Prime Calculator

Hello, first of all a bit of context. I'm an engineering student coursing heat transfer. I need a program that, given some variables it calculates teh solution of a system of equations numerically.

 

I've been trying for several days but i'm not used to the language of the calculator.

 

This is an example of one prtogram that I made, it doesn't work. The error message states that the arguments given to the fsolve function are not valid.

 

CODE BEGINS:

 

EXPORT eq1,eq2,eq3;
EXPORT q,TE,T2;
EXPORT Tuberia_aillant_variable2(RI,REXT,RMAX,L,LANM,TA,TV,HV)
BEGIN
LOCAL R1,R2,R3,R4;
R1:= 1/(HV*2*π*RI*L);
R2:= LN(REXT/RI)/(2*π*LANM*L);
R3:= LN(RMAX/REXT)/(2*π*L*(0.071+1.09ᴇ-4*((TE+T2)/2-294)));
R4:= 1/((6.88744+4.88ᴇ-2)*(TE-TA));

eq1:=q=(TV-T2)/(R1+R2);
eq2:=q=(T2-TA)/(R3+R4);
eq3:=q=(6.88744+4.88ᴇ-2)*(TE-TA);
RETURN CAS.solve([q=(TV-T2)/(R1+R2),q=(T2-TA)/(R3+R4),q=(6.88744+4.88ᴇ-2)*(TE-TA)],[TE,T2,q],[400,400,1137]);
END;

 

CODE ENDS:

 

 

Any idea why this does not work out?

 

As I said early, the idea is to make a simple using program that calculates the solution of a system of equantions (non linear) given a series of variables. If there is some other way to work this out I would be really happy to hear about that. I want to keep the same "structure" (basically, just changing the variables you can make the exercices).

 

Thanks a lot!

Archived This topic has been archived. Information and links in this thread may no longer be available or relevant. If you have a question create a new topic by clicking here and select the appropriate board.
† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the <a href="https://www8.hp.com/us/en/terms-of-use.html" class="udrlinesmall">Terms of Use</a> and <a href="/t5/custom/page/page-id/hp.rulespage" class="udrlinesmall"> Rules of Participation</a>.