# XNH3H2O Ammonia-Water thermodynamic mixture properties for MATLAB
## Current version 1.15
Alex Rattner Multiscale Thermal Fluids & Energy Laboratory 05/26/2017
The Pennsylvania State University
Previously:
Alex Rattner Sustainable Thermal Systems Laboratory 12/10/2011
Georgia Institute of Technology
# Files
Copy the following files to your MATLAB working directory:
`XNH3H2O.c NH3H2O.c NH3H2O.h kdtree.c kdtree.h PropLib2.dat`
# Compiling
To compile in matlab, run: `mex XNH3H2O.c NH3H2O.c kdtree.c`
Note, for compiling on new versions of gcc (on *nix systems), you may need to use the command:
`mex -v CFLAGS="\$CFLAGS -std=c99" kdtree.c NH3H2O.c XNH3H2O.c -o XNH3H2O`
this supports "//" style comments (strict ANSI-C may only support "/**/" style comments
# Running
* Initialize with: `XNH3H2O('INIT', 'PropLib2.dat');`
* Example run call: `Q = XNH3H2O('TPX_Q', 345, 7E5, 0.4140);`
* Save current library for later reuse: `XNH3H2O('SAVE', 'NewPropLib.dat');`
* End session with: `XNH3H2O('END');`
# Supported Calls
* Triples that are supported: `TPX TPQ TXV PXH PXQ XVU`
* Property suffixes supported: `T P X Q H U V S x y`
* Supports evaluation of DTPX_DXVU derivative which returns a 9-element array with the values: dT/dX, dT/dV, dT/dU, dP/dX, dP/dV, dP/dU, dX/dX, dX/dV, dX/dU
* Also supports `XVU_TPX`, which receives a 6-element array input of XVU and approximate TPX, and returns the TPX triple corresponding to XVU
# Version history
## Version 1.15, 05/26/2017
* Reworked the PXQ solver mode to use a bisection search rather than a Newton search. This is slower, but seems to be more reliable.
* Soon should be switched over to a method like the Brent method (quadratic convergence, and unconditionally stable for the right set of fluid props).
## Version 1.14, 12/10/2011
* Fixed some bad inputs in the property library (where x/y are initialized to 0)
* Added a failsafe to the PXQ mode when it gets a bad initial guess from the database (this seems to work, usually)
* Maybe I need to switch the PXQ mode over to something like the XVU solver
## Version 1.13, 11/17/2011
* Fixed issue with bad initial guesses from PXQ mode
## Version 1.12, 08/26/2011
* Fixed small issue resulting from bad initial guesses for x and y when Q = 0/1
## Version 1.11, 08/23/2011
* Fixed minor issue with PXH calls where x and y could be outside [0,1]
* Fixed small issue with TXV calls
## Version 1.10, 08/11/2011
* Improved behavior of XVU routines, should be safe to use now
* Corrected issue with TPQ calls at Q=0 and Q=1
* Fixed memory issue with XVU/PXQ
## Version 1.09, 08/02/2011
* Added support for XVU_TPX call
* Fixed some issue with the TPQ call, I'm not 100% on this yet
## Version 1.08, 07/28/2011
* Added support for DTPX_DXVU call
* Fixed some issue with specific volume evaluation for two-phase flows
## Version 1.07, 07/17/2011
* Some more tweaks to improve stability of XVU routine, there are still some points (specifically at low temperature) where the routine does not converge.
## Version 1.06, 07/13/2011
* Incorporated recursive incremental evaluation routine for XVU points (helps solve more points)
* A few minor fixes in certain routines
## Version 1.05, 06/30/2011
* I corrected a typo in the mixing rule formulation that was reported in Ziegler & Trepp (1984)
## Version 1.04, 06/15/2011
* Added support for saving property libraries to improve future initial guesses
## Version 1.03, 06/13/2011
* Added support for TXV calls
* Allows all property calls for all input triples
## Version 1.02, 06/13/2011
* Added support for developing property database during runtime
* Changed rules for use at runtime (have to call INIT and END)
* Added support for XVU calls
## Version 1.01, 06/08/2011
* Added support for PXQ calls (PXQ_T, PXQ_H)
## Version 1.00, 06/07/2011
* Improved reliability and speed of TPQ calls
* Fixed issue where TPX calls get weird around Q=1 and Q=0
* Added TPX_Q call
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论





























格式:rar 资源大小:1.0MB

收起资源包目录

















共 15 条
- 1
资源评论


matlab大师
- 粉丝: 2968
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- cmd启动本地验证码coderg.py
- springboot138宠物领养系统的设计与实现录像.mp4
- springboot137欢迪迈手机商城设计与开发录像.mp4
- springboot141夕阳红公寓管理系统的设计与实现录像.mp4
- springboot140体育馆使用预约平台的设计与实现录像.mp4
- springboot139华强北商城二手手机管理系统录像.mp4
- springboot142新冠病毒密接者跟踪系统录像.mp4
- springboot143基于SpringBoot的在线家具商城设计与实现录像.mp4
- springboot144基于mvc的高校办公室行政事务管理系统设计与实现录像.mp4
- springboot145基于java的在线问卷调查系统的设计与实现录像.mp4
- springboot147校园失物招领系统录像.mp4
- springboot149智慧图书管理系统设计与实现录像.mp4
- springboot148江理工文档管理系统的设计与实现录像.mp4
- springboot150基于springboot的贸易行业crm系统录像.mp4
- springboot152基于springboot的的学生干部管理系统录像.mp4
- springboot151基于web的人力资源管理系统的设计与实现录像.mp4
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
