User:Vishnu: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 36: | Line 36: | ||
Work under progress: | Work under progress: | ||
# Understand the implementation of incompressible fluid models in CoolProp | |||
# Start with a standalone code for incompressible fluids | # Start with a standalone code for incompressible fluids | ||
#* Extract the coefficient matrix by implementing a JSON-to-C file parser | #* Extract the coefficient matrix by implementing a JSON-to-C file parser | ||
| Line 41: | Line 42: | ||
== 06 June 2016 == | == 06 June 2016 == | ||
Updates | Updates: | ||
# Identified relevant 'C' structures required for incompressible fluids | # Identified relevant 'C' structures required for incompressible fluids | ||
<blockquote><source lang="c"> | <blockquote> | ||
<source lang="c"> | |||
typedef struct { | typedef struct { | ||
char* type; | char* type; | ||
double** coeff; | double** coeff; | ||
int numc_r, numc_c; // number of rows and columns in coefficient matrix respectively | int numc_r, numc_c; // number of rows and columns in coefficient matrix respectively | ||
} coefficients; | } coefficients; | ||
typedef struct { | typedef struct { | ||
coefficients T_freeze, conductivity, density, specific_heat, viscosity, saturation_pressure; | coefficients T_freeze, conductivity, density, specific_heat, viscosity, saturation_pressure; | ||
char* x_id; | char* x_id; | ||
char* description; | char* description; | ||
double T_base, T_max, T_min, T_minPsat, x_base, x_max, x_min; | double T_base, T_max, T_min, T_minPsat, x_base, x_max, x_min; | ||
} fprops; | |||
</source> | |||
</blockquote> | |||
<ol start="2"> | |||
<li> JSON-to-C file parser added to the standalone code and subsequently loaded the incompressible fluid data structures </li> | |||
</ol> | |||
Work under progress: | |||
# | # Adding property evaluation functions to the standalone code | ||
#* for 'density', 'conductivity', 'heat capacity' and 'viscosity' | |||
#* as function of 'temperature' (as discussed in the proposal) | |||
== 13 June 2016 == | == 13 June 2016 == | ||
Updates: | |||
# Still working on incompressible standalone code (please review the committed work) | # Still working on incompressible standalone code (please review the committed work) | ||
# Added property evaluation functions for density, conductivity, heat capacity and viscosity | # Added property evaluation functions for density, conductivity, heat capacity and viscosity | ||
| Line 76: | Line 83: | ||
Future discussion: | Future discussion: | ||
# What is the purpose of "NRMS" (normalized root-mean-square)? Do I have to include that anywhere in the calculations or is it just additional info? | # What is the purpose of "NRMS" (normalized root-mean-square provided in the 'JSON' files of CoolProp)? Do I have to include that anywhere in the calculations or is it just additional info? | ||
#: NRMS is just a measure of correlation/agreement between results. When the value is low, it means there is good agreement. Note the ambiguity in the definition around [https://en.wikipedia.org/wiki/Root-mean-square_deviation#Normalized_root-mean-square_deviation 'nomalized'] | |||
[[Category:GSOC2016]] | [[Category:GSOC2016]] | ||
Revision as of 18:16, 11 July 2016
My GSoC 2016 project will be on the topic Adding incompressible fluids EOS to FPROPS. The project details and proposal are on the official GSOC website. My mentors will be John Pye and Mahesh Venkataraman.
My code is at vishnu:.
Approach
Here are some xamples of current incompressible fluid support in ASCEND:
The project is divided into two parts:
- Develop a stand alone code for computing popular thermodynamic properties for incompressible pure fluids as well as mixtures.
- This includes development of new evaluation functions for incompressible fluids based on polynomial, exponential and exponential-polynomial mathematical models with fitting coefficients extracted from various published journal articles. The development of the stand alone code will finally consist of extensive verification and validation with available data in CoolProp. The deadline to complete this work will be June 27, 2016 (GSoC '16 mid-term).
- Enhance the FRPOPS module with the features of the developed stand alone code
- This second part (post mid-term) will consist of developing the incompressible fluid data structures from the existing structures in FPROPS. The property evaluation functions developed in the first part will be then linked with FPROPS, hence completely adding the incompressible EOS to FPROPS.
Weekly updates
Before 23 May 2016 (community bonding period and before)
Updates:
- Active participation with ascend-sim-users link
- Executed several ready made ASCEND models (for nitrogen and oxygen) provided by Dr. John Pye (that invoke FPROPS)
- Understood the implementation of TTSE (done by Dr. Sidharth Somanathan, GSoC '15 student) link
- Reported minor bug related to the test for 'Nitrogen' link
Work under progress:
- Understand call graph and data flow of ASCEND-FPROPS models
30 May 2016
Updates:
- Identified existing incompressible models written for a pure fluid (liquidsodium) and a molten mixture (KNO3:NaNO3)
- Literature review
- Found repositories (in JSON format from CoolProp) for extracting coefficient matrices (as discussed in the proposal) of incompressible fluid models (above 100 pure and mixture fluids)
- Different evaluation functions required for different types of fit coefficients are: polynomial type, exponential type and exponential-polynomial type
Work under progress:
- Understand the implementation of incompressible fluid models in CoolProp
- Start with a standalone code for incompressible fluids
- Extract the coefficient matrix by implementing a JSON-to-C file parser
- Implement the evaluation functions
06 June 2016
Updates:
- Identified relevant 'C' structures required for incompressible fluids
typedef struct { char* type; double** coeff; int numc_r, numc_c; // number of rows and columns in coefficient matrix respectively } coefficients; typedef struct { coefficients T_freeze, conductivity, density, specific_heat, viscosity, saturation_pressure; char* x_id; char* description; double T_base, T_max, T_min, T_minPsat, x_base, x_max, x_min; } fprops;
- JSON-to-C file parser added to the standalone code and subsequently loaded the incompressible fluid data structures
Work under progress:
- Adding property evaluation functions to the standalone code
- for 'density', 'conductivity', 'heat capacity' and 'viscosity'
- as function of 'temperature' (as discussed in the proposal)
13 June 2016
Updates:
- Still working on incompressible standalone code (please review the committed work)
- Added property evaluation functions for density, conductivity, heat capacity and viscosity
- Added functions to compute properties from different types of fit coefficients: polynomial, exponential, exponential-polynomial
- Analyzed preliminary results for "Zitrec S55, Potassium formate/Sodium propionate"
- Programmed a macro vishnu:models/johnpye/fprops/vishnu/scratch/generate.mcr and a script file vishnu:models/johnpye/fprops/vishnu/scratch/unite to create plots (which works with the post-processing tool 'Tecplot')
- Results in vishnu:models/johnpye/fprops/vishnu/scratch/results.pdf, Original data in vishnu:models/johnpye/fprops/vishnu/scratch/Original.pdf
- Large/significant deviations/inconsistencies observed
Work under progress:
- Comparing with respective computations of CoolProp to detect the root-cause behind mismatching results
Future discussion:
- What is the purpose of "NRMS" (normalized root-mean-square provided in the 'JSON' files of CoolProp)? Do I have to include that anywhere in the calculations or is it just additional info?
- NRMS is just a measure of correlation/agreement between results. When the value is low, it means there is good agreement. Note the ambiguity in the definition around 'nomalized'