1 Pages (9 items)
Problem using the Bisection solver - Messages
#1 Posted: 2/17/2014 4:31:40 PM
Hi Davide
I am trying to use the bisection function to find the solution of a non linear equation .
Attached is the file developed and herewith there is the critical part where I have problems.
The message says that T_°C - not defined

Now the only strange thing that I can imagine is that the Delta_NTU(T_WaterOut) is defined using an integral and the integral contains the reference to T_°C as the integration variables .
Now in the first part of the page the NTU calculation is OK so make me wonder that later on there are other issues ..or in the nonlinear solvers is not possible to use a variable that is an intermediate to find an integral.
Any help to modify or find a workaround is wellcome.
Sorry for my poor explanation and thanks in advance for your help.
Franco
Entalpy_Data.zip (24 KiB) downloaded 33 time(s).
I am trying to use the bisection function to find the solution of a non linear equation .
Attached is the file developed and herewith there is the critical part where I have problems.
The message says that T_°C - not defined

Now the only strange thing that I can imagine is that the Delta_NTU(T_WaterOut) is defined using an integral and the integral contains the reference to T_°C as the integration variables .
Now in the first part of the page the NTU calculation is OK so make me wonder that later on there are other issues ..or in the nonlinear solvers is not possible to use a variable that is an intermediate to find an integral.
Any help to modify or find a workaround is wellcome.
Sorry for my poor explanation and thanks in advance for your help.
Franco
Entalpy_Data.zip (24 KiB) downloaded 33 time(s).
#2 Posted: 2/17/2014 6:13:17 PM
Hello Franco 
I know, there's a problem with the processing order of the unknowns (this involves integrals, derivatives and nested solvers)... I'll try to solve it but is not easy and needs a full dive into this plugin, so will be done ASAP but not immediatly...
best regards,
Davide
@omorr/@uni should be better to merge this 3D with the official discussion about the NonlinearSolvers plugin (thank you both)

I know, there's a problem with the processing order of the unknowns (this involves integrals, derivatives and nested solvers)... I'll try to solve it but is not easy and needs a full dive into this plugin, so will be done ASAP but not immediatly...

best regards,
Davide
@omorr/@uni should be better to merge this 3D with the official discussion about the NonlinearSolvers plugin (thank you both)
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#3 Posted: 2/17/2014 6:55:10 PM
Franco, you might have a look at the steam tables which come with the Mathcad EFI plugin by uni. Everything is pre-installed in the inofficial portable distribution (see signature). It is not yet updated to SMath 0.97.
In order to keep your files portable, I would recommend to use relative names for file operations. In order to reliably set the current directory to that of your SMath document, you can use
dir:=CurrentDirectory(DocumentDirectory(""))
Also, using units might help to keep the sheet comprehensible. You might give the Maxima plugin a try for integration and solving, both can be done with units. However, I never tested the steam table features in combination with Maxima.
Section Steamtables 0.3. Example.sm (32 KiB) downloaded 49 time(s).
In order to keep your files portable, I would recommend to use relative names for file operations. In order to reliably set the current directory to that of your SMath document, you can use
dir:=CurrentDirectory(DocumentDirectory(""))
Also, using units might help to keep the sheet comprehensible. You might give the Maxima plugin a try for integration and solving, both can be done with units. However, I never tested the steam table features in combination with Maxima.
Section Steamtables 0.3. Example.sm (32 KiB) downloaded 49 time(s).
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#4 Posted: 2/18/2014 2:42:24 AM
@ Davide
Thanks a lot for your replay. I'll wait a new release of the Non Linear Solvers hoping that the issue reported will be solved.
I imagine that is not so simple and it will take time to be analyzed and developed .
Apart from this I would like to simply tank you, Omorr and Martin and Uni ( Andrey is implicit ) for the huge work of pushing ahead the development of SMath ...I and I guess all appreciate your big involvment in this activity.
Always about Non Linear Solvers what make me wonder is that using the Bisections_testing.sm file available downloading your plug-in ..what make me wonder is that ( see attached image ) that some parts are working and some not giving as error message that x- not defined.
I don't want that there is something not correct linked to my installation too , even if I I am just using under Windows 7 the last Portable unofficial release from Martin.
Last point ..I was trying by myself to write my post under the Non Linear Solver extension topic ( for obvious reasons ) ..without suceeding , probably this is a too newbie question ..but How is possible to do this, just to avoid the same error the next time ?
@ Martin
Thanks for your suggestions about using the steam table for Mathcad , I guessed that they were not free and that after a period of time it was not possible to use them any more ( probably i remember wrongly some discussions from Uni about this topic or similar ones )
I'll give them a try and I will try to solve my problem with the Maxima plugin too.
To tell the truth I have thought to this approach initially but I tried to resist to this idea because I feel this plug-in a little bit intimidating ( this forth and back of language conversion Maxima <-> SMath looks at a first impression very delicate and reliable only for people that know its internals in any details ...i.e to the developers)
My last attempt will be to try to interpolate the Heltalpy data in the range of interest 15-40 °C and try to see if is possible to find in a closed form an expression for the NTU integral ...but this is another story.
Thanks again to you all for your help and best regards
Franco

Thanks a lot for your replay. I'll wait a new release of the Non Linear Solvers hoping that the issue reported will be solved.
I imagine that is not so simple and it will take time to be analyzed and developed .
Apart from this I would like to simply tank you, Omorr and Martin and Uni ( Andrey is implicit ) for the huge work of pushing ahead the development of SMath ...I and I guess all appreciate your big involvment in this activity.
Always about Non Linear Solvers what make me wonder is that using the Bisections_testing.sm file available downloading your plug-in ..what make me wonder is that ( see attached image ) that some parts are working and some not giving as error message that x- not defined.
I don't want that there is something not correct linked to my installation too , even if I I am just using under Windows 7 the last Portable unofficial release from Martin.
Last point ..I was trying by myself to write my post under the Non Linear Solver extension topic ( for obvious reasons ) ..without suceeding , probably this is a too newbie question ..but How is possible to do this, just to avoid the same error the next time ?
@ Martin
Thanks for your suggestions about using the steam table for Mathcad , I guessed that they were not free and that after a period of time it was not possible to use them any more ( probably i remember wrongly some discussions from Uni about this topic or similar ones )
I'll give them a try and I will try to solve my problem with the Maxima plugin too.
To tell the truth I have thought to this approach initially but I tried to resist to this idea because I feel this plug-in a little bit intimidating ( this forth and back of language conversion Maxima <-> SMath looks at a first impression very delicate and reliable only for people that know its internals in any details ...i.e to the developers)
My last attempt will be to try to interpolate the Heltalpy data in the range of interest 15-40 °C and try to see if is possible to find in a closed form an expression for the NTU integral ...but this is another story.
Thanks again to you all for your help and best regards
Franco
#5 Posted: 2/18/2014 3:05:55 AM
....a last observation for what concern units , this is my first project after a long period with SMath and this involves the usage of °C.
Because I have had problems with the conversion and the usage of this units when you need to evaluate differences ..at least at the beginning I have preferred to avoid the usage of units or to write them as text ..even if this is not very intelligent and elegant.
This after reading all the threads about the usage of temperature units and delta temperature issues that are in the forum.
Probably about this topic is necessary a definitive tutorial and guidelines for new users.
Best regards
Franco
Because I have had problems with the conversion and the usage of this units when you need to evaluate differences ..at least at the beginning I have preferred to avoid the usage of units or to write them as text ..even if this is not very intelligent and elegant.
This after reading all the threads about the usage of temperature units and delta temperature issues that are in the forum.
Probably about this topic is necessary a definitive tutorial and guidelines for new users.
Best regards
Franco
#6 Posted: 2/18/2014 4:58:21 AM
Hello Franco,
I mentioned this quite a lot of times on this Forum. If you interpolate your data (say with spline interpolation), and then use integration, derivation, root finding, use eval() etc., you will probably get into troubles, like you did. There is no simple solution of this problems and, unfortunately, I have the impression that this will not be solved in the near future. I think this is partly due to the internal SMath core and the way it is working.
As you said, if you can get everything in a closed form, there is quite a chance that you will get the solution. But, if your results are strictly obtained by a numerical procedure - problems will arise.
Regards,
Radovan
I mentioned this quite a lot of times on this Forum. If you interpolate your data (say with spline interpolation), and then use integration, derivation, root finding, use eval() etc., you will probably get into troubles, like you did. There is no simple solution of this problems and, unfortunately, I have the impression that this will not be solved in the near future. I think this is partly due to the internal SMath core and the way it is working.
As you said, if you can get everything in a closed form, there is quite a chance that you will get the solution. But, if your results are strictly obtained by a numerical procedure - problems will arise.
Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#7 Posted: 2/18/2014 6:47:01 AM
WroteProbably about this topic is necessary a definitive tutorial and guidelines for new users.
For the time being we have just this (install Interactive Book from Extension manager in 0.97, then use Help> Reference Book> Units of measurement> Temperature)
I took the opportunity to clean up this page a little, thus it might be worth an update from the online gallery.
Section units temperature.sm (16 KiB) downloaded 46 time(s).
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#8 Posted: 2/18/2014 7:00:53 AM
Wrote
I'll give them a try and I will try to solve my problem with the Maxima plugin too.
To tell the truth I have thought to this approach initially but I tried to resist to this idea because I feel this plug-in a little bit intimidating ( this forth and back of language conversion Maxima <-> SMath looks at a first impression very delicate and reliable only for people that know its internals in any details ...i.e to the developers)
Yes, the plugin is still under construction.
For integration and differentiation of tabular data I recommend the convolution and deconvolution functions from the alglib plugin. See interactive book> plugins> Alglib
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 Pages (9 items)
-
New Posts
-
No New Posts