Howell Mann Leak Rate Equation Iterative Solve

Howell Mann Leak Rate Equation Iterative Solve - I know R, how can I reverse calculate L - Сообщения

#1 Опубликовано: 17.01.2014 17:57:21
rattler1975

rattler1975

0 сообщений из 13 понравились пользователям.

Группа: User

I am new to SMath. So far it's great I am impressed. I've been searching the forums for a solution to my situation. I haven't found anything yet.

Can someone educate me on this?

Any help would be greatly appreciated.

Here's a screenshot:



I know R from our mass spec measurements. I need to go back and find L (the actual leak rate of the device). There is no way to solve for L directly.

The answer for R=3.4*10^-9, L=5.612*10^-8... this is from a lot of work on my TI-85... I'm not 100% sure it's right...
Leak Rate Calculation.sm (6 КиБ) скачан 58 раз(а).
#2 Опубликовано: 17.01.2014 18:04:06
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: Moderator

You might try the Maxima-Plugin
solve.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#3 Опубликовано: 17.01.2014 18:05:15
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: Moderator

You might try the Maxima-Plugin.
solve.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#4 Опубликовано: 17.01.2014 18:29:11
rattler1975

rattler1975

0 сообщений из 13 понравились пользователям.

Группа: User

Thanks, I'm not sure this solves my problem. This looks like it rearranged the equation, but did not solve for L.
#5 Опубликовано: 18.01.2014 04:22:04
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: Moderator

You are right, I did not really inspect the result, sorry for that. Here is another proposal.
Bisection.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#6 Опубликовано: 18.01.2014 04:22:15
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Hello,

Martin suggests that you try to find L symbolically. Maxima returns L=f(L) which means that the function is nonlinear. Then you will go for a numerical solution. Numerical equations could be tricky. The best is first to try to plot it - to see the possible guess values and to see if there might be more solutions. See the pictures with the Maxima's L=f(L) rearanged equation and with your original (try to avoid so many braces - it is not needed). The second picture is with your original equation. This one is much more problematic for numerical solving. It seems that you need quite good guess value to get the second solution or you are going to get some value around zero, which is another solution (see the pictures). If you try to rearrange the eqaution is some other way, you might get no solution at all.

I do not know if this solution even have sense to you. There is another problem.

Regards,
Radovan
Leak Rate Calculation-1.sm (30 КиБ) скачан 47 раз(а).
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#7 Опубликовано: 18.01.2014 07:46:10
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: Moderator

The equation has two solutions. Plotting the function f(L) is not very easy in the built-in plot region. Here is an example for how this can be done using the Maxima-Plugin. Not user-friendly either, but full control provided.
Leak_draw.sm (16 КиБ) скачан 45 раз(а).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 пользователям понравился этот пост
Radovan Omorjan 18.01.2014 09:57:00
#8 Опубликовано: 18.01.2014 08:23:30
rattler1975

rattler1975

0 сообщений из 13 понравились пользователям.

Группа: User

This awesome. I know for certain that the solution for L when R= 3.4x10^-9, is 5.614x10^-8.

So it appears there are many ways to get there. This is the first time I've used the program and I'm excited about all the possibilities. I'm going to try them all just to learn some more.

Thanks again!
#9 Опубликовано: 18.01.2014 08:34:03
rattler1975

rattler1975

0 сообщений из 13 понравились пользователям.

Группа: User

I keep getting "L - not defined." Any suggestions?

Also, I tried to install the nonlinear solvers via the extensions manager and it asked for a password. I was able to download the plugin via the SVN, but I'm not sure how to install it that way. Any suggestions?
#10 Опубликовано: 18.01.2014 09:46:57
rattler1975

rattler1975

0 сообщений из 13 понравились пользователям.

Группа: User

Wrote

The equation has two solutions. Plotting the function f(L) is not very easy in the built-in plot region. Here is an example for how this can be done using the Maxima-Plugin. Not user-friendly either, but full control provided.



I get "failed to load" error... any ideas?
#11 Опубликовано: 18.01.2014 09:59:23
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Wrote

Wrote

The equation has two solutions. Plotting the function f(L) is not very easy in the built-in plot region. Here is an example for how this can be done using the Maxima-Plugin. Not user-friendly either, but full control provided.



I get "failed to load" error... any ideas?



Martin's example works perfectly for me. A nice one to see the possibility of Maxima and draw package in SMath. Thank you Martin

