Giter Club home page Giter Club logo

cpp_refprop's Introduction

CPP_REFPROP

修改NIST REFPROP自带的C++示例代码,方便批量调用refprop获取物性,例如密度,焓等

编译说明

将NIST REFPROP自带的refprop.dll 和 包含物质的两个文件夹fluids, mixtures和代码refprop.cpp, refprop.h放在同一目录下

代码说明

refprop中已经包含main函数,并有简单示例,参考修改即可,调用的函数返回指针,示例代码只获取了密度,也可获取其他参数

int main()
{
	Substance Nitrogen;
	char* fldname = "nitrogen.fld";
	Nitrogen.setSubstance(fldname);
	Nitrogen.showSubstance();
	double* pd  = Nitrogen.byTP(77,2000,1);
	printf(" density is: %f(mol/L).\n",pd[0]);

	for (int px = 1000; px < 2000; px = px + 100)
	{
		pd = Nitrogen.byTP(77.0, px*1.0, 1);
		printf("density is 77 (K),pressure is %d (KPa), density = %f6.2 (mol/L).\n",px,pd[0]);
	}
	return 0;
}

cpp_refprop's People

Contributors

lotusto avatar

Stargazers

 avatar Archer avatar  avatar Tomithy avatar  avatar  avatar

Watchers

James Cloos avatar 砍竹人 avatar

cpp_refprop's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.