📄 fcalculate.h
字号:
/*#########################################################################
fcalculate.h - define tank,massflux calculating functions.
Copyright (c) 2005-2006, RICHISLAND All rights reserved.
Purpose :
Version :1.00
Author :
Complete Date :
Function List :
History :
_________________________________________________________________________
DATE AUTHOR VERSION DESCRIBE
-------------------------------------------------------------------------
2006-08-14 Ver1.00 Create
#########################################################################*/
#ifndef __F_CALCULATE_H__
#define __F_CALCULATE_H__
#include "stadx.h"
#ifdef __cplusplus
extern "C" {
#endif
/* max tank number */
#define MAX_TANK_NUM 10
#define MAX_COEFFS_NUM MAX_TANK_NUM
typedef struct tag_CalTag
{
DOUBLE value;
Boolean Valid;
Boolean Constant;
INT32 Err;
}CalTag;
/* define liquid type */
#define FCAL_LIQUID_HGP 1000 /* nomal chemicals */
#define FCAL_LIQUID_METHANOL 1001 /* methanol */
#define FCAL_LIQUID_PROPYOXIDE 1002 /* propylene oxide */
#define FCAL_LIQUID_PETROLEUM 2000 /* petroleum */
/* define tag type of tank */
#define FTANK_TAG_LIQUIDLEVEL 0X01
#define FTANK_TAG_WATERLEVEL 0X02
#define FTANK_TAG_TEMP 0X03
#define FTANK_TAG_ETEMP 0X04
#define FTANK_TAG_DENSITY 0X05
#define FTANK_TAG_VOLUME 0X06
#define FTANK_TAG_STDDENSITY 0X07
#define FTANK_TAG_PRESSURE 0X08
#define FTANK_TAG_WEIGHT 0X09
/* struct of tank coefficients */
typedef struct tag_TankVolCoefficient
{
/* is heatretaining tank */
Boolean isHeatretaining;
/* do pressure revise */
Boolean doPressureRevise;
/* is floating roof tank or not */
Boolean isFloatingRoof;
/* sustained height */
INT32 roofSustainedHeight;
/* float starting height */
INT32 roofFloatingHeight;
/* weight of floating roof */
DOUBLE dRoofWeight;
/* liquid level in millimeter */
CalTag n32LiquidLevel;
/* water level in millimeter */
CalTag n32WaterLevel;
/* liquid temperature */
CalTag dLiquidTemp;
/* temperature above liquid */
CalTag dLiquidUpsideTemp;
/* ambient temperature */
CalTag dAmbientTemp;
/* density */
CalTag dProductDensity;
/* bottom pressure */
CalTag dPressure;
}TankVolCoefficient;
/* struct of tank coefficients */
typedef struct tag_TankCoefficient
{
/* tank ID */
INT32 TankID;
/* tank index */
INT32 n32TankIndex;
/* tank height in milimeter */
CalTag n32TankHeight;
/* type of liquid */
INT32 n32LiquidType;
/* standard density */
CalTag dStandardDensity;
/* product volume */
CalTag dProductVolume;
/* product weight */
CalTag dProductWeight;
/* temperature coefficient of density */
CalTag TCD;
/* air-buoyancy force coefficient */
CalTag AFC;
/* residual weight */
CalTag dWeightplus;
/* initialized or not */
Boolean Initialized;
/* volume calculating associated params */
TankVolCoefficient volParams;
}TankCoefficient;
#ifdef __cplusplus
}
#endif
#endif // __F_CALCULATE_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -