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 GerardLardner  
#1 Posted : 16 September 2021 02:48:49(UTC)
GerardLardner


Rank: Advanced Member

Groups: Registered
Joined: 09/11/2013(UTC)
Posts: 32
Ireland
Location: Leinster

Was thanked: 4 time(s) in 4 post(s)
I have a Mathcad worksheet I developed a few years ago for calculating the adiabatic flame temperature of an arbitrary gas mixture; in this case the products of combustion of municipal solid waste. I need to share it with others who do not have access to Mathcad; it seems to me that converting it into SMath would be a useful way of sharing it. SMath opens the Mathcad worksheet but fails to interpret the Mathcad Given: Find block. Also, the 'Given' section is very long and is split over several lines.
  1. How do I convert a Given: Find block from Mathcad into an Smath solve block?
  2. How can I split the 'Given' part over multiple lines - in Mathcad it takes 5 lines of a page even in landscape format?

The main troublesome part of the worksheet is shown below.

Untitled1.png

The definitions of the functions for calculating the heat capacities and latent heat are mostly omitted, but I include a few at the bottom - they read correctly into SMath and work correctly. Here is a sample:

Untitled2.png

A related question is how can I test a function in SMath using an array of variables? For example, in the case above, in Mathcad I can quickly check an array of temperature points against published tables by entering the following:

Untitled3.png

Is there anything similar in SMath?

Edited by user 16 September 2021 02:54:13(UTC)  | Reason: Spelling!

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

Offline Razonar  
#2 Posted : 16 September 2021 03:16:54(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Originally Posted by: GerardLardner Go to Quoted Post

1. How do I convert a Given: Find block from Mathcad into an Smath solve block?


You have one equation in one variable. You can try al_nleqsol.

Originally Posted by: GerardLardner Go to Quoted Post

2. How can I split the 'Given' part over multiple lines - in Mathcad it takes 5 lines of a page even in landscape format?


You can store pieces in variables, and then combine them. I.e. A:=expr1, B:=expr2, ... , final_expr:=A+B+C+...

Originally Posted by: GerardLardner Go to Quoted Post

A related question is how can I test a function in SMath using an array of variables?

You have vectorize() in SMath.

Best regards.
Alvaro.
Offline oscampo  
#3 Posted : 16 September 2021 03:37:31(UTC)
oscampo


Rank: Advanced Member

Groups: Registered
Joined: 10/12/2009(UTC)
Posts: 246
Man
Colombia
Location: Cali, Colombia

Was thanked: 85 time(s) in 65 post(s)
Originally Posted by: GerardLardner Go to Quoted Post


....

A related question is how can I test a function in SMath using an array of variables? For example, in the case above, in Mathcad I can quickly check an array of temperature points against published tables by entering the following:

Untitled3.png

Is there anything similar in SMath?


You must use the vectorize operator:

Vectorize.png

You can check the attached file:

vectorize.sm (6kb) downloaded 7 time(s).
Offline GerardLardner  
#4 Posted : 16 September 2021 15:31:56(UTC)
GerardLardner


Rank: Advanced Member

Groups: Registered
Joined: 09/11/2013(UTC)
Posts: 32
Ireland
Location: Leinster

Was thanked: 4 time(s) in 4 post(s)
Great. Thank you very much.

I should have thought of that myself but I've been doing this nights, often at midnight or later, and obviously wasn't thinking clearly enough.
thanks 1 user thanked GerardLardner for this useful post.
on 16/09/2021(UTC)
Offline GerardLardner  
#5 Posted : 16 September 2021 15:42:20(UTC)
GerardLardner


Rank: Advanced Member

Groups: Registered
Joined: 09/11/2013(UTC)
Posts: 32
Ireland
Location: Leinster

Was thanked: 4 time(s) in 4 post(s)
Hi Alvaro,

Thank you for all the advice and suggestions.

Originally Posted by: Razonar Go to Quoted Post
Originally Posted by: GerardLardner Go to Quoted Post

1. How do I convert a Given: Find block from Mathcad into an Smath solve block?


You have one equation in one variable. You can try al_nleqsol.


Ta. I'll try that.

Originally Posted by: Razonar Go to Quoted Post
Originally Posted by: GerardLardner Go to Quoted Post

2. How can I split the 'Given' part over multiple lines - in Mathcad it takes 5 lines of a page even in landscape format?


You can store pieces in variables, and then combine them. I.e. A:=expr1, B:=expr2, ... , final_expr:=A+B+C+...


