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

Notification

Icon
Error

Login


3 Pages<123>
Options
Go to last post Go to first unread
Offline mikekaganski  
#21 Posted : 31 August 2016 05:33:43(UTC)
mikekaganski


Rank: Advanced Member

Groups: Registered
Joined: 17/01/2013(UTC)
Posts: 296
Man
Russian Federation
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
thanks 1 user thanked mikekaganski for this useful post.
on 31/08/2016(UTC)
Offline Jean Giraud  
#22 Posted : 31 August 2016 07:34:48(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

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
thanks 1 user thanked Jean Giraud for this useful post.
on 31/08/2016(UTC)
Offline Berk  
#23 Posted : 31 August 2016 16:20:54(UTC)
Berk


Rank: Member

Groups: Registered
Joined: 24/08/2016(UTC)
Posts: 21
Turkey
Location: Ankara

Originally Posted by: mikekaganski Go to Quoted Post
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.

Offline mikekaganski  
#24 Posted : 31 August 2016 16:27:32(UTC)
mikekaganski


Rank: Advanced Member

Groups: Registered
Joined: 17/01/2013(UTC)
Posts: 296
Man
Russian Federation
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
Offline Berk  
#25 Posted : 31 August 2016 17:25:44(UTC)
Berk


Rank: Member

Groups: Registered
Joined: 24/08/2016(UTC)
Posts: 21
Turkey
Location: Ankara

Originally Posted by: mikekaganski Go to Quoted Post
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.

Offline Jean Giraud  
#26 Posted : 31 August 2016 22:33:30(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

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).
Offline Berk  
#27 Posted : 31 August 2016 23:20:14(UTC)
Berk


Rank: Member

Groups: Registered
Joined: 24/08/2016(UTC)
Posts: 21
Turkey
Location: Ankara

Originally Posted by: Jean Giraud Go to Quoted Post
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.
Offline Jean Giraud  
#28 Posted : 01 September 2016 03:27:02(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: Berk Go to Quoted Post
Thank you Jean for your considerations.


You don't confirm if it has doctored your Smath version !

Jean

Offline Jean Giraud  
#29 Posted : 01 September 2016 04:27:47(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

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
Offline Jean Giraud  
#30 Posted : 01 September 2016 05:49:19(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Forum Silo.gif
Offline Jean Giraud  
#31 Posted : 01 September 2016 06:08:01(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
'kg/{'m*'s^2} What is that in Smath ?

N = kg * m/s2
Offline mikekaganski  
#32 Posted : 01 September 2016 08:48:03(UTC)
mikekaganski


Rank: Advanced Member

Groups: Registered
Joined: 17/01/2013(UTC)
Posts: 296
Man
Russian Federation
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
thanks 1 user thanked mikekaganski for this useful post.
on 01/09/2016(UTC)
Offline Berk  
#33 Posted : 01 September 2016 10:46:16(UTC)
Berk


Rank: Member

Groups: Registered
Joined: 24/08/2016(UTC)
Posts: 21
Turkey
Location: Ankara

Originally Posted by: mikekaganski Go to Quoted Post
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).

Offline Berk  
#34 Posted : 01 September 2016 11:15:11(UTC)
Berk


Rank: Member

Groups: Registered
Joined: 24/08/2016(UTC)
Posts: 21
Turkey
Location: Ankara

Originally Posted by: Jean Giraud Go to Quoted Post
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.

mathcad.JPG

Edited by user 01 September 2016 11:21:10(UTC)  | Reason: Not specified

Offline mikekaganski  
#35 Posted : 01 September 2016 14:36:24(UTC)
mikekaganski


Rank: Advanced Member

Groups: Registered
Joined: 17/01/2013(UTC)
Posts: 296
Man
Russian Federation
Location: Khabarovsk, Russia

Was thanked: 151 time(s) in 107 post(s)
Hi Berk,

Originally Posted by: Berk Go to Quoted Post
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
Offline Berk  
#36 Posted : 01 September 2016 14:56:37(UTC)
Berk


Rank: Member

Groups: Registered
Joined: 24/08/2016(UTC)
Posts: 21
Turkey
Location: Ankara

Originally Posted by: mikekaganski Go to Quoted Post
Hi Berk,

Originally Posted by: Berk Go to Quoted Post
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.

Offline mikekaganski  
#37 Posted : 01 September 2016 17:06:25(UTC)
mikekaganski


Rank: Advanced Member

Groups: Registered
Joined: 17/01/2013(UTC)
Posts: 296
Man
Russian Federation
Location: Khabarovsk, Russia

Was thanked: 151 time(s) in 107 post(s)
Originally Posted by: Berk Go to Quoted Post
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
Offline Berk  
#38 Posted : 01 September 2016 17:32:06(UTC)
Berk


Rank: Member

Groups: Registered
Joined: 24/08/2016(UTC)
Posts: 21
Turkey
Location: Ankara

Originally Posted by: mikekaganski Go to Quoted Post
Originally Posted by: Berk Go to Quoted Post
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 Good. For example I couldn't find how to add a logo to header. Is there a wat to setup header/footer visually?

Offline Jean Giraud  
#39 Posted : 01 September 2016 17:54:41(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: Berk Go to Quoted Post
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

thanks 1 user thanked Jean Giraud for this useful post.
on 03/09/2016(UTC)
Offline Davide Carpi  
#40 Posted : 01 September 2016 19:53:47(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 1329 time(s) in 875 post(s)
Originally Posted by: Berk Go to Quoted Post
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
thanks 1 user thanked Davide Carpi for this useful post.
on 04/09/2016(UTC)
Users browsing this topic
Guest
3 Pages<123>
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.