SMath Studio Forum
»
SMath Studio
»
Feature Requests
»
Built-in Thermodynamic (and other) Tables
Rank: Member Groups: Registered
Joined: 25/06/2012(UTC) Posts: 14 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 ). Sorry about my english, it's getting rust, Danilo Monteiro
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,986 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) |
|
|
|
|
Rank: Member Groups: Registered
Joined: 25/06/2012(UTC) Posts: 14 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 Edited by user 24 April 2013 02:50:38(UTC)
| Reason: Not specified
|
|
|
|
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/9817The 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
|
|
|
|
Rank: Member Groups: Registered
Joined: 25/06/2012(UTC) Posts: 14 Location: Rondonópolis
|
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 30/03/2011(UTC) Posts: 393
Was thanked: 132 time(s) in 113 post(s)
|
|
|
|
|
Rank: Member Groups: Registered
Joined: 25/06/2012(UTC) Posts: 14 Location: Rondonópolis
|
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 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 |
|
|
|
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 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.xlsThe 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 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-DnaEdited by user 27 April 2013 13:52:07(UTC)
| Reason: Not specified
|
|
|
|
Rank: Member Groups: Registered
Joined: 25/06/2012(UTC) Posts: 14 Location: Rondonópolis
|
Originally Posted by: kilele Originally Posted by: Dham 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.xlsThe 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 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-DnaEdit: 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 scila , I can't help much in this plugin's development besides testing.... :'(
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 30/03/2011(UTC) Posts: 393
Was thanked: 132 time(s) in 113 post(s)
|
|
|
|
|
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 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 DigitizerEngauge Digitizer tutorialThen 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
|
|
|
|
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#FreesteamAnd 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
|
2 users thanked kilele for this useful post.
|
on 03/05/2013(UTC), on 03/05/2013(UTC)
|
|
SMath Studio Forum
»
SMath Studio
»
Feature Requests
»
Built-in Thermodynamic (and other) Tables
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.