Is it possible to analyze the result of the solve function ?

Is it possible to analyze the result of the solve function ? - Messages

#1 Posted: 9/29/2024 4:59:55 AM
francesco rapuano

francesco rapuano

12 likes in 38 posts.

Group: User

Hi,
I would like to know if is possible programmaticaly test the result of the application of the solve function/ when there is no solution and generally the program stops going in error ).
For instance I want to check if a parabola intersect the x axis in a well defined interval , I know this is very simple but I am NOT interested to find the possible solutions but just to knopw if one or more solutions exist or not .
To tell the truth I am more interested to know that a solution doesn't exist; in my real problem I have a function in a tabular form that is the Enthalpy of a mixture Air-water in the range 10-60 °C and I need to check that a segment doesn't intersect it;
this means that in that interval where the segment is defined the function obtained equating the Enthalpy of a mixture Air-water curve to the equation of the line whose segment belong to doesn't have any zeroes .....but applying the solve function I have the error "no real solution" and I would like to know if programmaticaly I can intercept this error and display a message like the following "the segment doesn't intercept the curve" and this means that the input data for the problem I am dealing with are correct .
Hope that I was able to explain my need and thank in advance to anyone that will give a feedback on how to address this issue .

Best regards

Franco
#2 Posted: 9/29/2024 3:23:03 PM
StvMath

StvMath

35 likes in 56 posts.

Group: User

One option is as follows:

Intersection.png

However, the error might still be due to something other than a non-intersection.
#3 Posted: 9/29/2024 3:51:41 PM
francesco rapuano

francesco rapuano

12 likes in 38 posts.

Group: User

Thanks a lot for your answer .
I'll start from it to buil my solution ; in the reality the segment is the operating line of a Cooling tower (that is a segment in the Merkel model) and if the operating line intersect the curve of the Entalpy of the Moist air means that the operators in the field have incorrectly taken the data about the Inlet and Outlet Water temperature and/ or of the Inlet and Outlet Wet bulb temperature of the Air( it is enough that one of these 4 data are wrong and the results are messy).
I'll try to put this error message in a conditionally formatted Text(Label) to be more explicit in its description so that it is easier from a point of view of an operator to understand what is happening (together with a graphical rapresentation of the whole)

Thanks again and best regards ( and sorry for my poor English)

Franco
#4 Posted: 9/29/2024 3:52:29 PM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

solve-lasterror.png
Russia ☭ forever, Viacheslav N. Mezentsev
#5 Posted: 9/29/2024 5:23:31 PM
francesco rapuano

francesco rapuano

12 likes in 38 posts.

Group: User

Thanks a lot uni, now need to put everything in a conditionally formatted label and check the type of output if is a string or a number(s) to change the displayed message.

Best regards

Franco
  • New Posts New Posts
  • No New Posts No New Posts