I suppose that here is the problem with Maxima plugin. Not loaded correctly or not installed at all.

@rattler1975 - did you install Maxima itself and the Maxima plugin anyway? When you tried to open these files from me and Martin, is there any error about missing plugins.? If you do not know how to use it and you need it - just see the Martin's Handbook. There you will also find how to solve nonlinear equations as well (with or without Maxima).

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#12 Опубликовано: 18.01.2014 10:09:48
rattler1975

rattler1975

0 сообщений из 13 понравились пользователям.

Группа: User

Wrote

Wrote

Wrote

The equation has two solutions. Plotting the function f(L) is not very easy in the built-in plot region. Here is an example for how this can be done using the Maxima-Plugin. Not user-friendly either, but full control provided.



I get "failed to load" error... any ideas?



Martin's example works perfectly for me. Thank you Martin

I suppose that here is the problem with Maxima plugin. Not loaded correctly or not installed at all.
@rattler1975 - did you install Maxima plugin anyway?

Regards,
Radovan



I'm sure you are correct about my installation of Maxima not being correctly installed as I can't get the bisection function to work either. Maxima is install, version 5.31.2. It is installed here: C:\Maxima-5.31.2\

For the Leak_draw.sm file, when I open the Bisection(Eqn,0,10^-6,10^-15) part is red and says, "L-not defined." Same for FindRoot.

Then for Maxima(load(draw)) it says, "failed to load, C:/Maxima-5.31.2/share/maxima/5.31.2/share/draw/draw.lisp - an error. To debut this try: debugmode(true):"

I've run the "maximacontrol(settings)" and it finds the maxima.bat file. It appears to be working. So I am now confused.



#13 Опубликовано: 18.01.2014 10:17:06
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Here is the part of the Martin's file. Do you have problems here?

By the way, Bisection() and FindRoot() are not part of Maxima plugin. Moreover, I have no idea why do you have the "L-not defined" error here. Actually, L should not be defined here if you want to find the solution for L.

EDIT: Ah yes, I missed one of your post before. It seems that the NonlinearSolvers plugin is not instaleed correctly. NonlinearSolvers from Plugins Galery can be installed when you used this password NonlinearSolvers - see (this post)
Leak_draw.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
1 пользователям понравился этот пост
Davide Carpi 18.01.2014 13:13:00
#14 Опубликовано: 18.01.2014 13:42:38
rattler1975

rattler1975

0 сообщений из 13 понравились пользователям.

Группа: User

Wrote

Here is the part of the Martin's file. Do you have problems here?

By the way, Bisection() and FindRoot() are not part of Maxima plugin. Moreover, I have no idea why do you have the "L-not defined" error here. Actually, L should not be defined here if you want to find the solution for L.

EDIT: Ah yes, I missed one of your post before. It seems that the NonlinearSolvers plugin is not instaleed correctly. NonlinearSolvers from Plugins Galery can be installed when you used this password NonlinearSolvers - see (this post)



Sweet, adding the nonlinearSolvers plugin got me past the Bisection() and FindRoot() part. At this point I think I have my answer, but the plot is cool and I am going to have to figure that part out. For some reason I'm getting the "failed to load" problem still...

#15 Опубликовано: 18.01.2014 14:02:54
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: Moderator

Wrote



For the Leak_draw.sm file, when I open the Bisection(Eqn,0,10^-6,10^-15) part is red and says, "L-not defined." Same for FindRoot.

Then for Maxima(load(draw)) it says, "failed to load, C:/Maxima-5.31.2/share/maxima/5.31.2/share/draw/draw.lisp - an error. To debut this try: debugmode(true):"

I've run the "maximacontrol(settings)" and it finds the maxima.bat file. It appears to be working. So I am now confused.


L not defined: I can just guess. If it happens with Solve, then possibly you use numeric optimization when displaying results. In the context menu (right mouse button) of the math region, you find an item "Optimization". This is ususlly set to "numeric", meaning that SMath Studio tries to display numeric values and eventually units of measurement.
Solve() returns the result as boolean equations "variable = value". This requires setting optimization to "symbolic" or "none" for proper display.

As to the load problem: It is essential that you use Maxima 5.31.1-1 instead of 5.31.2. I have no idea why, but that is the solution.

BTW, if you use the portable SMath distribution (see my signature), then you have most plugins pre-installed and access to a built-in handbook (Help> Reference book) with over 500 interlinked SMath sheets, some of them covering Maxima features.

