﻿ 基于Modelica的船用柴油机建模与仿真 Modeling and Simulation of Marine Diesel Engine Based on Modelica

Modeling and Simulation
Vol.05 No.04(2016), Article ID:18989,12 pages
10.12677/MOS.2016.54018

Modeling and Simulation of Marine Diesel Engine Based on Modelica

Lin Huang1, Gang Cheng1, Shilong Fan2, Guoqing Zhu1, Wei Xu1, Dongliang Li1

1Military Key Laboratory for Naval Ship Power Engineering, Naval University of Engineering, Wuhan Hubei

292143 Army of PLA, Sanya Hainan

Received: Oct. 29th, 2016; accepted: Nov. 19th, 2016; published: Nov. 22nd, 2016

ABSTRACT

In view of the relative lack of modularization, reusability, extensibility and parameterization in the traditional modeling process of the diesel engine, the mathematical model of each component of the diesel engine is analyzed from the basic physical laws. By using the object-oriented modeling language Modelica, the model base of the main components of the diesel engine is built on the Dymola simulation platform in a graphical and modular way. The model has good expansibility and reusability. Through the simulation analysis and comparison with the measured data, the results show that the model has a high precision. The performance analysis of the diesel engine is reliable based on this model. Finally, the effects of different compression ratio and fuel supply advance angle on the main performance parameters of diesel engine are analyzed. The conclusion has a certain theoretical and practical value.

Keywords:Diesel Engine, Objected-Oriented, Modeling, Performance Analysis

1海军工程大学舰船动力工程军队重点实验室，湖北 武汉

292143部队，海南 三亚

1. 引言

2. 柴油机数学模型

Figure 1. Schematic diagram of working principle of four stroke diesel engine

(1) 工质的热力学状态参数仅随时间(曲轴转角)变化，并认为工质在缸内各处的状态是均匀分布的，即处于瞬时热力平衡状态 [6] ；(2) 工质为理想气体，其比热、焓值等参数仅与气体温度和成分有关；(3) 忽略进、排气管内工质的流动过程中所携带的动能，并视为绝热；(4) 喷油燃烧过程遵循双韦伯曲线燃烧放热规律。

2.1. 气缸模型

(1)

(2)

(3)

(4)

(5)

2.2. 进、排气阀模型

(6)

(7)

2.2.1. 进气阀模型

(8)

2.2.2. 排气阀模型

(9)

(10)

2.3. 气缸壁散热模型

(11)

(12)

2.4. 曲柄连杆系统

(13)

(14)

2.5. 活塞

(15)

(16)

(17)

2.6. 曲柄箱

(18)

(19)

Figure 2. Crank connecting rod system

2.7. 摩擦损失

(20)

(21)

2.8. 燃烧放热模型

(22)

(23)

(24)

(25)

3. 面向对象的冷凝器系统模型的建立

Modelica是面向对象、陈述式的建模仿真语言，可处理大型、复杂多领域的物理问题。陈述式是指模型在描述的过程中不需要人为指定方程的求解顺序，只要系统方程满足封闭条件，即方程数与变量数相同，系统将自动求解计算所有的变量值 [11] 。Modelica采用模块化建模，各部件的数学模型重用性强，减少了大型复杂物理模型的建模难度，部件之间靠接口进行连接，接口中定义了各部件之间进行联系的公用变量。为了实现这一方式，Modelica中定义了如表1所示的八种类：class、package、connector、block、function等。建模过程中，首先根据系统工作原理将研究对象拆分成多个相对简单，贴近物理现实的部件对象，再分别建立各个部件的数学模型并对其数据、特性和结构等进行封装以方便后期进行参数化调用。最后利用Modelica的连接机制，建立整个系统的仿真模型。

3.1. 接口的建立

connector FlowPort

Modelica.SIunits.Pressure p；

flow Modelica.SIunits.MassFlowRate m_flow；

Modelica.SIunits.SpecificEnthalpy h；

Modelica.SIunits.Temperature T；

end FlowPort;

Modelica中变量的定义分为势变量和流变量两种，其中势变量表示，流变量是一种“穿过”型变量，表示某种能量流，用关键词flow限定，如FlowPort中的质量流量m_flow。势变量是一种“跨越”型变量，如FlowPort中的压力p、温度T等。

(26)

3.2. 组部件的建立

Table 1. Classes of Modelica

Figure 3. Crank connecting rod system

3.3. 柴油机热力系统模型构建

4. 仿真结果与分析

4.1. 模型验证

Figure 4. Diesel engine system model base

Figure 5. Diesel engine system model

Figure 6. Indicator diagram under calibration conditions

Table 2. Engine specifications

4.2. 供油提前角对柴油机主要性能参数的影响

Table 3. Comparison of simulation and experimental data of engine performance

Figure 7. Variation of engine performance parameters with different compression rations

5. 结论

(1) 与传统的过程式建模相比，采用Modelica语言建模具有良好的开放性和可扩展性。其图形化、模块化建模过程使系统各部件之间关系清晰明了，模型易于理解，并具有很好的通用性和可扩展性；

(2) 通过与实测数据相比，证明了所建立的柴油机模型具有较高的精度，可用于分析多项参数对柴油机主要性能的影响，从而为柴油机性能分析和优化提供参考，所得结论具有一定理论和工程实用价值。

Modeling and Simulation of Marine Diesel Engine Based on Modelica[J]. 建模与仿真, 2016, 05(04): 131-142. http://dx.doi.org/10.12677/MOS.2016.54018

1. 1. 王海燕, 张伟, 周海, 等. 船用大型低速电控柴油机的容积法模型[J]. 内燃机学报, 2008, 26(5): 452-456.

2. 2. Livanos, G.A., Simotas, G.N., Dimopoulos, G.G., et al. (2006) Simulation of Marine Diesel Engine Propulsion System Dynamics during Extreme Maneuvering. ASME 2006 Internal Combustion Engine Division Spring Technical Conference, Aachen.

3. 3. Theotakatos, G.P. (2008) Ship Propulsion Plant Transient Response Investigation Using a Mean Value Engine Model. International Journal of Energy, 2, 66-74.

4. 4. Karlsen, A.T. (2012) On Modeling of a Ship Propulsion System for Control Purposes. Norwegian University of Science and Technology, Trodheim.

5. 5. 赵建军, 丁建完, 周凡利, 等. Modelica语言及其多领域统一建模与仿真机理[J]. 系统仿真学报, 2006, 18(2): 570-573.

6. 6. Theotokatos, G. (2010) On the Cycle Mean Value Modeling of a Large Two-Stroke Marine Diesel Engine. Procedings of the Institution of Mechanical Engineers Part M-Journal of Engineering for the Maritime Environment, 224, 193- 205.

7. 7. Menacer, B. and Bouchetara, M. (2013) Numerical Simulation and Prediction of the Performance of a Direct Injection Turbocharged Diesel Engine. Simulation, 89, 1355-1368.

8. 8. 王伟涛. 增压柴油机进气系统仿真研究[D]: [硕士学位论文]. 北京: 北京交通大学, 2008.

9. 9. Creyx, M., Delacourt, E., Morin, C., et al. (2016) Dynamic Modelling of the Expansion Cylinder of an Open Joule Cycle Ericsson Engine: A Bond Graph Approach. Energy, 102, 31-43.

10. 10. 刘永长. 内燃机工作过程模拟[M]. 武汉: 华中科技大学出版社, 1996: 56-119.

11. 11. 陈昌. 基于面向对象的热流体系统建模方法及应用研究[D]: [博士学位论文]. 武汉: 华中科技大学, 2013.

12. 12. 陈辉, 涂环, 任伟. 大型船舶柴油机性能模拟及优化计算[J]. 上海交通大学学报, 2014(4): 488-492.