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 Dham  
#1 Posted : 24 April 2013 01:29:07(UTC)
Dham


Rank: Member

Groups: Registered
Joined: 25/06/2012(UTC)
Posts: 14
Man
Brazil
Location: Rondonópolis

Hello,

would be very useful to me, and maybe for most mechanical, chemical, civil (e other) engineers (and students, of course) to have internal material data inside Smath (maybe, as a plugin).
This feature, with some nonlinear system solver with units support, would turn Smath into a nice alternative to EES (http://www.fchart.com/ees/)

For small calculations, you can put some table data in a matrix, and use submatrix and cols functions to extract the vectors to be interpolated, but it may be very time consuming, and you have to be very careful about units.

A workaround is to create various snippets, one for each Property and Material (SuperHeatedSteam_Enthalpy, Air_density...) with internal function, similar to the attachment, or create a complicated snippet with all data about a material, with the bult-in functions for properties (this would be probably the closest to the plugin code, but would turn the smallest calculation into a huge worksheet)..

The problem is that some tables are more complicated to interpolate, like this: http://server.fst.uga.ed...ated%20Steam%20Table.jpg (what if I want Enthalpy for lets say, 45kPa and 156ºC? It's just an example, anyway)..

Also, not all users may want to spend time to create so many snippets, or know which internal functions to use to achieve his goal, so a plugin like this would help a lot (and probably bring lots and lots of users Biggrin ).

Sorry about my english, it's getting rust,

Danilo Monteiro
File Attachment(s):
Example.sm (17kb) downloaded 145 time(s).

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

Offline mkraska  
#2 Posted : 24 April 2013 02:20:17(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,986
Germany

Was thanked: 1124 time(s) in 721 post(s)
You may have a look at the following topic.
The plugin does not work for me, but you may be more successful (the plugin seems to be x64-incompatible)
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline Dham  
#3 Posted : 24 April 2013 02:44:46(UTC)
Dham


Rank: Member

Groups: Registered
Joined: 25/06/2012(UTC)
Posts: 14
Man
Brazil
Location: Rondonópolis

Oh, that may help.
But we could not extend it (add tables for other fluids, etc.)
Anyway, if this work, will be one less snippet to create, thanks!

__________________________________________________________________

It didn't work Sad

Edited by user 24 April 2013 02:50:38(UTC)  | Reason: Not specified

Offline kilele  
#4 Posted : 24 April 2013 03:23:01(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 393

Was thanked: 132 time(s) in 113 post(s)
I don't know what happened to xsteam at www.x-eng.com (seems offline), it had dll files, excel files and other components.
Anyway I've found this code which might be useful in the future to make a plugin.
http://www.mathworks.com...entral/fileexchange/9817
The DataExchange plugin could be used in a smath snippet to import data from the xsteam excel sheet.

Edited by user 24 April 2013 03:41:48(UTC)  | Reason: Not specified

Offline Dham  
#5 Posted : 24 April 2013 04:12:59(UTC)
Dham


Rank: Member

Groups: Registered
Joined: 25/06/2012(UTC)
Posts: 14
Man
Brazil
Location: Rondonópolis

I found these sources about xsteam:

https://sourceforge.net/projects/xsteam/
http://xsteam.sourceforge.net/

But the download links are directing to the offline site Sad
Offline kilele  
#6 Posted : 24 April 2013 16:11:21(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 393

Was thanked: 132 time(s) in 113 post(s)
I found XSteam in excel, odf, matlab and dll versions:
XSteam_v2.6_excel_ods_matlab_dll.zip
An there you have a couple of derivatives based on xsteam:
http://www.me.ua.edu/ExcelinME/thermo.htm
http://www.chemsof.com/spreadsheet.htm

The University of Alabama's derivative of XSteam looks sweet (see youtube video), don't know if it'd be possible grab their excel macros code to make a SMath plugin (if permission is granted of course)

Edited by user 27 April 2013 13:48:32(UTC)  | Reason: Not specified

Offline Dham  
#7 Posted : 26 April 2013 06:31:25(UTC)
Dham


Rank: Member

Groups: Registered
Joined: 25/06/2012(UTC)
Posts: 14
Man
Brazil
Location: Rondonópolis

This implementation look way more complicated than table interpolation Sad
http://www.iapws.org/relguide/IF97-Rev.pdf

Also, is only for water/steam..

Edited by user 26 April 2013 06:33:05(UTC)  | Reason: Not specified

Offline uni  
#8 Posted : 26 April 2013 11:03:59(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,494
Man
Russian Federation

Was thanked: 1274 time(s) in 745 post(s)
Quote:
don't know if it'd be possible grab their excel macros code to make a SMath plugin

Yes, it is possible through a VB.Net plugin.
Russia ☭ forever
Viacheslav N. Mezentsev
Offline kilele  
#9 Posted : 26 April 2013 20:10:21(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 393

Was thanked: 132 time(s) in 113 post(s)
Originally Posted by: Dham Go to Quoted Post
This implementation look way more complicated than table interpolation Sad
http://www.iapws.org/relguide/IF97-Rev.pdf

Also, is only for water/steam..

Well it is different from your interpolating approach and just for water but it could be extended with other resources. It would be a nice occasion to see SMath handling units, maybe the NonlinearSolvers plugin would come in handy.
XSteam is a well regarded resource in some universities from USA, Spain and Italy (I found the ods version in a engineering department from Italy).
It is only for water yet useful in lots of energy/exergy efficiency analysis like this one in excel:
http://personales.upv.es...a/CT/T4/SCE1_2012res.xls
The derivative work from the University of Alabama includes also a couple of refrigerants, which could show us the direction to consider more substances, either by using correlations or interpolating tabular data as you suggested.

Originally Posted by: uni Go to Quoted Post
Quote:
don't know if it'd be possible grab their excel macros code to make a SMath plugin

Yes, it is possible through a VB.Net plugin.

Fine, I meant the possibility of porting the actual macros into C# code.
For now I lack coding skills ^^ but this reference could be useful in the future:

"VSTO, visual studio tools for office","convert vba to vb.net"
Migrating an Excel VBA Add-in to a VB.Net XLL with Excel-Dna

Edited by user 27 April 2013 13:52:07(UTC)  | Reason: Not specified

Offline Dham  
#10 Posted : 27 April 2013 05:58:05(UTC)
Dham


Rank: Member

Groups: Registered
Joined: 25/06/2012(UTC)
Posts: 14
Man
Brazil
Location: Rondonópolis

Originally Posted by: kilele Go to Quoted Post
Originally Posted by: Dham Go to Quoted Post
This implementation look way more complicated than table interpolation Sad
http://www.iapws.org/relguide/IF97-Rev.pdf

Also, is only for water/steam..


Well it is different from your interpolating approach and just for water but it could be extended with other resources. It would be a nice occasion to see SMath handling units, maybe the NonlinearSolvers plugin would come in handy.
XSteam is a well regarded resource in some universities from USA, Spain and Italy (I found the ods version in a engineering department from Italy).
It is only for water yet useful in lots of energy/exergy efficiency analysis like this one in excel:
http://personales.upv.es...a/CT/T4/SCE1_2012res.xls
The derivative work from the University of Alabama includes also a couple of refrigerants, which could show us the direction to consider more substances, either by using correlations or interpolating tabular data as you suggested.

Originally Posted by: uni Go to Quoted Post
Quote:
don't know if it'd be possible grab their excel macros code to make a SMath plugin

Yes, it is possible through a VB.Net plugin.


Fine, I meant the possibility of porting the actual macros into C# code.
For now I lack coding skills ^^ but this reference could be useful in the future:

"VSTO, visual studio tools for office","convert vba to vb.net"

Migrating an Excel VBA Add-in to a VB.Net XLL with Excel-Dna

Edit:

There was a dll version but can't find it.


I agree with you, interpolation it's just the easiest way (for me) to do. Another thing to take account of is that a lot of data tables would make this plugin use too much of disk space and system memory. Interpolation is more suitable for code snippets, I think.
Probably EES (the software I mentioned before) uses only correlations, it's a small install package and have lots and lots of features.


My coding skills are limited to some numeric calculations (mainly scilaCool, I can't help much in this plugin's development besides testing.... :'(
Offline kilele  
#11 Posted : 27 April 2013 13:53:29(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 393

Was thanked: 132 time(s) in 113 post(s)
I found XSteam dll version!
Updated download link.

Edited by user 27 April 2013 13:55:49(UTC)  | Reason: Not specified

Offline kilele  
#12 Posted : 28 April 2013 05:20:03(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 393

Was thanked: 132 time(s) in 113 post(s)
Originally Posted by: Dham Go to Quoted Post

Probably EES (the software I mentioned before) uses only correlations, it's a small install package and have lots and lots of features.


I've just read that EES supports hundreds of fluids..well we could prepare some table data and compare it with that software. I think it would be possible to make such tables by digitizing thermodynamics graphs with this software:
Engauge Digitizer
Engauge Digitizer tutorial
Then you could interpolate between values stored in each table or obtain spline functions.

Edited by user 28 April 2013 05:35:09(UTC)  | Reason: Not specified

Offline kilele  
#13 Posted : 03 May 2013 03:38:22(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 393

Was thanked: 132 time(s) in 113 post(s)
I've found these libraries for computing water properties using IAPWS-IF97 formulation :
Properties of water DLL coded in C#
Freesteam

And these are other .net libraries which might be useful:
CoolProp Property database that includes pure fluids, pseudo-pure fluids, and humid air properties.
Nature. API for computing physical properties of complex gas mixtures.

Edited by user 19 July 2013 14:48:57(UTC)  | Reason: Not specified

thanks 2 users thanked kilele for this useful post.
on 03/05/2013(UTC),  on 03/05/2013(UTC)
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.