Currently, I am updating the german pdf handbook (new chapter on SMath with Maxima including graphics examples). It might be useful, even if you do not speak german.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#16 Опубликовано: 18.01.2014 14:28:12
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Wrote


BTW, if you use the portable SMath distribution (see my signature), then you have most plugins pre-installed and access to a built-in handbook (Help> Reference book) with over 500 interlinked SMath sheets, some of them covering Maxima features.

Currently, I am updating the german pdf handbook (new chapter on SMath with Maxima including graphics examples). It might be useful, even if you do not speak german.


You can have both SMath versions installed. The official one and Martin's unofficial with plugins included.
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#17 Опубликовано: 18.01.2014 16:28:43
rattler1975

rattler1975

0 сообщений из 13 понравились пользователям.

Группа: User

Wrote

Wrote



For the Leak_draw.sm file, when I open the Bisection(Eqn,0,10^-6,10^-15) part is red and says, "L-not defined." Same for FindRoot.

Then for Maxima(load(draw)) it says, "failed to load, C:/Maxima-5.31.2/share/maxima/5.31.2/share/draw/draw.lisp - an error. To debut this try: debugmode(true):"

I've run the "maximacontrol(settings)" and it finds the maxima.bat file. It appears to be working. So I am now confused.


L not defined: I can just guess. If it happens with Solve, then possibly you use numeric optimization when displaying results. In the context menu (right mouse button) of the math region, you find an item "Optimization". This is ususlly set to "numeric", meaning that SMath Studio tries to display numeric values and eventually units of measurement.
Solve() returns the result as boolean equations "variable = value". This requires setting optimization to "symbolic" or "none" for proper display.

As to the load problem: It is essential that you use Maxima 5.31.1-1 instead of 5.31.2. I have no idea why, but that is the solution.

BTW, if you use the portable SMath distribution (see my signature), then you have most plugins pre-installed and access to a built-in handbook (Help> Reference book) with over 500 interlinked SMath sheets, some of them covering Maxima features.

Currently, I am updating the german pdf handbook (new chapter on SMath with Maxima including graphics examples). It might be useful, even if you do not speak german.



I downloaded the portable distro, thanks. I also found the 5.31.1-1 version of Maxima and that fixed my problems. The portable version works great as well.

Thanks both mkraska & omorr, you guys really know your stuff.
#18 Опубликовано: 18.01.2014 16:42:52
rattler1975

rattler1975

0 сообщений из 13 понравились пользователям.

Группа: User

Wrote

Wrote



For the Leak_draw.sm file, when I open the Bisection(Eqn,0,10^-6,10^-15) part is red and says, "L-not defined." Same for FindRoot.

Then for Maxima(load(draw)) it says, "failed to load, C:/Maxima-5.31.2/share/maxima/5.31.2/share/draw/draw.lisp - an error. To debut this try: debugmode(true):"

I've run the "maximacontrol(settings)" and it finds the maxima.bat file. It appears to be working. So I am now confused.


L not defined: I can just guess. If it happens with Solve, then possibly you use numeric optimization when displaying results. In the context menu (right mouse button) of the math region, you find an item "Optimization". This is ususlly set to "numeric", meaning that SMath Studio tries to display numeric values and eventually units of measurement.
Solve() returns the result as boolean equations "variable = value". This requires setting optimization to "symbolic" or "none" for proper display.

As to the load problem: It is essential that you use Maxima 5.31.1-1 instead of 5.31.2. I have no idea why, but that is the solution.

BTW, if you use the portable SMath distribution (see my signature), then you have most plugins pre-installed and access to a built-in handbook (Help> Reference book) with over 500 interlinked SMath sheets, some of them covering Maxima features.

Currently, I am updating the german pdf handbook (new chapter on SMath with Maxima including graphics examples). It might be useful, even if you do not speak german.



Thank, I got the handbook. I wish I knew German. I'm looking through it now.
#19 Опубликовано: 19.01.2014 22:10:36
rattler1975

rattler1975

0 сообщений из 13 понравились пользователям.

Группа: User

I've been screwing around and tried to make an executable file. My computer freezes up when I try to run it. Anyone know why this happens? I know in one screen shot I have multiple solvers, but it happens when I just have one as well.





By the way, the last value that is being solved for is the actual leak rate of the device.
#20 Опубликовано: 20.01.2014 14:03:24
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Hello,

You can upload here one of your *sm files which freezes up your computer. We could confirm this or not. I do not know what else we can do about it.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений