Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline Macclad  
#1 Posted : 23 October 2013 00:14:50(UTC)
Macclad

Rank: Newbie

Groups: Registered
Joined: 26/09/2012(UTC)
Posts: 9
Man
United Kingdom
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, Cool 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

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline mkraska  
#2 Posted : 23 October 2013 00:45:41(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,990
Germany

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):
unit.PNG
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline Macclad  
#3 Posted : 23 October 2013 10:08:48(UTC)
Macclad

Rank: Newbie

Groups: Registered
Joined: 26/09/2012(UTC)
Posts: 9
Man
United Kingdom
Location: Manchester

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

Best regards

Laurence
Offline omorr  
#4 Posted : 23 October 2013 11:09:59(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

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):
invert.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Macclad  
#5 Posted : 23 October 2013 14:04:26(UTC)
Macclad

Rank: Newbie

Groups: Registered
Joined: 26/09/2012(UTC)
Posts: 9
Man
United Kingdom
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
File Attachment(s):
screenshot1.bmp (997kb) downloaded 48 time(s).
Offline Macclad  
#6 Posted : 23 October 2013 14:35:28(UTC)
Macclad

Rank: Newbie

Groups: Registered
Joined: 26/09/2012(UTC)
Posts: 9
Man
United Kingdom
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

File Attachment(s):
screenshot2.bmp (961kb) downloaded 31 time(s).
Offline omorr  
#7 Posted : 23 October 2013 15:43:05(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

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):
invert1.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Macclad  
#8 Posted : 23 October 2013 20:45:02(UTC)
Macclad

Rank: Newbie

Groups: Registered
Joined: 26/09/2012(UTC)
Posts: 9
Man
United Kingdom
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 exampleBiggrin . 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?Confusion ). 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
Offline RFreund  
#9 Posted : 24 October 2013 01:22:25(UTC)
RFreund


Rank: Advanced Member

Groups: Registered
Joined: 25/09/2013(UTC)
Posts: 325
United States
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
Offline mkraska  
#10 Posted : 24 October 2013 03:01:55(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,990
Germany

Was thanked: 1128 time(s) in 724 post(s)
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.
mkraska attached the following image(s):
inverse.PNG
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline Davide Carpi  
#11 Posted : 24 October 2013 09:33:40(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,654
Man
Italy
Location: Italy

Was thanked: 1340 time(s) in 879 post(s)
Originally Posted by: mkraska Go to Quoted Post
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 Biggrin
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline mkraska  
#12 Posted : 24 October 2013 14:20:44(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,990
Germany

Was thanked: 1128 time(s) in 724 post(s)
Originally Posted by: w3b5urf3r_reloaded Go to Quoted Post
Originally Posted by: mkraska Go to Quoted Post
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 Biggrin


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):
units.PNG
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline Davide Carpi  
#13 Posted : 24 October 2013 15:00:18(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,654
Man
Italy
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
Offline mkraska  
#14 Posted : 24 October 2013 16:57:31(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,990
Germany

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.
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline Davide Carpi  
#15 Posted : 24 October 2013 18:15:05(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,654
Man
Italy
Location: Italy

Was thanked: 1340 time(s) in 879 post(s)
Originally Posted by: mkraska Go to Quoted Post
What does mean "without patches"?
homemade patches....
Originally Posted by: mkraska Go to Quoted Post
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
Offline Davide Carpi  
#16 Posted : 24 October 2013 18:16:12(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,654
Man
Italy
Location: Italy

Was thanked: 1340 time(s) in 879 post(s)
Originally Posted by: mkraska Go to Quoted Post
What does mean "without patches"?
homemade patches....
Originally Posted by: mkraska Go to Quoted Post
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
Users browsing this topic
Guest
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.