Yes, I was thinking along those lines myself but hoping that someone could suggest a 'cleaner' solution that I might have been overlooking. I do that.


Originally Posted by: Razonar Go to Quoted Post
Originally Posted by: GerardLardner Go to Quoted Post

A related question is how can I test a function in SMath using an array of variables?

You have vectorize() in SMath.


Thanks again. As I commented in my reply to oscapmo, I should have remembered that myself. Too many late nights.

Best regards,

Gerard
thanks 1 user thanked GerardLardner for this useful post.
on 16/09/2021(UTC)
Offline Razonar  
#6 Posted : 16 September 2021 21:10:56(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Originally Posted by: GerardLardner Go to Quoted Post

Yes, I was thinking along those lines myself but hoping that someone could suggest a 'cleaner' solution that I might have been overlooking. I do that.


Hi Gerard. Two workarounds:

Clipboard04.jpg

Best regards.
Alvaro.
Offline GerardLardner  
#7 Posted : 17 September 2021 01:39:39(UTC)
GerardLardner


Rank: Advanced Member

Groups: Registered
Joined: 09/11/2013(UTC)
Posts: 32
Ireland
Location: Leinster

Was thanked: 4 time(s) in 4 post(s)
Those are clever.

Clearly, having written this originally in Mathcad, I am too old and fossilised to jump out of Mathcad mode and exploit SMath thinking properly. I really appreciate those suggestions.

Again, thank you very much.
thanks 1 user thanked GerardLardner for this useful post.
on 17/09/2021(UTC)
Offline Jean Giraud  
#8 Posted : 17 September 2021 01:57:40(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: GerardLardner Go to Quoted Post
1. How do I convert a Given: Find block from Mathcad into an Smath solve block?

Gerard,
No CAS has equivalent. It is original property Mathsoft.
Given ► maximize/minimze/minerr/Odesolve
Often will report symbolic.
The closest to Minerr is Smath Conjugate Gradient.
Some easy to initialize, some difficult.
All my MCD have been converted, work fine.
I'm willing to try some for you.
Cheers ... Jean
Offline overlord  
#9 Posted : 17 September 2021 03:22:46(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,128
Turkey

Was thanked: 509 time(s) in 339 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
Gerard,
No CAS has equivalent. It is original property Mathsoft.
Given ► maximize/minimze/minerr/Odesolve
Often will report symbolic.
The closest to Minerr is Smath Conjugate Gradient.
Some easy to initialize, some difficult.
All my MCD have been converted, work fine.
I'm willing to try some for you.
Cheers ... Jean

Already answered. Useless post.
There are function equivalents in SMath.
thanks 2 users thanked overlord for this useful post.
on 17/09/2021(UTC),  on 17/09/2021(UTC)
Offline Jean Giraud  
#10 Posted : 17 September 2021 03:27:36(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: overlord Go to Quoted Post
There are function equivalents in SMath.

Please, guide Gerard Minerr Smath
Offline Jean Giraud  
#11 Posted : 17 September 2021 04:00:08(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: GerardLardner Go to Quoted Post
How do I convert a Given: Find block from Mathcad into an Smath solve block?

Given/Find for solving is too general w/o an example.
Here is an example of Given/Mineer.

Page16 Frechet.sm (48kb) downloaded 22 time(s).
Offline Jean Giraud  
#12 Posted : 17 September 2021 04:24:29(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: Jean Giraud Go to Quoted Post
Given/Find for solving is too general w/o an example.

In Smath, there are so many equivalent, even superior
to MCD Given/Find i.e: solve
Smath can't do multiple conditional solve.
Toke days Mathsoft Collaboratory to solve a multiple conditional.
In some instances, Mathcad can solve only recursive.
On similar: Smath is champion.
Please give a simple example ... Jean.
Offline overlord  
#13 Posted : 17 September 2021 04:25:43(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,128
Turkey

Was thanked: 509 time(s) in 339 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
Please, guide Gerard Minerr Smath

Why someone including me still try to explain you something?
Obviously you are just a nuisance of this forum.

2021-09-17_04-23_1.png

2021-09-17_04-23.png
thanks 1 user thanked overlord for this useful post.
on 17/09/2021(UTC)
Offline Jean Giraud  
#14 Posted : 17 September 2021 15:19:52(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: GerardLardner Go to Quoted Post
How do I convert a Given: Find block from Mathcad into an Smath solve block?

Here is an example.

Maths Goat Radius QUICK.sm (10kb) downloaded 39 time(s).
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.