Rank: Newbie
Groups: Registered
Joined: 26/09/2012(UTC) Posts: 9 Location: Manchester
|
Hi all Hopefully this is a simple question that I guess someone can answer. I am programming the stiffness method for a 2D sway frame example, and with the degrees of freedom I have active, I have produced a mixed unit stiffness matrix. I have previously attempted this in mathcad but had to strip the units out for it to allow me to produce the stiffness matrix at all. So I can see that Smath will allow mixed units in the matrix (which is a step forward from my verion of mathcad), but when I try using K to the power -1 to invert the matrix it flags an error. So is it because a) Im using a slightly out of date version, It can't do it because of the units in the matrix, c) is there an alternative way of doing this without stripping out the units? Im not particularly keen to program a solver like Gauss elimination etc as that would defeat the object of trying to get the program to do this automatically for me. Any advice would be greatly appreciated. Many thanks Laurence
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,990 Was thanked: 1128 time(s) in 724 post(s)
|
You might use the Maxima plugin. It is in early alpha state, thus be careful. mkraska attached the following image(s): |
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 26/09/2012(UTC) Posts: 9 Location: Manchester
|
Many thanks Martin - I will try this out and report back as to how I get on.
Best regards
Laurence
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
I did not get this, sorry. Just tried the example from Martin and got the same answer without using Maxima. Did not understand what was the problem here and when will SMath fail actually. Regards, Radovan omorr attached the following image(s): |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Newbie
Groups: Registered
Joined: 26/09/2012(UTC) Posts: 9 Location: Manchester
|
Hi, many thanks for this Hopeully I have attached a screenshot ok. I am solving a 7 degree of freedom system with all but one of the degrees of freedom being rotational (DOF 4 is translational). So when I ask for the inverse it comes back with the statement 'units dont match'. Having looked at it further, could it possibly be that I have a number of zero's in the matrix with no units attached at all? I would have thought not as this still contitutes a mixed unit matrix, however my maths in the area of matrix inversion needs a little bringing up to speed!! Also I believe I have the units correct Hopefully the screenshot will explain what is going on Best regards Laurence
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 26/09/2012(UTC) Posts: 9 Location: Manchester
|
Please see attached screenshot - I cannot get the example you are using to work. So Im guessing this could possibly a version issue? I will check for updates now, im sure I have build 0.96 desktop. I will keep you posted. Regards Laurence Edited by user 23 October 2013 14:56:10(UTC)
| Reason: Not specified
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
Hello Laurence I am sorry if I produced a confusion here. I used symbolical evaluation, not numerical. Unfortunately, we can see thee same character on the screen. It seems that was not a good idea to change the appearance of both symbolical and numerical evaluation into the same character on the screen. Martin also mentioned this few times as well. See the attached screenshot. I've noted the difference now. To correct myself. SMath will fail on the numerical evaluation here. Maxima will do this quite well. Regards, Radovan Edited by user 23 October 2013 15:45:04(UTC)
| Reason: Not specified omorr attached the following image(s): |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Newbie
Groups: Registered
Joined: 26/09/2012(UTC) Posts: 9 Location: Manchester
|
Hi Radovan Many thanks, I have just used symbolic optimisation and that appears to have sorted this problem out - the displacements now appear to be as per my checking example . I have come across the numerical/symbolical problem before but I had dismissed this (I previously posted a long time ago regarding an example where symbolical calculation gives incorrect answers for displacement, correct ones when using the numerical evaluation? ). The symbolic approach tends to take a little while to calculate on my computer but that's just a hardware issue - I might try the maxima plugin also. Once again, many thanks for your expert advice on this thread. Regards Laurence
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 25/09/2013(UTC) Posts: 325 Location: IL Was thanked: 19 time(s) in 17 post(s)
|
I have a related question so I will post here unless you feel it needs it's own thread:
Is there a way to show the results of a matrix in the individual 'cells' as different units? I like to display matrices as you would a table however it becomes confusing if I try to show a row of force then a row of length then say a row with no units.
Thanks,
Ryan
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,990 Was thanked: 1128 time(s) in 724 post(s)
|
As I understand, this is on the agenda for the development of the TableRegion pluginYou also can use a diagonal matrix with units specifying the results units of each column. However, for me, that does not look really smart. The multiplicative result split works for matrices as well, in fact, this is another way to write a matrix inversion. mkraska attached the following image(s): |
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,654 Location: Italy Was thanked: 1340 time(s) in 879 post(s)
|
Originally Posted by: mkraska That's the idea, not cell-by-cell but by rows or by columns, even if actually I Don't know how |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,990 Was thanked: 1128 time(s) in 724 post(s)
|
Can't you choose a vector from the sheet (just like in plots for t values or in combobox region)? The rest looks easy (I may oversee important issues). mkraska attached the following image(s): |
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,654 Location: Italy Was thanked: 1340 time(s) in 879 post(s)
|
As principle yes, my problem is how to display the right unit in the header without "patches"... f.e. one might want to display kPa or kN/m^2 or kJ/m^3... Edited by user 24 October 2013 16:50:34(UTC)
| Reason: Not specified |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,990 Was thanked: 1128 time(s) in 724 post(s)
|
What does mean "without patches"? The right unit is in the given header vector. Eventually, make it string before handling over to the table. |
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,654 Location: Italy Was thanked: 1340 time(s) in 879 post(s)
|
Originally Posted by: mkraska What does mean "without patches"? homemade patches.... Originally Posted by: mkraska only if it's possible to have the input values without preprocessing.... That's the same issue of the units of a null initial guess...
|
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,654 Location: Italy Was thanked: 1340 time(s) in 879 post(s)
|
Originally Posted by: mkraska What does mean "without patches"? homemade patches.... Originally Posted by: mkraska The right unit is in the given header vector. Eventually, make it string before handling over to the table. only if it's possible to have the input values without preprocessing.... That's the same issue of the units of a null initial guess... Maybe this is not a problem with custom regions, I don't know (not yet...) Edited by user 24 October 2013 18:25:38(UTC)
| Reason: w3b5urf3r_reloaded |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.