Anthrazit

865 Reputation

11 Badges

5 years, 158 days

MaplePrimes Activity


These are replies submitted by Anthrazit

@acer 

Thanks again for the thorough explanation.

From me as an user it is not important how things are done internally in the program, as long as I get what I want in the end. I've played around a bit more, and I think I finally found what I need.

The clue was to do a little bit more fiddling with the results in the end.

SumLoadcase[1 .. (), 1] := evalf(convert~(SumLoadcase[1 .. (), 1], 'units', Unit('m')));                # position on beam
SumLoadcase[1 .. (), 2] := evalf(convert~(SumLoadcase[1 .. (), 2], 'units', Unit('kN')*Unit('m')));        # M
SumLoadcase[1 .. (), 3] := evalf(convert~(SumLoadcase[1 .. (), 3], 'units', Unit('kN')));                # Q
SumLoadcase[1 .. (), 4] := evalf(convert~(SumLoadcase[1 .. (), 4], 'units', Unit('kN')));                # Qi
SumLoadcase[1 .. (), 5] := evalf(convert~(SumLoadcase[1 .. (), 5], 'units', Unit('kN')));                # Qk
SumLoadcase[1 .. (), 6] := evalf(convert~(SumLoadcase[1 .. (), 6], 'units', Unit('kN')/Unit('m')));        # load / m
  • the convert function not only makes consistent units across a cell, but also calculates the cells
  • the evalf function calculates the rest
  • the rest of the code is unchanged.

@Carl Love 

I do neither have the technical background nor the experience in Maple to comment on that, but Units are source of most of the problems we have had with Maple so far.

@acer

First of all, thanks again for your patience and efforts.

 I've gone through your input and they apparently fix the problem of the first column (with unit [m]). However they do not fix the problems in the other columns.

Running your example the result of the second column is [kN/m*m2]. In my example I get a mishmash of similar units (most likely because of different input, but who knows).

According to the definition on top it should be [kN*m].

@acer 

Any help appreciated!

I'm uploading a new workbook, which is getting really useful already. I'm going to post it on Maple cloud when it's finished.

Koyaanisqatsi.zip

@acer 

Thanks for the input.

Are there any examples which I could have a look at that implement those techniques, or and Maple page that describes common good programming practices?

@acer 

The worksheet became a bit of a mess, so I've cut out everything that was unneccessary.

One of the problems of this case is, that Maple behaves differently if you run things directly, or step by step. It's also a bit unpredictable about what happens actually.

Imho this could very easily be a Java related problem with my graphics card as well.

Anyway, I think there are 2 problems as far as I can see.

  1. Maple does not extend the number of visible columns, if the matrix is extended. It apparently does however reduce the number of visible columns when the matrix is reduced (see part 2 in attachment).
  2. When redefining the number of visible columns manually, the new fields are not updated (all the time). On my PC this looks something like this.

The attachment shows an "original" state before redefining any visible columns.

Try running the commands step by step, or by executing the whole worksheet, and see if you get the same result as I do.

Datatable.mw

@Carl Love 

Ah, yes, I forgot that.

Koyaanisqatsi.zip

Here's the sourcecode, the problem is listed at the end of the program.

Please be advised that documentation is not finished yet, so you have to crack through the code for yourself.

But to explain the problem in a few sentences.

  • The program calculates forces (moments, shear, reactions) on a single span beam with different loads.
  • The first part calculates the forces for a specific load
  • You can have up to 10 different forces on a beam in a loadcase.
  • The last addition is to sum up all results in a new matrix for all given forces
  • The matrix with units is where the problem lies, as it doesn't give a result, but the sum in an expression
  • The unitfree matrix is working ok

Koyaanisqatsi.maple

The code runs nice when run one line after another, but it doesn't work when it is run in a subroutine, or by "execute the whole worksheet".

Datatable.mw 

Probably found a workaround.

  • generate a new, empty array
  • redefine variableName of the datatable to the new array
  • expand number of rows to the number of the old array
  • redefine variableName to the old array

Datatable.mw

@dharr 

Something in that code doesn't work, I get a "recursive assignment" error.

@Carl Love 

This is all incredibly useful, especially the use of angle-bracket operators. In my case, getting the result back as an array is actually better than as a list.

However it is not easy to find that information in Maple Help or somewhere else. So I guess this will not be my last question regarding expression sequences.

@nm 

This was very helpful, just needed to go through almost every single character you had in your reply...

This is interesting, wouldn't have had a chance to find out by myself just reading the help files though.

Btw., I've also tried with the evalb function, but that gave the same error.

Need to get back to my very first question in this forum once again.

Could someone please explain the meaning of this information in the help files?

If <Maple>\lib\maple.ini exists, it is loaded first (where <Maple> is your Maple installation directory). With a network installation of Maple, the commands in this initialization file will be executed by all users on the network.

What exactly is a network installation?

In our case - where on the network should we place a common maple.ini file?

First 12 13 14 15 16 17 18 Page 14 of 18