Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hallo,
i have a Formula to calculate the elastic plastic transition diameter for autofrettage:
Dp is the elastic plastic diameter. The problem is i need to plement the calculation for DP into microsoft excel.
I need a formula to directly calculate DP. Now im using the solve function in excel but the solver is not trustable and does not give always a result where a result is calculateable.
Is there a way to transform the equation so that DP=..... for microsoft excel?
Transforming gives this block in Mathcad
where RE Yield Stress @20°C
Di inside diameter
Re Outside diameter
lg
Stefan
Solved! Go to Solution.
Maybe you don't have to dig into the subject that deep.
What about this thread
http://www.office-loesung.de/ftopic524762_0_0_asc.php
and the link in the first post.
Or maybe this ready made plug-in can be useful: https://github.com/mdscheuerell/Lambert-W-in-Excel
The function you found using mathcad uses the LambertW() function. Please find out first if Excel knows/supports that function.
The conversion to string should not be difficult. If you save your files as Mathcad 11, I can (try to) convert it to string just like:
But... As said: Your Excel needs to support the LambertW function, and I have my doubts about that...
Success!
Luc
Excel seems not to include a ready made Lambert-W function but if you search the net you'll find a lot of links showing how to implement that function (e.g.: http://bfy.tw/MA2i)
The rest seems to be just a lot of tedious and failure prone typing work but, alas, we know that Excel sure is not the right tool for math and engineering work.
You may also want to simplify the formula first. E.g. Re cancels and does not have any influence. You also can cancel De^2, etc. This sure would make it a bit easier to convert the formula.
I don't see Re cancel, You can divide it on P, to make life simpler. But you can do the same with 2/sqrt(3)...
Anyway, I put the equation in Mathcad 11, solved it and converted it to string:
And to save the tedious retyping here is the string:
1/(-Di^2/De^2/LambertW(-Di^2/De^2*exp(-(RE-P*3^(1/2))/RE)))^(1/2)*Di
Success!
Luc
@LucMeekes wrote:
I don't see Re cancel, You can divide it on P, to make life simpler. But you can do the same with 2/sqrt(3)...
Re is yield stress, P is pressure. The units are the same (force/area), so they can be (as you have) divided to cancel out.
@LucMeekes wrote:
I don't see Re cancel,
I erroneously interpreted the first line as an abbreviation to be inserted in the second one 😉
In fact what we see seems to be the result of the infamous static symbolic solve - the second line being the first equation solved for D.p. I am still confused about the "c" we see in the picture at the end of the exponent fraction.
Better to use the dynamic symbolic solve and also let Mathcad simplify the result.
Ok thank you!
Im still little bit confused
What is that LambertW ...?!
LambertW is a function, like Bessel functions, or others. (Time to hit Google or the math books.)
@Fred_Kohlhepp wrote:
...(Time to hit Google or the math books.)
Or to look up the appropriate Mathcad Quicksheet 😉
See attached
Ok its not easy to implement this function and the approximations... will need some programming and search of a correct approximation function. Since there are 2 solutions for x <0
Not sure because I don't use it but maybe Excel's "solver" could be of help.
I want to avoid excel solver i had problems finding solutions in the past by using him. I was thinking to be able to make approximation to directly calculate lambert w
I understand.
Hope you find something suitable for your needs.
When I made a quick search it looked like there are quite some solutions for Excel out there.
Thank you for help! Ill read through some papers!
This one is good for falling asleep:
https://rgmia.org/papers/v10n2/lambert-v2.pdf
😄
Maybe you don't have to dig into the subject that deep.
What about this thread
http://www.office-loesung.de/ftopic524762_0_0_asc.php
and the link in the first post.
Or maybe this ready made plug-in can be useful: https://github.com/mdscheuerell/Lambert-W-in-Excel