ImageVerifierCode 换一换
格式:DOCX , 页数:15 ,大小:19.37KB ,
资源ID:8202784      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/8202784.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(Poppet valve code in Amesim.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

Poppet valve code in Amesim.docx

1、Poppet valve code in Amesim/* Submodel PNAP031 skeleton created by AME Submodel editing utilityven. 19. oct. 11:25:23 2012 */#include #include #include #include ameutils.h/* *TITLE : PNAP031-DESCRIPTION :PNAP031 is a submodel of the one-dimensional motion of a pneumaticnozzle poppet valve acting on

2、a flat flapper seat.The user must supply the flow coefficient characteristic Cq asa function of the pressure ratioPr = downstream pressure (absolute) / upstream pressure (absolute).and of the opening of the valve x (in m).There are two ways to determine this characteristicenter a valid expression fo

3、r Cq in terms of Pr: Cq = f(Pr,x);enter the name of a file in ASCII format.The pressure at port 2 is assumed to act on an active area adjacent to theorifice and tends to open the orifice. A linear pressure gradient (betweenpressure at port 2 and pressure at port 1) acts on the remaining flapperseat

4、area. These assumptions gives a pressure force acting on the flapper.The displacement and velocity of the flapper are supplied by thesubmodel attached to port 3. There are no restriction on thedisplacement within PNAP031 and such restrictions may be applied byanother submodel employing end stops, su

5、ch as PNAI021.The lift is a variable related to this displacement by an offset.The orifice area is never allowed to exceed the area of the throatspecified by the internal diameter of the nozzle and the rod diameter(nozzle side).However, sometimes it is useful to restrict the orifice area withan addi

6、tional minimum and/or maximum value. The minimum areacan be used to simulate a leakage or a special orifice passing floweven when the nozzle is in contact with the flapper. The maximum areacan be used to simulate a flow area, for example at port 2. Theseminimum and maximum areas are specified by the

7、 corresponding liftpositions. The default values imply that there is no additionalrestrictions on the area.Note that the derivative of volume due to the movement of the flapperis sent at port 1 and port 2 to the adjacent pneumatic chamber.-USAGE :Use this submodel for a pneumatic nozzle valve acting

8、 on a flatflapper seat but note that results will be less accurate if the liftexceeds 20% of the seat diameter.PNAP031 differs from PNAP032 only in that the variables associatedwith ports 3 and 4 are interchanged.The submodels PNGD001 or PNGD002 should be included in your circuit todefine the charac

9、teristics of the gas.-PARAMETER SETTINGS :The diameter of the flapper seat must be greater than the internaldiameter of the nozzleThe rod diameter at nozzle side has a default value which is zeroimplying that the rod is not there.The volumes at the ports are normally only significant when the portis

10、 connected to the pneumatic chamber submodels PNCH011 or PNCH012. Ifthis is the case, it is important to set volumes at zero lift sothat the volume outputs are never negative.The filename or expression for Cq = f(Pr,x) is a string like:0.72+0.12*cos(pi*Pr) as an expression or./curves/orif.dat as a f

11、ilenameThe file must provide the data in the following format:N MPr1 Pr2 . PrNx1 x2 . xMCq11 Cq21 . CqN1Cq12 Cq22 . CqN2.Cq1M Cq2M . CqNMwhereN is the number of pressure ratio M is the number of opening positionsPri are the values of the pressure ratio xj are the values of openings mCqij are the val

12、ues of the flow coefficient corresponding to Pri and xj.In this file, data can be separated by any number of space, TAB or RETURN characters.-DATE OF CREATION / AUTHOR:2002 by FS from PNAP31 (SN)-INDEX OF REVISIONS :15/02/2004 : A linear pressure gradient (between pressure at port 2 and pressureat p

13、ort 1) acts on the remaining flapper seat area. (CR)05/01/2012 : Add pressure force contribution when the flapper is at contact (VBD)-LIST OF FUNCTIONS USED :InterpretExpression() : interprets a string as a filenameComputeExpression() : computes the value in the tableaanulsp_() : orifice area of an

14、annular spool valve.pn2rcqfix_() : evaluate mass flow and enthalpy flowpn2getatp_() : get atmospheric pressure-SOURCE :LMS Imagine7, place des Minimes42300 ROANNE tel: (33).04.77.23.60.30FRANCE fax: (33).04.77.23.60.31* */#define _SUBMODELNAME_ PNAP031/* Insert Private Code Here. */* mdr rod diamete

15、r (nozzle side) mm - mdf diameter of the flapper mm - mxlift0 opening (underlap) corresponding to zero displacement mm - mxmin opening for minimum area mm - mxmax opening for maximum area mm - mxlim transition opening for pressure force on the flapper seat mm - mvol10 volume at port 1 corresponding

16、to zero lift cm*3 - m*3vol20 volume at port 2 corresponding to zero lift cm*3 - m*3*/* There are 3 integer parameters:gi gas type indexforcemode pressure acting in the flapper seat areaforcecontact pressure force contribution on the flapper seat at zero lift*/* There is 1 text parameter:flowcoeff fi

17、lename or expression for flow coefficient Cq=f(Pr,x)*/void pnap031in_(int *n, double rp9, int ip3, char *tp1, double c3, int ic3)int loop, error;/* Extra Initialization Function Declarations Here. */static char *var = Pr, x ;/* Initialization Function Check Statements. */if (xmin 0.0)error = 2;amefp

18、rintf(stderr, nLower lift limit must be higher than zero. );if (xmax xmax)error = 2;amefprintf(stderr, nLower lift limit must be smaller than higher lift limit);if (xlim 0);if (di 0);if (df 0);if (df = di)error = 2;amefprintf(stderr, nFlapper seat diameter must be greater);amefprintf(stderr, nthan i

19、nternal diameter of the nozzle);if (dr = 0);if (dr di)error = 2;amefprintf(stderr, nRod diameter (nozzle side) must be lower);amefprintf(stderr, nthan internal diameter of the nozzle);if ( (M_PI*(di*di - dr*dr)/4.0 (M_PI*di*xmax) & (xmax != 1.e30) )if(error != 2)error = 1;amefprintf(stderr, nBe care

20、ful the flow area is limited by );amefprintf(stderr, n(PI/4)*(dinternal2-drod2) and not by PI*dinternal*xmax.n);if (vol10 = 0n);if (vol20 = 0n);/* End of Initialization Check Statements. */* Integer parameter checking: */if (gi 99)amefprintf(stderr, ngas type index must be in range 1.99.n);error = 2

21、;if (forcemode 2)amefprintf(stderr, npressure acting in the flapper seat area must be in range 1.2.n);error = 2;if (forcecontact 2)amefprintf(stderr, npressure force contribution on the flapper seat at zero lift must be in range 1.2.n);error = 2;if(error = 1)amefprintf(stderr, nWarning in %s instanc

22、e %d.n, _SUBMODELNAME_, *n);else if(error = 2)amefprintf(stderr, nFatal error in %s instance %d.n, _SUBMODELNAME_, *n);amefprintf(stderr, Terminating the program.n);AmeExit(1);/* Common - SI units conversions. */rp0 *= 1.00000000000000e-003;di = rp0;rp1 *= 1.00000000000000e-003;dr = rp1;rp2 *= 1.000

23、00000000000e-003;df = rp2;rp3 *= 1.00000000000000e-003;xlift0 = rp3;rp4 *= 1.00000000000000e-003;xmin = rp4;rp5 *= 1.00000000000000e-003;xmax = rp5;rp6 *= 1.00000000000000e-003;xlim = rp6;rp7 *= 1.00000000000000e-006;vol10 = rp7;rp8 *= 1.00000000000000e-006;vol20 = rp8;/* Initialization Function Executable Statements. */ic2 = InterpretExpression(tp0, 2, var,1,1,1,1);if (ic2 = -1)amefprintf(stderr, Invalid expression/filename %sn, tp0);error = 2;/* Calculate the annular area at nozzle side. */c0 = M_PI*(di*di-dr*dr) * 0.25;/* Calculate the remaining annular area on the flapper. */c1 = M_PI*(d

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1