Rank: Advanced Member Groups: Registered
Joined: 17/01/2013(UTC) Posts: 296 Location: Khabarovsk, Russia Was thanked: 151 time(s) in 107 post(s)
|
Just wanted to add to Davide's example: name value param.sm (15kb) downloaded 20 time(s).This file is intended to emphasize the difference that function's parameters make. The SMath feature of storing variable name or value depending on their relative order is great, and allows for clean calculation pages, but using this feature requires discipline, and is prone to difficult-to-find errors. Personally I never use it, and always use functions to make calculations predictable and consistent. Of course, I may define a name to be used in functions later, but only if it is constant and will never change in the calculations. E.g., it's normal to use gravity acceleration as constant when I work with hydraulics for usual district heating networks, and for that, I can define it beforehand, an don't use as parameter to function. Code:g_e:=9.81m/s^2
Fgrav(m):=m*g_e
But if I will do maths for Mars expedition, the value will become variable - and I will make it a parameter to function. Code:Fgrav(m,a):=m*a
Fearth1:=Fgrav(m1,g_e)
Yes, my choice makes calculations much heavier, and somewhat more difficult to read, but I do really have control on the calculations. |
Best regards, Mike Kaganski |
1 user thanked mikekaganski for this useful post.
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
I understand what you are saying Davide. Often in numerical maths we have to "isolate" by copy/paste or more conveniently spool to file. That was common in Mathcad 11 and earlier versions. More savantly, Mathematica replies by "Shadow in the context". Looking at the snipets, the document "Silo" looks like a scratch pad. It needs be reconstructed logically.
Thinking the other way around, a work sheet is a "math canvas". Something like the plot canvas. The plot canvas will support limitless number of built-in functions and/or user functions "canvas compatible". That's not always the case. The "Quadratic Spline" supports only TWO functions on the plot canvas. Quadratic Spline will be posted soon. Spool to file is OK for numerical values, but useless for the numerical integrator that needs a functional "Transit". Who else needs a transit ? !
A work sheet may become "reactive within itself" like some model functions that can't be optimised because the parameters are too reactive. I have experienced this fact with all my "Transmute models". I feel useless helping in the "Silo", being based on the vectorise operator.
Davide: I'm glad and feel comfortable you are now closer to Andrey.
Jean
|
1 user thanked Jean Giraud for this useful post.
|
|
|
Rank: Member Groups: Registered
Joined: 24/08/2016(UTC) Posts: 21 Location: Ankara
|
Originally Posted by: mikekaganski Just wanted to add to Davide's example: name value param.sm (15kb) downloaded 20 time(s).This file is intended to emphasize the difference that function's parameters make. The SMath feature of storing variable name or value depending on their relative order is great, and allows for clean calculation pages, but using this feature requires discipline, and is prone to difficult-to-find errors. Personally I never use it, and always use functions to make calculations predictable and consistent. Of course, I may define a name to be used in functions later, but only if it is constant and will never change in the calculations. E.g., it's normal to use gravity acceleration as constant when I work with hydraulics for usual district heating networks, and for that, I can define it beforehand, an don't use as parameter to function. Code:g_e:=9.81m/s^2
Fgrav(m):=m*g_e
But if I will do maths for Mars expedition, the value will become variable - and I will make it a parameter to function. Code:Fgrav(m,a):=m*a
Fearth1:=Fgrav(m1,g_e)
Yes, my choice makes calculations much heavier, and somewhat more difficult to read, but I do really have control on the calculations. Ok thank you I realized that after sending the previous post, if an equation is dependant to a variable "z" you should set "z" after all dependant equations. But it can't be everytime because the results should be seen in the seperate parts. For instance I have filling and discharge pressures and the results should be printed in their relevant section. So I need to define a "z" before discharge pressures equations are created. This way it is not possible to continue with the structure. Because I need to set "z" for a certain place and then I need another equation that depends on the "z" again. So the storing of the variable which is a great feature according to you is not good for me unfortunately. How can I change all the equations to like "Y.R(z)=..."? Because I have started to create a sheet with this manner but after a while it gave an error again.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 17/01/2013(UTC) Posts: 296 Location: Khabarovsk, Russia Was thanked: 151 time(s) in 107 post(s)
|
Let's try to do it together. You do it up to the point where you have problems; you mark them and comment in the sheet and upload here, and I'll try to help you on the case-to-case basis. Does that sound sensible? I must say that I live in Khabarovsk - Russian Far East, UTC+10. So, the timezone differences won't let us have immediate conversation, please excuse for that. Edited by user 31 August 2016 16:29:11(UTC)
| Reason: Not specified |
Best regards, Mike Kaganski |
|
|
|
Rank: Member Groups: Registered
Joined: 24/08/2016(UTC) Posts: 21 Location: Ankara
|
Originally Posted by: mikekaganski Let's try to do it together. You do it up to the point where you have problems; you mark them and comment in the sheet and upload here, and I'll try to help you on the case-to-case basis. Does that sound sensible?
I must say that I live in Khabarovsk - Russian Far East, UTC+10. So, the timezone differences won't let us have immediate conversation, please excuse for that. Please you excuse me. It is a help from you, not an obligation and you show kindness. I thank you for your idea and efforts. I will do and upload it here. Thanks again.
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
There is no more red in the attached. Corrections in yellow. There was/there is shadow in the project context Jean en 1991-4 jmG.sm (689kb) downloaded 19 time(s).
|
|
|
|
Rank: Member Groups: Registered
Joined: 24/08/2016(UTC) Posts: 21 Location: Ankara
|
Originally Posted by: Jean Giraud There is no more red in the attached. Corrections in yellow. There was/there is shadow in the project context Jean en 1991-4 jmG.sm (689kb) downloaded 19 time(s). Thank you Jean for your considerations.
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: Berk Thank you Jean for your considerations. You don't confirm if it has doctored your Smath version ! Jean
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Berk,
Two things are critically missing: 1. The general drawing of the silo. 2. The Standard it is sourced from.
Jean
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
'kg/{'m*'s^2} What is that in Smath ?
N = kg * m/s2
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 17/01/2013(UTC) Posts: 296 Location: Khabarovsk, Russia Was thanked: 151 time(s) in 107 post(s)
|
Berk,
please don't consider the posts about units mismatch. There is misunderstanding WRT units in general, and their handling in SMath. 'kg/{'m*'s^2}='Pa. That is algebraic decomposition of SI complex unit, and as the decomposition is purely mathematical, it doesn't necessarily has physical meaning.
Also, Pa is not pressure per unit square. Pa is a unit of pressure, and pressure itself is force per unit square, or energy per unit volume. Note that the same unit (and the same physical property: pressure) may be decomposed differently and ccorrectly even from physical PoV. The two decompositions (per area / per volume) are very useful in different applications: first one in construction to represent forces, second one in hydraulics to represent energy.
So, the decomposition you see in SMath is mathematical one to most simple SI units, and it is done inside the app without taking into accocunt physical meaning. But it is mathematically correct, and so compatible with correct usage of units. |
Best regards, Mike Kaganski |
1 user thanked mikekaganski for this useful post.
|
|
|
Rank: Member Groups: Registered
Joined: 24/08/2016(UTC) Posts: 21 Location: Ankara
|
Originally Posted by: mikekaganski Let's try to do it together. You do it up to the point where you have problems; you mark them and comment in the sheet and upload here, and I'll try to help you on the case-to-case basis. Does that sound sensible?
I must say that I live in Khabarovsk - Russian Far East, UTC+10. So, the timezone differences won't let us have immediate conversation, please excuse for that. Hello mikekaganski, I have managed out to create it with (z) function. You could see it attached. But how can I eliminate vectorize function to be added this formulas? Some of them is not working if I don't use vectorize. en 1991-4 (z).sm (604kb) downloaded 16 time(s).
|
|
|
|
Rank: Member Groups: Registered
Joined: 24/08/2016(UTC) Posts: 21 Location: Ankara
|
Originally Posted by: Jean Giraud Berk,
Two things are critically missing: 1. The general drawing of the silo. 2. The Standard it is sourced from.
Jean Jean, I am creating this file from scratch and it is the first time I am using SMath. So I have to complete all the equations and variables and definitions. Then I will decorate the sheet with what it needs (silo sketch, codes used, header and footer (actually I need help for print settings), etc.). It is a time consuming process as I used mathcad for this type of calculations before. If you have sample calculation report for a steel silo or another structure created by SMath, it would be very helpful for me. For the other replies from you: I started to use the variables with their unit. When I get the result by entering variable "z" SMath is creating a unit by itself. Then I change it manually because I know what it should be. The beauty is that, if I enter wrong unit for the result, SMath adds a unit to make it correct, then I can understand if there was a mistake. This feature is great. You have created new variables "a" for z-ho/zo-ho but it should't be needed to calculate I guess. I attached the mathcad version of that part here and as you can see there is no separation needed for the formulas. In addition it is working even the "z" has been determined before the formulas created. Edited by user 01 September 2016 11:21:10(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 17/01/2013(UTC) Posts: 296 Location: Khabarovsk, Russia Was thanked: 151 time(s) in 107 post(s)
|
Hi Berk, Originally Posted by: Berk I have managed out to create it with (z) function. You could see it attached. But how can I eliminate vectorize function to be added this formulas? Some of them is not working if I don't use vectorize.
I see that you've overcome the difficulties, and managed to make your file working as expected. That's great! It's sad that you'd felt exhausted on the route, but the achievement should soothe that. Actually, I don't understand your desire to eliminate vectorize(). I find that function very useful. I like to re-implement many old my functions that were made in pre-vectorize() era, with that function, and to get compact and clear implementations. However, if you wish, tell me which one do you want to start with, and we'll try to see if eliminating vectorize() would be advantageous. |
Best regards, Mike Kaganski |
|
|
|
Rank: Member Groups: Registered
Joined: 24/08/2016(UTC) Posts: 21 Location: Ankara
|
Originally Posted by: mikekaganski Hi Berk, Originally Posted by: Berk I have managed out to create it with (z) function. You could see it attached. But how can I eliminate vectorize function to be added this formulas? Some of them is not working if I don't use vectorize.
I see that you've overcome the difficulties, and managed to make your file working as expected. That's great! It's sad that you'd felt exhausted on the route, but the achievement should soothe that. Actually, I don't understand your desire to eliminate vectorize(). I find that function very useful. I like to re-implement many old my functions that were made in pre-vectorize() era, with that function, and to get compact and clear implementations. However, if you wish, tell me which one do you want to start with, and we'll try to see if eliminating vectorize() would be advantageous. Thank you, I don't want to use this function ever. As you could see for mathcad I don't need to remember to add vectorize function to solve the equations.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 17/01/2013(UTC) Posts: 296 Location: Khabarovsk, Russia Was thanked: 151 time(s) in 107 post(s)
|
Originally Posted by: Berk I don't want to use this function ever. As you could see for mathcad I don't need to remember to add vectorize function to solve the equations. I'm afraid, that this is not exactly what you want, but to make some things clear. vectorize.sm (28kb) downloaded 20 time(s). |
Best regards, Mike Kaganski |
|
|
|
Rank: Member Groups: Registered
Joined: 24/08/2016(UTC) Posts: 21 Location: Ankara
|
Originally Posted by: mikekaganski Originally Posted by: Berk I don't want to use this function ever. As you could see for mathcad I don't need to remember to add vectorize function to solve the equations. I'm afraid, that this is not exactly what you want, but to make some things clear. vectorize.sm (28kb) downloaded 20 time(s). Ok thank you mikekaganski, So humanbeings look for the thing that he/she already familiar with. But Smath is a good program and I will try to use after that point, if I could have a good print page . For example I couldn't find how to add a logo to header. Is there a wat to setup header/footer visually?
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: Berk I don't want to use this function ever. As you could see for mathcad I don't need to remember to add vectorize function to solve the equations.
I don't recognise your Mathcad. My latest version was the Mathcad/Mathsoft most glorious version 11. I know Mathcad vectorise operator since 8 Pro. It was never exhausted, an extremely powerful feature whether purely Mathsoft or from a subcontract ??? Often, it is not so much useful as it renders the work not visible and prone to be rejected by the QA team. Sorry Berk, I have no competence about silos from the mechanical side, I'm the other man to put instruments and control loops ... keep up the good work ! Cheers, Jean
|
1 user thanked Jean Giraud for this useful post.
|
|
|
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: Berk For example I couldn't find how to add a logo to header. Is there a wat to setup header/footer visually?
As for now the only way is to setup a background (Insert > Background) |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
1 user thanked Davide Carpi for this useful post.
|
|
|
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.