SMath Studio Forum
»
SMath Studio
»
Questions
»
Questions converting Mathcad to SMath Studio/Solver
Rank: Advanced Member Groups: Registered
Joined: 09/11/2013(UTC) Posts: 32 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. - How do I convert a Given: Find block from Mathcad into an Smath solve block?
- 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. 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: 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: Is there anything similar in SMath? Edited by user 16 September 2021 02:54:13(UTC)
| Reason: Spelling!
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,356 Was thanked: 815 time(s) in 516 post(s)
|
Originally Posted by: GerardLardner 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 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 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.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 10/12/2009(UTC) Posts: 248 Location: Cali, Colombia Was thanked: 87 time(s) in 66 post(s)
|
Originally Posted by: GerardLardner .... 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: Is there anything similar in SMath? You must use the vectorize operator: You can check the attached file: vectorize.sm (6kb) downloaded 7 time(s).
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 09/11/2013(UTC) Posts: 32 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.
|
1 user thanked GerardLardner for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 09/11/2013(UTC) Posts: 32 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 Originally Posted by: GerardLardner 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 Originally Posted by: GerardLardner 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 Originally Posted by: GerardLardner 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
|
1 user thanked GerardLardner for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,356 Was thanked: 815 time(s) in 516 post(s)
|
Originally Posted by: GerardLardner 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: Best regards. Alvaro.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 09/11/2013(UTC) Posts: 32 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.
|
1 user thanked GerardLardner 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)
|
Originally Posted by: GerardLardner 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
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,128 Was thanked: 509 time(s) in 339 post(s)
|
Originally Posted by: Jean Giraud 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.
|
2 users thanked overlord for this useful post.
|
on 17/09/2021(UTC), on 17/09/2021(UTC)
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: overlord There are function equivalents in SMath. Please, guide Gerard Minerr Smath
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: GerardLardner 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).
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: Jean Giraud 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.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,128 Was thanked: 509 time(s) in 339 post(s)
|
Originally Posted by: Jean Giraud Please, guide Gerard Minerr Smath
Why someone including me still try to explain you something? Obviously you are just a nuisance of this forum.
|
1 user thanked overlord 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)
|
Originally Posted by: GerardLardner 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).
|
|
|
|
SMath Studio Forum
»
SMath Studio
»
Questions
»
Questions converting Mathcad to SMath Studio/Solver
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.