Mixed unit matrices

Mixed unit matrices - Inverting - Сообщения

#1 Опубликовано: 22.10.2013 17:14:50
Laurence Weekes

Laurence Weekes

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

Группа: User

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, b) 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
#2 Опубликовано: 22.10.2013 17:45:41
Martin Kraska

Martin Kraska

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

Группа: Moderator

You might use the Maxima plugin. It is in early alpha state, thus be careful.

unit.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#3 Опубликовано: 23.10.2013 03:08:48
Laurence Weekes

Laurence Weekes

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

Группа: User

Many thanks Martin - I will try this out and report back as to how I get on.

Best regards

Laurence
#4 Опубликовано: 23.10.2013 04:09:59
Radovan Omorjan

Radovan Omorjan

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

Группа: Moderator

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
invert.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#5 Опубликовано: 23.10.2013 07:04:26
Laurence Weekes

Laurence Weekes

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

Группа: User

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
screenshot1.bmp
#6 Опубликовано: 23.10.2013 07:35:28
Laurence Weekes

Laurence Weekes

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

Группа: User

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
screenshot2.bmp
#7 Опубликовано: 23.10.2013 08:43:05
Radovan Omorjan

Radovan Omorjan

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

Группа: Moderator

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
invert1.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#8 Опубликовано: 23.10.2013 13:45:02
Laurence Weekes

Laurence Weekes

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

Группа: User

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:d . 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
#9 Опубликовано: 23.10.2013 18:22:25
Ryan Freund

Ryan Freund

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

Группа: User

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
#10 Опубликовано: 23.10.2013 20:01:55
Martin Kraska

Martin Kraska

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

Группа: Moderator

As I understand, this is on the agenda for the development of the TableRegion plugin

You 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.
inverse.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#11 Опубликовано: 24.10.2013 02:33:40
Davide Carpi

Davide Carpi

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

Группа: Moderator

Wrote

As I understand, this is on the agenda for the development of the TableRegion plugin



That's the idea, not cell-by-cell but by rows or by columns, even if actually I Don't know how :d
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#12 Опубликовано: 24.10.2013 07:20:44
Martin Kraska

Martin Kraska

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

Группа: Moderator

Wrote

Wrote

As I understand, this is on the agenda for the development of the TableRegion plugin



That's the idea, not cell-by-cell but by rows or by columns, even if actually I Don't know how :d



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).




units.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#13 Опубликовано: 24.10.2013 08:00:18
Davide Carpi

Davide Carpi

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

Группа: Moderator

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...
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#14 Опубликовано: 24.10.2013 09:57:31
Martin Kraska

Martin Kraska

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

Группа: Moderator

What does mean "without patches"? The right unit is in the given header vector. Eventually, make it string before handling over to the table.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#15 Опубликовано: 24.10.2013 11:15:05
Davide Carpi

Davide Carpi

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

Группа: Moderator

Wrote

What does mean "without patches"?

homemade patches....
Posted 

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 please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#16 Опубликовано: 24.10.2013 11:16:12
Davide Carpi

Davide Carpi

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

Группа: Moderator

Wrote

What does mean "without patches"?

homemade patches....
Wrote

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...)
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений