danwbr / dtl Goto Github PK
View Code? Open in Web Editor NEWDWSIM Thermodynamics Library (legacy version - 3.x)
Home Page: http://dwsim.inforside.com.br/wiki/index.php?title=DTL
License: GNU Lesser General Public License v3.0
DWSIM Thermodynamics Library (legacy version - 3.x)
Home Page: http://dwsim.inforside.com.br/wiki/index.php?title=DTL
License: GNU Lesser General Public License v3.0
Hi Daniel,
First of all its a great library and many thanks for your efforts.
I have looked at the example provided and api, and as I understand the feed and mixtures you can create only from PropertyPackage.AvailableCompounds property.
Is there any way to add custom component? I come from petroleum engineering and fluid pvt characterization deals a lot with not pure but "pseudo" components and fractions. Here where I am at the moment.
var calc = new Calculator();
calc.Initialize();
double T = 283; //K
double P = 101325; //Pa
var pr = calc.GetPropPackList()[0];
PropertyPackage pp = calc.GetPropPackInstance(pr);
var ethane = calc.GetCompoundList()[50];
/// trying to add new compound
var c7PlusName = "c7Plus"
var c7PlusProp = new ConstantProperties();
c7PlusProp.Molar_Weight = 96;
pp.AvailableCompounds.Add( c7PlusName , c7PlusProp);
object[,] result = calc.PTFlash(pp, 0, P, T, new[] { ethane, c7PlusName }, new[] { 0.5, 0.5 });
Its obviously fails, because more properties should be defined for the compound.
But ConstantProperties() has way too many fields and many of them is not used in this flash.
What should I define for this hydrocarbon like compound to make PTFlash work?
For pseudo component we usually have molecular weight, specific gravity, and boiling point.
Critical temperature, Tc; critical pressure, pc; and acentric factor of each component in a mixture are required by EOS and estimated from correlations. I am a bit lost with ConstantProperties class. Any advice would be much appreciated.
Anton.
Unable to open module file \DTL\DWSIM\Objects\PropertyPackages\Base\HYP.vb': The system cannot find the file specified.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.