User:RichardTowers: Difference between revisions

From ASCEND
Jump to navigation Jump to search
Line 39: Line 39:


== Equations of State ==
== Equations of State ==
To start with I'll expand upon [[PengRobinson EOS in FPROPS|Ankit's work]] on the Peng-Robinson, later adding MBWR if this is seen as a priority.
Firstly I'll be looking at the Peng-Robinson cubic EOS, possibly adding some other equations in the same family (van der Waals, Redlich-Kwon and Soave for example). See [http://code.ascend4.org/viewvc/code/branches/richard/models/johnpye/fprops/pengrobinson.c?view=markup pengrobinson.c] and [http://code.ascend4.org/viewvc/code/branches/richard/models/johnpye/fprops/pengrobinson.h?view=markup pengrobinson.h] for more.
Later an attempt might be made at implementing Lee and Kesler's modified Benedict-Webb-Rubin EOS, but this is another job for another day...


[[Category:GSOC2011]]
[[Category:GSOC2011]]

Revision as of 15:17, 2 June 2011

Richard Towers is a GSOC2011 student (Masters of Engineering, Mechanical) from The University of Durham (UK), working on improvements to FPROPS.

Initial Thoughts

A brief summary of what I hope to achieve over the summer. These points largely follow my GSOC application, feel free to ridicule my youthful ambition.

Testing

Need to find correct data for comparison. Working version of REFPROP? Literature? Inconsistencies need to be investigated and hopefully fixed.

Improvements to documentation

As part of the build up to starting work I've been reading through the LyX generated help file that comes with ASCEND, Having just finished a dissertation written in LyX and LaTeX/pgf/tikz I could probably help significantly with the general appearance of this document, for example:

Error creating thumbnail: File missing
Old Types Diagram
Error creating thumbnail: File missing
New Types Diagram
An old diagram showing a thin walled cylinder
Old Cylinder Diagram
A new diagram showing a thin walled cylinder
New Cylinder Diagram

Separating Correlation Coefficients

Coefficients should be stored in human readable files, not as C source. The plan is to create an XML structure for these files and a function to parse the files, loading fluid information at runtime. John suggests using RelaxNG as the schema, I'm not sure whether or not ASCEND already has a preferred cross platform XML parser, to begin with I'll use GNOME's libxml.

Relax NG Grammar

Element names identify the property in question and attributes identify values. The advantage of using attributes instead of node text is that we can specify different attributes (for the same property) that are treated differently, for example: it is sometimes useful to specify the constant ideal term as a multiple of the specific gas constant instead of as an absolute value. fluidSchema.rng

Example XML Fluid File

As an example a fluid file for Hydrogen can be found in hydrogen.xml. Note that the constant term is specified as a multiple of R as described above.

Parser

The minimum requirements of the parser are quite simple, however it would be nice not to have to worry about arranging xml elements in a specific order and some variables are easier to specify as multiples of some other variable. The beginnings of a competent parser are found in the (accidentally misspelt) parcer.c.

Equations of State

Firstly I'll be looking at the Peng-Robinson cubic EOS, possibly adding some other equations in the same family (van der Waals, Redlich-Kwon and Soave for example). See pengrobinson.c and pengrobinson.h for more. Later an attempt might be made at implementing Lee and Kesler's modified Benedict-Webb-Rubin EOS, but this is another job for another day...