You are on page 1of 145

Translated by CQU Team Lu

TRNSYS 18
a T R a N s i e n t SY s t e m S i m u l a
tion program

Volume 2
Using the Simulation Studio

Solar Energy Laboratory, Univ. of Wisconsin-Madison


http://sel.me.wisc.edu/trnsys

TRANSSOLAR Energietechnik GmbH


http://www.trnsys.de

CSTB – Centre Scientifique et Technique du Bâtiment


http:\/\/software.cstb.fr 网站。http://software.cstb.fr

TESS——热能系统专家。 TESS – Thermal Energy Systems Specialists


http://www.tess-inc.com
2–1
Translated by CQU Team Lu

关于这个手册。ABOUT THIS MANUAL


本手册中提供的信息旨在提供有关如何使用 Simulation Studio 的完整指南。 本手册无意提
供有关 TRNSYS 仿真软件及其实用程序的详细参考信息。 在 TRNSYS 文档集的其他部分
中可以找到更多详细信息。 本手册的最新版本始终可供 TRNSYS 网站上的注册用户使用
(请参见下文)。The information presented in this manual is intended to provide a
complete guide on how to use the Simulation Studio. This manual is not intended to
provide detailed reference information about the TRNSYS simulation software and its
utility programs. More details can be found in other parts of the TRNSYS
documentation set. The latest version of this manual is always available for registered
users on the TRNSYS website (see here below).

校对历史。REVISION HISTORY
 模拟工作室 4.0(Trnsys 17.01.0000)2004-09。2004-09 For Simulation Studio 4.0
(TRNSYS 16.00.0000)
 模拟工作室 4.0(Trnsys 17.01.0000)2005-02。2005-02 For Simulation Studio 4.0
(TRNSYS 16.00.0037)
 模拟工作室 4.2(Trnsys 17.01.0000)2006-01。2006-01 For Simulation Studio 4.2
(TRNSYS 16.01.0000)
 模拟工作室 4.2(Trnsys 17.01.0000)2007-03。2007-03 For Simulation Studio 4.2
(TRNSYS 16.01.0003)
 模拟工作室 4.3(Trnsys 17.01.0000)2010-04。2010-04 For Simulation Studio 4.3
(TRNSYS 17.00.0013)
 模拟工作室 5.2(Trnsys 17.01.0000)2011-11。2011-11 For Simulation Studio 5.2
(TRNSYS 17.01.0000)
 模拟工作室 5.3(Trnsys 17.01.0005)2012-02。2012-02 For Simulation Studio 5.3
(TRNSYS 17.01.0005)
 模拟工作室 5.4(TRNSYS 18.01.0001)2017-02。2017-02 For Simulation Studio 5.4
(TRNSYS 18.01.0001)

在 哪 里 可 以 找 到 更 多 信 息 。 WHERE TO FIND MORE


INFORMATION
有关程序和其可用性的进一步信息可以从 TrnSys 网站或来自热能系统专家 TrnSysAsv
获得,LLC:Further information about the program and its availability can be
obtained from the TRNSYS website or from the TRNSYS coordinator at Thermal
Energy System Specialists, LLC:
Trnsys 协调员。TRNSYS Coordinator
热能系统专家有限责任公司 22 North Carroll Street–Suite 370 Madison,WI 53703–

2–2
Translated by CQU Team Lu

U.S.A.。Thermal Energy System Specialists, LLC 22 North Carroll Street – suite 370
Madison, WI 53703 – U.S.A.

电子邮箱:techsupport@tess-inc.com。Email: techsupport@tess-inc.com

trnsys 网站:http://sel.me.wisc.edu/trnsys。TRNSYS website: http://sel.me.wisc.edu/trnsys

版权。COPYRIGHT
2004-2017 CSTB 版权所有。© 2004 - 2017 by CSTB
本文档中描述的软件是根据许可协议提供的。本手册和软件只能根据许可协议的条款使用
或复制。除非获得任何此类许可,否则未经 CSTB 事先书面同意,不得以任何形式或任何
方式复制或复制本手册的任何部分。The software described in this document is furnished
under a license agreement. This manual and the software may be used or copied only
under the terms of the license agreement. Except as permitted by any such license, no
part of this manual may be copied or reproduced in any form or by any means without
prior written consent from CSTB.

Trnsys 工作室贡献者。TRNSYS Studio Contributors


项目管理。Project management
沃纳∙基尔霍尔兹。Werner Keilholz
主要程序设计。Main programming and design

马克坎波拉。Marc Campora
沃纳∙基尔霍尔。Werner Keilholz
兹∙保罗∙塞特。Paul Sette

辅助编程器。Auxiliary programmers

德克∙阿克曼。Dirk Ackermann
尼古拉斯∙巴士。Nicolas Bus
亚历山大∙金辛格。Alexander Kinsinger
伯特兰∙托马斯。Bertrand Thomas
劳伦特∙沃兹尼亚克。Laurent Wozniak
埃尔胡阿里苏西。El‐Houari Soussi
萨拜恩∙塔里塔斯。Sabine Taristas
绘画设计。Graphic design

法比安∙西蒙 Fabien Simon

TRNSYS 投稿人 TRNSYS Contributors


TRNSYS 主要手册中列出了 TRNSYS 贡献者。 第 4 卷中列出了开发标准库中包含的组件的
2–3
Translated by CQU Team Lu

其他贡献者。TRNSYS Contributors are listed in the TRNSYS main manual. Additional


contributors who developed components that have been included in the Standard Library
are listed in Volume 4.
第 5 卷中列出了建筑物模型(56 型)及其接口(TRNBuild)的贡献者。Contributors to the
building model (Type 56) and its interface (TRNBuild) are listed in Volume 5.

目录 TABLE OF CONTENTS
2. 使用模拟工作室 USING THE SIMULATION STUDIO 2–11
2.1.一般信息 2–11。2.1. General Information 2–11
2.1.1.硬件要求 2–11。2.1.1. Hardware Requirements 2–11
2.1.2.安装程序 2–11。2.1.2. Installation Procedure 2–11
2.1.3.自动检查更新 2–11。2.1.3. Automatic check for updates 2–11
2.1.4.许可协议 2–13。2.1.4. License Agreement 2–13
2.1.5.获取附加信息 2–13。2.1.5. To Get Additional Information 2–13
2.1.6.如何使用本手册 2–13。2.1.6. How to Use this Manual 2–13
2.1.7.第 2‐13 条。2.1.7. Terms 2–13
2.1.8.入门 2–14。2.1.8. Getting Started 2–14
2.2.模拟工作室 Windows 2–15。2.2. Simulation Studio Windows 2–15
2.2.1.主窗口 2–15。2.2.1. Main Window 2–15
2.2.2.装配面板窗口 2–15。2.2.2. Assembly Panel Window 2–15
2.2.3.直接访问工具栏\/菜单 2–15。2.2.3. Direct Access Toolbar/Menu 2–15
2.2.4.形式窗口 2–15。2.2.4. Proforma Window 2–15
2.2.5.工具栏 2–15。2.2.5. Toolbars 2–15
2.2.6.指定所需信息 2–16。2.2.6. Specifying Required Information 2–16
2.3.形式 2–17。2.3. Proforma 2–17
2.3.1.形式表的常规选项卡 2–17。2.3.1. General Tab of the Proforma 2–17
2.3.2.形式描述页签 2–19。2.3.2. Description Tab of the Proforma 2–19
2.3.3.形式表的变量选项卡 2–20。2.3.3. Variables Tab of the Proforma 2–20
2.3.3.1.变量按钮 2–20。2.3.3.1. Variables button 2–20
2.3.3.1.1 姓名 2 ‐ 22。2.3.3.1.1. Name 2–22
2.3.3.1.2 尺寸 2‐22。2.3.3.1.2. Dimension 2–22
2.3.3.1.3。第 2 单元‐第 23 单元。2.3.3.1.3. Unit2–23
小精灵。角色 2 ‐ 23。2.3.3.1.4. Role 2–23
2.3.3.1.5。2 型‐ 23 型。2.3.3.1.5. Type 2–23

2–4
Translated by CQU Team Lu

2.3.3.1.6.最小值 2‐23。2.3.3.1.6. Minimum 2–23


2.3.3.1.7.支架盒 2‐24。2.3.3.1.7. Bracket Box 2–24
2.3.3.1.8.最大值 2–24。2.3.3.1.8. Maximum 2–24
2.3.3.1.9.默认值 2–24。2.3.3.1.9. Default 2–24
2.3.3.2.变量信息窗口 2–24。2.3.3.2. Variable Information Window 2–24
2.3.3.2.1.定义 2–26。2.3.3.2.1. Definition 2–26
2.3.3.3.创建变量周期 2–26。2.3.3.3. Creating Cycles of Variables 2–26
2.3.3.4.特殊卡 2–28。2.3.3.4. Special Cards 2–28
2.3.3.5.各单元意见 2–29。2.3.3.5. Comments for Each Unit 2–29
2.3.4.形式表的“文件”选项卡 2–29。2.3.4. The Files Tab of the Proforma 2–29
2.3.5.从另一个模型继承 2–31。2.3.5. Inheriting from another model 2–31
2.3.6.导出为 HTML 2–32。2.3.6. Export as HTML 2–32
2.3.7.作为 FORTRAN\/C++ 2—32 的导出。2.3.7. Export as Fortran/C++ 2–32
2.4.装配面板 2–34。2.4. Assembly Panel 2–34
2.4.1.移动部件和连接 2–34。2.4.1. Moving Components and Connections 2–34
2.4.2.删除组件 2–35。2.4.2. Deleting Components 2–35
2.4.3.撤消\/重做操作 2–36。2.4.3. Undoing/Redoing an operation 2–36
2.4.4.复制或复制组件 2–36。2.4.4. Duplicating or Copying Components 2–36
2.4.5.使用直接访问工具栏 2–36。2.4.5. Using the Direct Access Toolbar 2–36
2.4.6.获取信息(访问形式表)2–38。2.4.6. Getting Information (Accessing the
Proforma) 2–38
2.4.7.更改组件 2–38 的层。2.4.7. Changing the Layer of the Component 2–38
2.4.8.隔离部件 2–38。2.4.8. Isolating a component 2–38
2.4.9.旋转\/翻转部件 2–39。2.4.9. Rotating/flipping a component 2–39
2.4.10.创建链接 2–39。2.4.10. Creating Links 2–39
2.4.11.创建宏组件 2–40。2.4.11. Creating a Macro Component 2–40
2.4.12.分解现有宏 2–41。2.4.12. Exploding an existing macro 2–41
2.4.13.打开现有宏 2–41。2.4.13. Opening an existing macro 2–41
2.4.14.保存宏 2–41。2.4.14. Saving a Macro 2–41
2.4.15.保存项目 2–42。2.4.15. Saving a Project 2–42
2.4.16.添加或删除 trnsys trace 命令 2–42。2.4.16. Adding or removing the TRNSYS
Trace command 2–42
2.4.17.向装配窗口添加文本 2–42。2.4.17. Adding Text to the Assembly Window 2–
2–5
Translated by CQU Team Lu

42
2.4.18.锁定和解锁部件 2–42。2.4.18. Locking and Unlocking Components 2–42
2.4.19.访问模拟控制卡 2–43。2.4.19. Accessing the Simulation Control Cards 2–43
2.4.20.仅生成输入文件 2–45。2.4.20. Generate the Input File Only 2–45
2.4.21.访问生成的输入文件(.dck)2–45。2.4.21. Accessing the Generated Input File
(*.dck) 2–45
2.4.22.运行模拟 2–46。2.4.22. Running the Simulation 2–46
2.4.23.通过错误管理器访问列表文件(.lst)2–46。2.4.23. Accessing the List File (*.lst)
through the Error Manager 2–46
2.4.23.1.消息选项卡 2–47。2.4.23.1. Messages tab 2–47
2.4.23.2.单位统计表 2–48。2.4.23.2. Units stats tab 2–48
2.4.23.3.类型统计表 2–49。2.4.23.3. Types stats tab 2–49
2.4.23.4.lst 文件…表 2 ‐ 50。2.4.23.4. Lst file... tab 2–50
2.4.24.使用电子表格打开输出文件 2–50。2.4.24. Opening Output Files with a
spreadsheet 2–50
2.5.变量 2–51。2.5. Variables 2–51
2.5.1.锁定和解锁项目 2–52。2.5.1. Locking and unlocking Items 2–52
2.5.2.锁定或解锁所有变量 2–52。2.5.2. Locking or Unlocking all the Variables 2–52
2.5.3.特殊卡 2–54。2.5.3. Special Cards 2–54
2.5.4.循环 2‐54。2.5.4. Cycles 2–54
2.5.5.外部文件 2–55。2.5.5. External Files 2–55
2.5.6.评论 2–55。2.5.6. Comment 2–55
2.6.连接 2–57。2.6. Connections 2–57
2.6.1.创建连接 2–57。2.6.1. Creating a Connection 2–57
2.6.2.选择连接 2–59。2.6.2. Selecting a connection 2–59
2.6.3.删除连接 2–60。2.6.3. Deleting a connection 2–60
2.6.4.获取变量 2–60 的信息。2.6.4. Get Information on a Variable 2–60
2.6.5.删除多个链接 2–60。2.6.5. Deleting multiple links 2–60
2.6.6.链路定位 2–60。2.6.6. Link Positioning 2–60
2.6.6.1.链接 2-60 的用户定义位置。2.6.6.1. User Defined Positions for Links 2–60
2.6.6.2.链接的默认位置 2–61。2.6.6.2. Default Positions for Links 2–61
2.6.6.3.链接属性 2–61。2.6.6.3. Link properties 2–61
2.7.方程式 2–62。2.7. Equations 2–62

2–6
Translated by CQU Team Lu

2.8.主窗 2–65。2.8. Main Window 2–65


2.8.1.文件菜单 2–65。2.8.1. The file menu 2–65
2.8.1.1.文件/新建 2–66。2.8.1.1. File/New 2–66
2.8.1.2.文件/打开 2–67。2.8.1.2. File/Open 2–67
2.8.1.3.文件/关闭 2–68。2.8.1.3. File/Close 2–68
2.8.1.4.文件/保存 2–68。2.8.1.4. File/Save 2–68
2.8.1.5.文件/另存为 2–68。2.8.1.5. File/Save As 2–68
2.8.1.6.全部归档/保存 2–69。2.8.1.6. File/Save All 2–69
2.8.1.7.文件/导入 trnsys 输入文件…2–69。2.8.1.7. File/Import TRNSYS Input File... 2–
69
2.8.1.8.文件/导入 IISIBAT 2 模型…2–69。2.8.1.8. File/Import IISiBat 2 Model... 2–
69
2.8.1.9.文件/导入 IISIBAT2 库…2–69。2.8.1.9. File/Import IISiBat2 Library... 2–69
2.8.1.10.文件/导入 NBDM 2–69。2.8.1.10. File/Import NBDM 2–69
2.8.1.11.文件/导出 NBDM 2–70。2.8.1.11. File/Export NBDM 2–70
2.8.1.12.文件/报告 2–70。2.8.1.12. File/Report 2–70
2.8.1.13.文件/打印 2–70。2.8.1.13. File/Print 2–70
2.8.1.14.文件/打印预览 2–71。2.8.1.14. File/Print Preview 2–71
打印命令预览允许在实际打印页面之前,将其显示在纸张上。2–71。The Print command
preview allows to display a page as it would appear on paper before actually printing it.2–71
2.8.1.15.文件/打印机设置 2–71。2.8.1.15. File/Printer Setup 2–71
2.8.1.16.文件/导出为 HTML 2–71。2.8.1.16. File/Export as HTML 2–71
2.8.1.17.文件/导出为…2–71。2.8.1.17. File/Export as... 2–71
2.8.1.18.文件/设置 2–71。2.8.1.18. File/Settings 2–71
2.8.1.18.1.文件/设置/控制卡 2–71。2.8.1.18.1. File/Settings/Control Cards 2–71
2.8.1.18.2.文件/设置/项目 2–73。2.8.1.18.2. File/Settings/Project 2–73
2.8.1.18.3.文件/设置/目录 2–73。2.8.1.18.3. File/Settings/Directories 2–73
2.8.1.18.4.文件/设置/编译器+其他 2–74。2.8.1.18.4. File/Settings/Compiler+Others 2–
74
2.8.1.19.文件/出口 2–75。2.8.1.19. File/Exit 2–75
2.8.2.编辑菜单 2–76。2.8.2. The edit menu 2–76
2.8.2.1.编辑/撤消 ctrl+z 2–76。2.8.2.1. Edit/Undo CTRL+Z 2–76
2.8.2.2.编辑/重做 Ctrl+Y 2–76。2.8.2.2. Edit/Redo CTRL+Y 2–76
2.8.2.3.编辑/剪切 CTRL+X 2–76。2.8.2.3. Edit/Cut CTRL+X 2–76
2–7
Translated by CQU Team Lu

2.8.2.4.编辑/复制 Ctrl+C 2–77。2.8.2.4. Edit/Copy CTRL+C 2–77


2.8.2.5.编辑/粘贴 CTRL+V 2–77。2.8.2.5. Edit/Paste CTRL+V 2–77
2.2.2.6.编辑/删除 DEL 2 ‐ 77。2.8.2.6. Edit/Delete DEL 2–77
2.8.2.7.编辑/替换 2–77。2.8.2.7. Edit/Replace 2–77
2.8.2.8.编辑/更新项目 2–77。2.8.2.8. Edit/Update project 2–77
2.8.2.9.编辑/属性…2–77。2.8.2.9. Edit/Properties... 2–77
2.8.3.视图菜单 2–79。2.8.3. The view menu 2–79
2.8.3.1.视图/页面边界 2–79。2.8.3.1. View/Page Bounds 2–79
2.8.3.2.视图/网格 2–79。2.8.3.2. View/Grid 2–79
2.8.3.3.查看/捕捉到网格 2–79。2.8.3.3. View/Snap to Grid 2–79
2.8.3.4.视图/网格属性…2–80。2.8.3.4. View/Grid Properties... 2–80
2.8.3.5.正常视图/缩放 2–80。2.8.3.5. View/Zoom Normal 2–80
2.8.3.6.查看/缩放百分比 2–80。2.8.3.6. View/Zoom Percent 2–80
2.8.3.7.查看/缩放自定义 2–80。2.8.3.7. View/Zoom Custom 2–80
2.8.3.8.视图/缩放以适应 2–80。2.8.3.8. View/Zoom to Fit 2–80
2.8.3.9.查看/显示层 2–80。2.8.3.9. View/Show Layers 2–80
2.8.3.10.视图/工具栏 2–80。2.8.3.10. View/Toolbars 2–80
2.8.3.11.视图/状态栏 2–80。2.8.3.11. View/Status Bar 2–80
2.8.4.直接进入菜单 2–81。2.8.4. Direct Access Menu 2–81
2.8.5.装配菜单 2–82。2.8.5. Assembly Menu 2–82
2.8.5.1.装配/插入新方程式 2–82。2.8.5.1. Assembly/Insert New Equation 2–82
2.8.5.2.装配/链接模式 2–82。2.8.5.2. Assembly/ Link Mode 2–82
2.8.5.3.装配/添加移除痕迹 2–83。2.8.5.3. Assembly/Add‐Remove Trace 2–83
2.8.5.4.装配/开锁 2–83。2.8.5.4. Assembly/Lock‐Unlock 2–83
2.8.5.5.装配/形式…2–83。2.8.5.5. Assembly/ Proforma... 2–83
2.8.5.6.装配/变量…2–83。2.8.5.6. Assembly/ Variables... 2–83
2.8.5.7.汇编/打开宏 2–83。2.8.5.7. Assembly/ Open Macro 2–83
2.8.5.8.装配/关闭宏 2–83。2.8.5.8. Assembly/ Close Macro 2–83
2.8.5.9.汇编/创建宏 2–83。2.8.5.9. Assembly/ Create Macro 2–83
2.8.5.10.装配/分解宏 2–84。2.8.5.10. Assembly/Explode Macro 2–84
2.8.5.11.汇编/保存宏…2–84。2.8.5.11. Assembly/Save Macro... 2–84
2.8.5.12.装配/输出管理器 2–84。2.8.5.12. Assembly/Output Manager 2–84

2–8
Translated by CQU Team Lu

2.8.5.12.1.连接按钮 2–84。2.8.5.12.1. Connect button 2–84


2.8.5.12.2.拆下连接按钮 2–84。2.8.5.12.2. Remove connection button 2–84
2.8.5.12.3.添加绘图仪\/打印机按钮 2–84。2.8.5.12.3. Add Plotter /Printer button 2–84
2.8.5.12.4.打印机和绘图仪属性 2–84。2.8.5.12.4. Printers and plotters properties 2–
84
2.8.5.12.5.添加变量按钮 2–84。2.8.5.12.5. Add variable button 2–84
2.8.5.13.装配/控制卡…2–85。2.8.5.13. Assembly/Control Cards... 2–85
2.8.5.14.装配/图表图像…2–86。2.8.5.14. Assembly/Diagram Image... 2–86
2.8.5.15.装配/添加文本…2–86。2.8.5.15. Assembly/Add Text... 2–86
2.8.5.16.组装/在电子表格中打开 2–86。2.8.5.16. Assembly/Open in Spreadsheet 2–
86
2.8.5.17.组装/发送到层 2–87。2.8.5.17. Assembly/Send To Layer 2–87
2.8.5.18.装配/连接…2–87。2.8.5.18. Assembly/Connections... 2–87
2.8.5.19.程序集/长变量名 2–87。2.8.5.19. Assembly/Long Variable Names 2–87
2.8.6.计算菜单 2–88。2.8.6. Calculate Menu 2–88
2.8.6.1.计算/创建输入文件 2–88。2.8.6.1. Calculate/Create Input File 2–88
2.8.6.2.计算/运行模拟 2–88。2.8.6.2. Calculate/Run Simulation 2–88
2.8.6.3.计算/打开 2–89。2.8.6.3. Calculate/Open 2–89
2.8.7.工具菜单 2–90。2.8.7. Tools menu 2–90
2.8.7.1.工具/编辑器 2–90。2.8.7.1. Tools/Editor 2–90
2.8.7.2.工具/单元字典 2–90。2.8.7.2. Tools/Unit Dictionary 2–90
2.8.7.3.工具/TrnBuild 2–90。2.8.7.3. Tools/TRNBuild 2–90
2.8.7.4.工具/PREP。2.8.7.4. Tools/PREP
2.8.7.5.工具/SPREAD。2.8.7.5. Tools/SPREAD
2.8.7.6.工具/试验 2–91。2.8.7.6. Tools/TRNEdit 2–91
2.8.7.7.工具/Fortran 环境 2–91。2.8.7.7. Tools/Fortran Environment 2–91
2.87.8.工具/C++环境 2 ‐ 91。2.8.7.8. Tools/C++ Environment 2–91
2.8.7.9.工具/重建 Trnsys 2–91。2.8.7.9. Tools/Rebuild TRNSYS 2–91
2.8.7.10.工具/执行用户命令 2–91。2.8.7.10. Tools/Execute User Command 2–91
2.8.8.Windows 菜单 2–91。2.8.8. Windows menu 2–91
2.8.8.1.窗口/层叠 2–92。2.8.8.1. Windows/Cascade 2–92
2.8.8.2.窗口/平铺 2–92。2.8.8.2. Windows/Tile 2–92
2.8.8.3.窗口/排列图标 2–92。2.8.8.3. Windows/Arrange Icons 2–92
2–9
Translated by CQU Team Lu

2.8.8.4.窗口/关闭所有窗口 2–92。2.8.8.4. Windows/Close All Windows 2–92


2.8.8.5.Windows/最近使用的文件列表 2–92。2.8.8.5. Windows/List of Recent Files 2–
92
2.8.9.帮助菜单 2–93。2.8.9. Help Menu 2–93
2.2.9.1./帮助 2–93。2.8.9.1. /Help2–93
2.2.9.2./检查更新 2–93。2.8.9.2./Check for updates 2–93
2.2.9 大约…2–94。2.8.9.3. About... 2–94
2.9.单元词典 2–95。2.9. Unit dictionary 2–95
2.9.1.创建新维度 2–97。2.9.1. Creating a New Dimension 2–97
2.9.2.新建单元 2–97。2.9.2. Creating a New Unit 2–97
2.9.3.删除尺寸或单元 2–97。2.9.3. To Delete a dimension or Unit 2–97
2.9.4.单元字典示例 2–98。2.9.4. Unit Dictionary Example 2–98
2.10.搜索工具栏 2–99。2.10. The search toolbar 2–99
2.11.命令行参数 2–99。2.11. Command line arguments 2–99
2.12.附录 1:右键菜单列表 2–101。2.12. Appendix 1: Right‐Click Menus List 2–
101
2.12.1.右键单击组装面板 2–101 中的组件图标。2.12.1. Right‐Click On Component
Icons in the Assembly Panel 2–101
2.12.2.右键单击“装配面板”窗口 2–102 中的宏。2.12.2. Right‐Click On Macros in Assembly
Panel Window 2–102
2.12.3.右击装配面板窗口 2–103 中的空白点。2.12.3. Right‐Click On Blank Spot in
Assembly Panel Window 2–103
2.12.4.右键单击“装配面板”窗口 2–103 中的链接。2.12.4. Right‐Click On Links in
Assembly Panel Window 2–103
2.12.5.插件技术 2–104。2.12.5. The plug‐in technology 2–104
2.12.6.模拟工作室设置 2–105。2.12.6. Simulation Studio settings 2–105
2.12.7.如何将插件连接到 Simulation Studio 2–106。2.12.7. How to connect your plug‐in
to Simulation Studio 2–106
2.12.7.1.在形式表中指定插件路径名。2–106。2.12.7.1. Specify the plug-in path
name in the Proforma. 2–106
2.12.7.2.在组件属性中指定插件路径名。2–106。2.12.7.2. Specify the plug-in path
name in the component properties. 2–106
2.12.8.如何启动插件 2–108。2.12.8. How to launch the plug‐in 2–108
2.12.8.1.如果选项“自动启动插件”设置为“假”2–108。2.12.8.1. If the option “Automatically
launch plug‐in” is set to “false” 2–108
2.12.8.2.如果选项“自动启动插件”设置为“真”2–110。2.12.8.2. If the option “Automatically
2–10
Translated by CQU Team Lu

launch plug‐in” is set to “true” 2–110


2.12.9.插入方程式 2–111。2.12.9. Plug‐in with Equations 2–111
2.12.10.交换文件 2–113。2.12.10. The exchange file 2–113
2.12.11.组件 2–113 的交换文件。2.12.11. The exchange file for component 2–113
2.13.附录 3:如何使用向导 2–117。2.13. Appendix 3: How to use the Wizard 2–
117
2.13.1.说明 2–117。2.13.1. Description 2–117
2.13.2.多区域建筑项目步骤 2–117。2.13.2. Multizone Building project step by step 2–
117
2.13.2.1.步骤 1/10:选择项目类型 2–117。2.13.2.1. Step 1/10: Selecting the project type
2–117
2.13.2.2.步骤 2/10:绘制平面图 2–118。2.13.2.2. Step 2/10: Drawing the floor plan 2–
118
2.13.2.3.步骤 3/10:设置区域属性 2–119。2.13.2.3. Step 3/10: Setting zone properties
2–119
2.13.2.4.步骤 4/10:设置窗口、方向和位置 2–120。2.13.2.4. Step 4/10: Setting windows,
orientation and location 2–120
2.13.2.5.步骤 5/10:渗透和通风 2–121。2.13.2.5. Step 5/10: Infiltration and ventilation
2–121
2.13.2.6.步骤 6/10:加热和冷却 2–122。2.13.2.6. Step 6/10: Heating and Cooling 2–
122
2.13.2.7.步骤 7/10:增益和照明 2–123。2.13.2.7. Step 7/10: Gains and lighting 2–
123
2.13.2.8.步骤 8/10:固定阴影 2–124。2.13.2.8. Step 8/10: Fixed shading 2–124
2.13.2.9.步骤 9/10:移动阴影 2–125。2.13.2.9. Step 9/10: Movable shading 2–125
2.13.2.10.步骤 10/10:描述摘要 2–126。2.13.2.10. Step 10/10: Description summary 2–
126
2.13.2.11.修改模板文件 2–127。2.13.2.11. Adapting the template files 2–127

图表。Table of figures
图 2.1.3-1:激活自动更新 2–12。Figure 2.1.3-1: Activation of automatic updates 2–12

图 2.1.3-2:更新屏幕 2–12 示例。Figure 2.1.3-2: Example of update screen... 2–12


图 2.2.5-1:带有活动元件的工具栏示例。2–16。Figure 2.2.5-1: Example of tool bar with
active element. ................................................................................................... 2–16

图 2.3.1-1:形式表 2-18 的第一章。Figure 2.3.1-1: First Chapter of the Proforma 2–18

2–11
Translated by CQU Team Lu

图 2.3.2-1:摘要第 2-20 节。Figure 2.3.2-1: Abstract Section ........................... 2–20


图 2.3.3-1:形式表 2–21 的变量选项卡。Figure 2.3.3-1: Variables Tab of the Proforma
........................................................................................................................... 2–21

图 2.3.3-2:变量表 2-21。Figure 2.3.3-2: Variable table .................................... 2–21

图 2.3.3-3:变量信息窗口 2–25。Figure 2.3.3-3: Variable Information Window2–25

图 2.3.3-4:单击行标题 2–26。Figure 2.3.3-4: Click on the row header........... 2–26

图 2.3.3-5:周期管理 2–27。Figure 2.3.3-5: Cycle management ..................... 2–27

图 2.3.3-6:周期描述窗口 2–28。Figure 2.3.3-6: Cycle description window ..... 2–28

图 2.3.3-7:特殊卡第 2–29 节。Figure 2.3.3-7: Special Cards Section ............ 2–29


图 2.3.4-1:形式表 2–30 的文件选项卡。Figure 2.3.4-1: File Tab of Proforma . 2–30

图 2.3.5-1:“儿子”2-31。Figure 2.3.5-1: “Sons” ....................................... 2–31

图 2.3.5-2 : “ 更 新 继 承 ” 窗 口 2 – 32 。 Figure 2.3.5-2: "Update Inheritance" window


........................................................................................................................... 2–32

图 2.4.1-1:样品装配面板 2-35。Figure 2.4.1-1: Sample Assembly Panel ........ 2–35

图 2.4.5-1:直接访问工具 2–36。Figure 2.4.5-1: Direct Access Tool ............... 2–36

图 2.4.5-2:选择 56B 类型的直接访问菜单 2–37。Figure 2.4.5-2: Direct Access Menu with


TYPE56b chosen ............................................................................................... 2–37
图 2.4.5-3:选择 56B 类型的直接访问工具栏 2–37。Figure 2.4.5-3: Direct Access Toolbar
with type56b chosen ........................................................................................... 2–37

图 2.4.8-1:聚焦于组件 2–39。Figure 2.4.8-1: Focusing on a component ....... 2–39

图 2.4.16-1:跟踪组件模型 2-42。Figure 2.4.16-1: Traced Component Model .. 2–42

图 2.4.18-1:锁定组件模型 2-43。Figure 2.4.18-1: Locked Component Model . 2–43

图 2.4.19-1:控制卡窗口 2–43。Figure 2.4.19-1: Control Cards Window ........ 2–43

图 2.4.19-2:组件订单窗口 2–45。Figure 2.4.19-2: Component Order Window 2–45


图 2.4.23-1:错误管理器-消息选项卡 2–47。Figure 2.4.23-1: Error Manager - Messages
tab ...................................................................................................................... 2–47
图 2.4.23-2:错误管理器-单位统计表 2–48。Figure 2.4.23-2: Error manager - Units stats
tab ...................................................................................................................... 2–48
图 2.4.23-3:错误管理器–类型统计表 2–49。Figure 2.4.23-3: Error Manager – Types
stats tab .............................................................................................................. 2–49

2–12
Translated by CQU Team Lu

图 2.4.23-4:错误管理器–LST 文件…表 2–50。Figure 2.4.23-4: Error Manager – Lst


file… tab ............................................................................................................. 2–50

图 2.4.24-1:输入窗口 2–52。Figure 2.4.24-1: Inputs Window........................ 2–52

图 2.5.1-1:锁定和解锁变量示例 2–52。Figure 2.5.1-1: Example of Locked and Unlocked


Variables ............................................................................................................ 2–52
图 2.5.2-1:变量信息窗口 2–53。Figure 2.5.2-1: Variable Information Window2–53

图 2.5.3-1:特殊卡示例 2-54。Figure 2.5.3-1: Special Cards Example ............. 2–54

图 2.5.4-1:输入循环对话框。2–55。Figure 2.5.4-1: Dialog for input cycle...... 2–55

图 2.5.6-1:外部文件示例 2–56。Figure 2.5.6-1: External Files Example ........ 2–56

图 2.5.6-2:注释选项卡示例 2–56。Figure 2.5.6-2: Comment tab example ..... 2–56


图 2.6.1-1:连接窗口–经典选项卡 2–58。Figure 2.6.1-1: Connections Window – Classic
tab ........................................................................................................................ 2–58
图 2.6.1-2:连接窗口–表选项卡 2–59。Figure 2.6.1-2: Connections Window – Table tab
............................................................................................................................. 2–59
图 2.6.6-1:链接 2–61 的默认位置。Figure 2.6.6-1: Default position for links ... 2–61
图 2.6.6-2:链接 2-61 的用户定义位置。Figure 2.6.6-2: User defined positions for links
........................................................................................................................... 2–61
图 2.6.6-3:连接窗口–表选项卡 2–61。Figure 2.6.6-3: Connections Window – Table tab
............................................................................................................................. 2–61

图 2.6.6-1:公式窗口 2–63。Figure 2.6.6-1: Equation Window ........................ 2–63

图 2.6.6-2:方程式窗口 2–64 中的完整方程式。Figure 2.6.6-2: Complete Equation in


Equation window ................................................................................................ 2–64

图 2.8.1-1:文件菜单 2–65。Figure 2.8.1-1: The File Menu ............................. 2–65

图 2.8.1-2:向导对话框 2–66。Figure 2.8.1-2: Wizard dialog box .................... 2–66


图 2.8.1-3:打开对话框窗口 2–67。Figure 2.8.1-3: The Open dialog window .. 2–67
图 2.8.1-4:将文件另存为对话框 2–68。Figure 2.8.1-4: Save File As dialog box 2–68

图 2.8.1-5:打印对话框 2–70。Figure 2.8.1-5: Print dialog box ........................ 2–70

图 2.8.1-6:控制卡设置选项卡 2–72。Figure 2.8.1-6: Control Cards Settings Tab 2–72


图 2.8.1-7:项目设置选项卡 2–72。Figure 2.8.1-7: Project Settings Tab ......... 2–72
图 2.8.1-8:目录设置选项卡 2–73。Figure 2.8.1-8: Directories Settings Tab ... 2–73
图 2.8.1-9:设置编译器信息框 2–75。Figure 2.8.1-9: The Setup Compiler Information Box
........................................................................................................................... 2–75
2–13
Translated by CQU Team Lu

图 2.8.2-1:编辑菜单 2–76。Figure 2.8.2-1: The Edit Menu ............................. 2–76

图 2.8.2-2:组件属性对话框 2–78。Figure 2.8.2-2: Component Properties Dialog Box


............................................................................................................................. 2–78

图 2.8.3-1:视图菜单 2–79。Figure 2.8.3-1: View Menu ............................... 2–79

图 2.8.4-1:直接访问工具 2–81。Figure 2.8.4-1: Direct Access Tool ............ 2–81

图 2.8.5-1:组装菜单 2–82。Figure 2.8.5-1: Assembly Menu ....................... 2–82

图 2.8.5-2:输出管理器对话框 2–85。Figure 2.8.5-2: Output manager dialog2–85

图 2.8.5-3:控制卡窗口 2–86。Figure 2.8.5-3: Control Cards Window......... 2–86

图 2.8.6-1:Calculate 菜单 2–88。Figure 2.8.6-1: The Calculate Menu ........... 2–88

图 2.8.7-1:工具菜单 2–90。Figure 2.8.7-1: The Tools Menu ....................... 2–90

图 2.8.8-1:Windows 菜单 2–92。Figure 2.8.8-1: Windows menu ................... 2–92

图 2.8.9-1:帮助菜单 2–93。Figure 2.8.9-1: The Help Menu ........................ 2–93

图 2.8.9-2:Simulation Studio 关于窗口 2–94。Figure 2.8.9-2: Simulation Studio About


Window ......................................................................................................... 2–94

图 2.8.9-1:单元字典窗口 2–95。Figure 2.8.9-1: Unit Dictionary Window .... 2–95


图 2.8.9-2:维度属性窗口 2–96。Figure 2.8.9-2: Dimension properties Window2–96
图 2.8.9-3:单元定义窗口 2–97。Figure 2.8.9-3: Unit Definition Window ..... 2–97

图 2.9.4-1:搜索工具栏 2–99。Figure 2.9.4-1: The search toolbar ............... 2–99

图 2.11.6-1:插入式控制卡 2–105。Figure 2.11.6-1: Plug-in control card ... 2–105


图 2.11.8-1:插件启动按钮 2–108。Figure 2.11.8-1: Plug-in launch button 2–108

图 2.11.8-2:插入路径 2–109。Figure 2.11.8-2: Plug-in path...................... 2–109

图 2.11.8-3:Functioneditor 作为插件示例 2–110。Figure 2.11.8-3: FunctionEditor as a


plug-in example ............................................................................................. 2–110
图 2.11.9-1:方程式插件路径 2–111。Figure 2.11.9-1: Equation plug-in path2–111
图 2.11.9-2:记事本作为公式插件 2–112。Figure 2.11.9-2: Notepad as equation plug-in
...................................................................................................................... 2–112

图 2.12.1-1:向导对话框 2–117。Figure 2.12.1-1: The wizard dialog ......... 2–117

图 2.12.2-1:选择项目类型 2–117。Figure 2.12.2-1: Selecting the project type2–117

2–14
Translated by CQU Team Lu

图 2.12.2-2:绘制平面图 2-118。Figure 2.12.2-2: Drawing the floor plan .... 2–118

图 2.12.2-3:区域属性 2-119。Figure 2.12.2-3: Zone properties.................. 2–119

图 2.12.2-4 : 窗 口 、 位 置 和 方 向 2 – 120 。 Figure 2.12.2-4: Windows, location and


orientations .................................................................................................... 2–120

图 2.12.2-5:渗透和通风 2–121。Figure 2.12.2-5: Infiltration and ventilation2–121

图 2.12.2-6:加热和冷却 2–122。Figure 2.12.2-6: Heating and cooling ..... 2–122

图 2.12.2-7:增益和照明 2–123。Figure 2.12.2-7: Gains and lighting ........ 2–123

图 2.12.2-8:固定阴影 2–124。Figure 2.12.2-8: Fixed shading .................. 2–124

图 2.12.2-9:活动阴影 2–125。Figure 2.12.2-9: Movable shading ............. 2–125

图 2.12.2-10:描述摘要 2–126。Figure 2.12.2-10: Description summary ... 2–126

2. 使用 Simulation Studio 。 USING THE SIMULATION


STUDIO
2.1. 一般信息。General Information
Simulation Studio 是一个完整的仿真包,包含多个工具,从仿真引擎程序和图形连接程序到
绘图和电子表格软件。它是一个集成工具,可以用于从一个项目的设计到它的模拟。。
Simulation Studio is a complete simulation package containing several tools, from
simulation engine programs and graphical connection programs to plotting and
spreadsheet software. It is an integrated tool which can be used from the design of a
project to its simulation.

2.1.1. 硬件要求。Hardware Requirements


Simulation Studio 软 件 适 用 于 具 有 以 下 最 低 要 求 的 IBM PC 和 兼 容 计 算 机 : 。 The
Simulation Studio software is intended for IBM PC and compatible computers with the
following MINIMUM requirements:
处理器:奔腾。Processor: Pentium

内部时钟:166MHz 或更快的 RAM:64MB 或更大。Internal clock: 166 MHz or faster


RAM: 64 Mb or more
操作系统:NT4 或 NT5,2000,xp。OS: NT4 or NT5, 2000, XP
屏幕:800x600 像素(建议使用 1024x768 显示器)硬盘:600 MB 可用硬盘空间。Screen:
800x600 pixels (a 1024x768 monitor is recommended) Hard Disk:
600 MB Free Hard Disk Space

2.1.2. 安装程序。Installation Procedure


要安装 Simulation Studio 和 Trnsys 软件包,请参阅题为“入门”的文档。For installing the
2–15
Translated by CQU Team Lu

Simulation Studio and TRNSYS packages please refer to the document entitled
"Getting Started".

2.1.3. 自动检查更新。Automatic check for updates


Simulation Studio 包 含 一 个名 为 “WinSparkle ” 的 机 制, 允 许 它 自 动 检 查 软 件 更 新 。
WinSparkle 是一个开源软件组件,在麻省理工学院许可下发布(有关详细信息,请参阅中
的“复制”winsparkle.dll.txt。\\trnsys17\\studio\\exe)。Simulation Studio contains a
mechanism called ‘winsparkle’, which allows it to automatically check for software
updates. Winsparkle is an open source software component distributed under the MIT
license (see COPYING_WinSparkle.dll.txt in .\Trnsys17\Studio\Exe for details).
当 Simulation Studio 第二次启动时,它将询问用户是否希望软件自动检查更新:。When
Simulation Studio is started for the second time, it will ask the user if he wishes the
software to check for updates automatically:

图 2.1.3-1:激活自动更新。Figure 2.1.3-1: Activation of automatic updates

如果用户单击“不检查”,软件将不会自动检查更新。如果用户单击“自动检查”,软件将
尝试连接到 Internet 以检查是否有可用的更新。这项检查一天不超过一次。If the user
clicks “Don’t check” the software will not automatically check for updates. If the
user clicks “ Check automatically ” , the software will attempt to connect to the
Internet to check if updates are available. This check will not be done more often than
once a day.
也可以手动检查更新,使用?/检查 Simulation Studio 中的“更新”菜单。即使选择了“不
检 查 ” , 此 选 项 也 可 用 。 It is also possible to check for updates manually, using
the ?/Check for updates menu in simulation Studio. This option is available even if
‘Don’t check’ has been selected.
如果找到更新,将显示更新摘要。然后用户可以在下列选项之间进行选择:If an update is
found, a summary of the update is displayed. The user can then choose between the
following options:
- 跳过此版本:将不安装更新,并且不再向用户建议更新。只有当更新可用时,才会
再次提出新的更新。Skip this version: will not install the update and no longer proposes it
to the user. New updates will only be proposed again if an even newer update will be
available.
- 以后提醒我:不会安装更新,但建议第二天再安装。Remind me later: will not
install the update, but proposes it again the next day.
- 安装更新:重定向到可以下载更新的 Internet 站点。在下载后启动安装程序之前,
应关闭 Simulation Studio。Install update: redirects to the Internet site where the update
can be downloaded. Simulation Studio should be closed before launching the installer
2–16
Translated by CQU Team Lu

after the download.

图 2.1.3‐2:更新屏幕示例。Figure 2.1.3‐2: Example of update screen


2.1.4. 许可协议。License Agreement
仿真工作室作为 trnsys 17 包的一部分分发。有关详细信息,请参阅 trnsys 17 最终用户许
可协议(trnsys 安装中的 license.txt 文件)。The Simulation Studio is distributed as part of
the TRNSYS 17 package. Please refer to the TRNSYS 17 End-User License Agreement
(file license.txt in your TRNSYS installation) for details.

2.1.5. 获取其他信息。To Get Additional Information


模拟工作室项目由法国索菲亚安蒂波利斯的 CSTB(建筑技术和科学中心)拥有和维护。本
手册描述了一个版本的 Simulation Studio 程序,该程序已被改编为容纳 TRNSYS 仿真软件
程 序 。 有 关 Studio Studio 程 序 的 进 一 步 信 息 , 以 及 它 的 可 用 性 , 可 以 从 您 的 本 地
TrnSysDealor 或模拟工作室协调员获得:The Simulation Studio program is owned and
maintained by the CSTB (the Building Technical and Scientific Centre), Sophia
Antipolis, France. This manual describes a version of the Simulation Studio program
which has been adapted to house the TRNSYS simulation software program. Further
information about the Simulation Studio program, and its availability, can be obtained
from your local TRNSYS distributor or the Simulation Studio Coordinator at:
CSTB BP 209
06 904 Sophia Antipolis FRANCE
Tel: 33 4 93 956 700
Fax: 33 4 93 956 733
Email: software@cstb.fr

2–17
Translated by CQU Team Lu

2.1.6. 如何使用这个手册 How to Use this Manual


本手册中提供的信息旨在为用户提供完整的 Simulation Studio 参考源。本手册的目的是通
过提供各种菜单项,工具及其功能的完整说明来帮助用户提高对 Simulation Studio 环境的
了解。本手册无意提供有关 TRNSYS 仿真软件或 Simulation Studio 程序中包含的任何
TRNSYS 实用程序子程序的详细信息。这些软件包的详细信息可在其各自的手册中找到。
TRNSYS 手册集的第 III 卷中提供了将 TRNSYS 与 Simulation Studio 一起使用的介绍。强
烈建议在阅读本手册之前,先阅读并执行介绍手册和教程。The information presented in
this manual is intended to provide a complete Simulation Studio reference source for the
user. The intent of this manual is to help the user achieve proficiency in the Simulation
Studio environment by providing complete descriptions of the various menu items,
tools and their functions. This manual is not intended to provide detailed information
about the TRNSYS simulation software nor any of the TRNSYS utility subprograms
housed in the Simulation Studio program. Detailed information on these packages may
be found in their respective manuals. An introduction to using TRNSYS with
Simulation Studio can be found in volume III of the TRNSYS manual set. It is highly
recommended that the Introduction manual and tutorial be read and performed before
reading this manual.

2.1.7. 术语 Terms
在本手册中以及整个可用的在线 Simulation Studio 帮助系统中,术语“组件模型”,“模
型”和“组件”将互换使用。 这三个术语都描述了设备或模块的 TRNSYS 表示。 出于
TRNSYS 的目的,模型由描述其操作的子例程或子程序(用 FORTRAN,C,C ++或类似
编程语言编写)表示。 TRNSYS 组件模型的示例包括储水箱,太阳能收集器,天气处理器
和 打 印 机 。 Throughout this manual, and throughout the available on-line Simulation
Studio help system, the terms 'component model', 'model', and 'component' will be used
interchangeably. These three terms all describe the TRNSYS representation of a piece
of equipment or module. For TRNSYS purposes, a model is represented by a
subroutine or sub-program (written in FORTRAN, C, C++ or similar programming
languages) describing its operation. Examples of TRNSYS component models include a
storage tank, a solar collector, a weather processor, and a printer.
术语'assembly'、'assembly of models'、'project'和'simulation'都是指一组组件模型,
这些组件模型以执行一组任务的方式相互连接。例如,天气处理器模型、太阳能集热器模
型和储水箱模型之间的互连,以模拟太阳能量对水的加热,被认为是一个项目或组件。出
于 trnsys 的目的,组件模型的程序集由 trnsys 输入文件(deck)表示,该文件列出了组件
模型及其交互。The terms 'assembly', 'assembly of models', 'project', and 'simulation' all
refer to a set of component models which are interconnected in such a way as to
perform a set task. For example, the interconnection of the weather processor model,
the solar collector model, and the storage tank model in such a way as to simulate the
heating of water by the sun's energy is considered to be a project or assembly. For
TRNSYS purposes, assemblies of component models are represented by a TRNSYS input
file (the deck), a file listing the component models and their interactions.
术语“ms”和“microsoft ”指的是微 软 公司。 术 语“MS Windows ”是 指 Simulation
Studio 运行的所有 Microsoft Windows 产品版本,包括 Windows 98-2、Windows NT 4.0、
Windows NT 5.0 、 Windows 2000 、 Windows XP 和 Vista 。 术 语 “ 窗 口 ” 是 指
Simulation Studio 或其他产品中的任何窗口,而不是指 Windows 操作系统。The terms

2–18
Translated by CQU Team Lu

‘MS’ and ‘Microsoft’ refer to Microsoft Corporation. The term ‘MS Windows’
refers to all versions of Microsoft Windows products on which Simulation Studio
operates including Windows 98-2, Windows NT 4.0, Windows NT 5.0, Windows 2000,
Windows XP, and Vista. The term ‘window’ refers to any window within Simulation
Studio or other products and does not refer to the Windows operating system.

2.1.8. 入门。Getting Started


假设您已正确安装了软件,在“开始”按钮的 trnsys 17 文件夹中选择“trnsys simulation
studio”将启动 simulation studio 软件。“关于”窗口将包含重要的许可信息。Assuming
that you have installed the software correctly, selecting “Trnsys Simulation Studio”
in the TRNSYS 17 folder of the START button will launch the Simulation Studio software.
The About window will contain important licensing information.
通常,用户将从主窗口菜单栏的“文件/新建”菜单中创建一个新的空项目开始,这将创建
一个空白的装配面板窗口(标题为“project x.tpf”,其中 x 是当前项目索引)。然后,用户
将使用直接访问菜单(一个下拉主菜单)选择组件,并将组件放置在装配面板上。然后,使
用鼠标右键或菜单,用户可以选择和改变参数和初始输入值等,删除、复制或粘贴组件等。
最后,用户可以将这些组件链接在一起,并将一个组件的输出连接到另一个组件的输入。In
general, the user will begin by making a New Empty Project from the File/New menu
in the Main Window menu bar, which creates a blank Assembly Panel window (titled
"ProjectX.tpf", where X is the current project index). The user will then select
components using the Direct Access menu, one of the drop down main menus, and
place the components on the Assembly panel. Then, using the right mouse button or
menus, the user can select and change the parameters and initial input values, etc.,
delete, copy or paste the components, etc. Finally, the user can link these components
together and connect the outputs of one component to the inputs of another component.
模拟可以执行一次:The simulation can be executed once:
1) 所有必要的部件都放置在装配面板上。All the necessary components are placed on the
Assembly Panel.
2) 为每个组件定义参数和初始值。The parameters and initial values are defined for each
component.
3) 在组件之间建立必要的链接,完成从一个组件的输出到另一个组件的输入的内部连接。
The necessary links between components are made and the internal connections from
one component’s outputs to another component’s inputs are completed.
用户将选择 Calculate(或按 F8)以运行模拟。可以使用计算\/打开菜单查看和打印结果。
基于这些结果,可以对装配板中的项目中的组件进行调整,并且可以进行更多的仿真。The
user will select Calculate (or press F8) in order to run the simulation. The results can be
viewed and printed using the Calculate/Open menu. Based on the results, adjustments
can be made to the components in the project in the Assembly Panel and more
simulations can be run.

2.2. 模拟工作室窗口。Simulation Studio Windows


Simulation Studio 程序中的所有主窗口都具有一些公共属性。在显示每个窗口之前,将首先
解释这些常见属性。All of the main windows in the Simulation Studio program have some
common properties. These common properties will be explained first before the
2–19
Translated by CQU Team Lu

presentation of each window.

2.2.1. 主窗口。Main Window


主窗口是用户在进入 Simulation Studio 程序时首先看到的内容。与其他 MS Windows 程序
一样,它由一系列下拉菜单、几个工具栏和一个或多个活动窗口组成。启动时,主窗口是
空的。通常,在用户创建新项目或打开现有项目后,程序集面板将显示在主窗口中。此外,
可以通过 Studio Studio 的主窗口访问仿真工作室和其他 TrnSyS 工具的所有其他必要特征。
其中一些功能将启动单独的程序,这些程序将在自己的窗口中打开。根据当前发生的操作,
这些窗口要么可用,要么显示为“灰色”。菜单和子菜单见第 2.8 节。The Main window is
what users first see when entering the Simulation Studio program. As with other MS
Windows programs, it consists of a series of pull-down menus, several toolbars and one
or more active windows. On start-up, the main window is empty. Normally, the Assembly
Panel will be shown in the main window after the user creates a new project or opens an
existing project. Additionally, all other necessary features of Simulation Studio and other
TRNSYS tools can be accessed through the main window of Simulation Studio. Several
of these features will launch separate programs which will open in their own windows.
Depending on the current operation occurring, these windows are either usable or "grayed-
out". The menus and submenus are described in section 2.8.

2.2.2. 装配面板窗口。Assembly Panel Window


“装配”面板是 Simulation Studio 中的窗口,用户将在其中创建、修改和运行模型(项目)
的装配。可以通过创建一个新的空白项目(使用文件/新建)或使用文件/打开菜单项打开现
有的项目来访问组装面板。第 2.4 节详细说明了装配面板的使用。The Assembly Panel is
the window in Simulation Studio where the user will create, modify, and run
assemblies of models (projects). The assembly panel can be accessed by creating a new
blank project (using File/New) or by opening an existing project using the File/Open
menu item. The use of the Assembly Panel is described in detail in section 2.4.

2.2.3. 直接访问工具栏/菜单。Direct Access Toolbar/Menu


它包含可用于创建项目的所有模型。模型可以被“拖放”应用到当前项目中。所有型号也可
从“直接访问菜单”获得。It contains all models available for creating projects. Models
can be used by “drag and drop” into current project. All models are also available from
the “Direct Access Menu”.

2.2.4. 形式窗口。Proforma Window


形式表是记录组件模型的标准方法。形式文件(或.tmf-trnsys 模型文件)是 Simulation
Studio 中使用的模型文档标准。每个 trnsys 组件模型都被分解成形式格式,并以这种格式
存储在硬盘上。所有创建或添加到 Simulation Studio 程序的组件都必须有一个完整的形式
部分才能在“装配面板”中使用。“形式”窗口允许显示单个组件的形式,详见第 2.3 节。
The Proforma is a standard method for documenting component models. The Proforma
file (or .TMF - TRNSYS Model File) is the model documentation standard used in
Simulation Studio. Each TRNSYS component model has been broken down into the
Proforma format and is stored in this format on the hard disk. All components that are
created or added to the Simulation Studio program must have a completed Proforma
section in order to be used in the Assembly Panel. The Proforma window allows the
display of the Proforma for an individual component and is described in detail in section
2–20
Translated by CQU Team Lu

2.3.

2.2.5. 工具栏。Toolbars
Simulation Studio 程序中的许多窗口都包含与该窗口关联的工具箱。这些工具箱包含将在
Simulation Studio 程序中启动各种应用程序的图标(工具)。大多数这些工具,如 make
macro 工具,都是通过选择屏幕上的几个项目,然后用鼠标单击工具的图标来工作的。活动
工具在 Simulation Studio 程序中的特征是显示为按下按钮,而非活动工具则显示为扩展按
钮 。 见 图 2.2.5-1 。 Many of the windows in the Simulation Studio program contain
toolboxes associated with the window. These toolboxes contain icons (tools) which will
launch various applications in the Simulation Studio program. Most of these tools, such
as the Make Macro tool, work by selecting several items on the screen and then clicking
on the icon of the tool with the mouse. The active tool is characterized in the Simulation
Studio program appearing to be a depressed button while inactive tools appear to be
extended buttons. Refer to Figure 2.2.5-1.

图 2.2.5‐1:带有活动元件的工具栏示例。Figure 2.2.5‐1: Example of tool bar with active


element.
本手册的相应章节将详细讨论特定于每个 Simulation Studio 窗口的工具栏和菜单项。在上
图中,左上方的“箭头”(或“选择”)工具处于活动状态。。Toolbars and menu items
specific to each Simulation Studio window are discussed in detail in their respective
sections of this manual. In the figure above, the ‘arrow’ (or ‘select’) tool on the top-
left side is active.

2.2.6. 指定所需信息。Specifying Required Information


在 Simulation Studio 窗口中,必须以多种不同格式之一输入所需信息:输入框、单选按钮、
复选框和列表框。In Simulation Studio windows, required information must be entered in
one of several different formats: input boxes, radio buttons, check boxes, and list boxes.
与大多数 MS Windows 程序一样,鼠标左键用于选择项目或激活程序。鼠标左键单击将
“选择”一个图标。The left mouse button is used, as with most MS Windows programs,
to select items or activate programs. A single left mouse button click will "select" an icon.
Simulation Studio 广泛使用鼠标右键功能。例如,要访问位于部件面板上的组件图标的参数、
输入、输出等,最好的方法是右键单击该图标。这将提供一个选项列表,然后可以通过单击
鼠标左键选择。Simulation Studio makes wide use of the right mouse button functionality.
For example, to access the parameters, inputs, outputs, etc. for a component icon located
on the Assembly Panel, the best method is to right-click on the icon. This will bring up a
list of options which can then be selected by clicking the left mouse button.

2.3. 形式学。Proforma
形式表是记录组件模型的标准方法。形式文件(或.tmf-trnsys 模型文件)是 Simulation
Studio 中使用的模型文档标准。每个 trnsys 组件模型都被分解成形式格式,并以这种格式
存储在硬盘上。创建或添加到 Simulation Studio 程序的所有组件都必须具有完整的形式表,
才能在仿真项目中使用。The Proforma is a standard method of documenting component
2–21
Translated by CQU Team Lu

models. The Proforma file (or .TMF - TRNSYS Model File) is the model documentation
standard used in Simulation Studio. Each TRNSYS component model has been broken
down into the Proforma format and is stored in this format on the hard disk. All
components that are created or added to the Simulation Studio program must have a
completed Proforma in order to be used in a simulation project.
Simulation Studio 中的形式文件由四个选项卡式面板组成,其中包含促进与模型相关的知
识传输所需的所有信息,并允许以正确的格式使用模型。第一个面板包含与组件模型的历
史和功能相关的一般信息。形式表的第二个面板包含一个简短的描述、模型的完整描述和
一个插件(见下文)路径。第三个面板包含定义模型及其与其他组件的连接所需的每个变
量(参数、输入、输出和导数)的详细说明。第四个也是最后一个面板包含用于处理与模
型关联的文件的连接和工具。这包括对源代码和其他描述文件(如 ms word 文档)的访问,
以及将外部文件与模型(如数据和输出文件)关联的能力。这些文件可以在适当的程序中
打开,通过选择他们的名字并按下右边的编辑按钮。The Proforma files in Simulation
Studio are composed of four tabbed panels containing all the information required to
facilitate the transfer of knowledge related to the model, and allowing the models to be
used in the correct format. The first panel contains general information related to the
history and function of the component model. The second panel of the Proforma contains
a short description, a complete description of the model and a plug-in (see below) path.
The third panel contains a detailed description of each variable (parameters, inputs,
outputs and derivatives) necessary to define the model and its connections to other
components. The fourth and final panel contains connections and tools for working with
files associated with the model. This includes access to the source code and other
description files (such as MS Word documents) and the ability to associate external files
with the model (such as data and output files). These files can then be opened in the
appropriate program by selecting their name and pushing the Edit button on the right.
组件模型的形式文件可以通过以下三种方式之一进行访问:通过选择组件并单击“组件\/形
式”可以从“装配”面板查看它…在“装配面板”窗口中的菜单项,或右键单击组件图标
并选择“形式…”。从右键单击菜单或单击组件属性中的“形式”按钮( )。也可以通
过选择菜单项“文件/打开/组件”来访问形式表。无论哪种情况,形式都是完全相同的。通
过编辑组件和通过装配面板来访问组件模型的形式可以被修改。The Proforma file for a
component model may be accessed in one of three ways: it may be viewed from the
Assembly panel by selecting a component and clicking the Assembly/Proforma... menu
item in the Assembly Panel window or by right-clicking on the component icon and
selecting Proforma... from the right click menu or by clicking the Proforma button ( ) in
the component properties. The Proforma may also be accessed by selecting menu item
File/Open/Component. In either case, the Proforma is exactly the same. The Proforma for
a component model can be modified when accessed by editing the Component and
through the Assembly Panel.
如果用户将要创建一个新的组件(TrnSype 类型),则 PrimRMA 也可以用来生成新组件的
源代码的第一个版本。用户应该首先填写整个形式表(尤其是类型号和变量选项卡)。然后,
将形式表保存在一个.tmf 文件中。保存后,选择文件\/导出为…FORTRAN\/C++从主窗口。
这将打开一个标准的“Saveas”对话框,它允许用户在任何目录中保存生成的 FORTRAN
或 C++源代码。If the user is about to create a new component (TRNSYS type), the
Proforma can also be used to generate a first version of the source code for the new
component. The user should first fill in the entire PROFORMA (especially the type
number and the Variables Tab). Then, save the Proforma in a .TMF file. Once saved,
2–22
Translated by CQU Team Lu

select File/Export as ... Fortran/C++ from the main window. This will open a standard
"Save As" dialog box which allows the user to save the generated Fortran or C++ source
code in any directory.

2.3.1. 形式表的“常规”选项卡。General Tab of the Proforma


PrimRMA 文件的第一个屏幕,如图 2.3.1-1 所示,是由几个部分的信息组成的。下面将详
细解释这些部分。The first screen of the Proforma file, an example of which can be seen
in Figure 2.3.1-1, is composed of several sections of information. These sections are
explained in detail below.

图 2.3.1‐1:形式表第一章。Figure 2.3.1‐1: First Chapter of the Proforma


形式文件第一章的上半部分包含有关组件模型的通用信息的输入框:The upper half of the
first chapter of the Proforma file contains input boxes for generic information about the
component model:
 对 象 : 描 述 组 件 模 型 的 通 用 名 称 。 Object: A generic name describing the
component model.
 作者:模型作者的名字。Author: The name of the person who wrote the model.
 组织:作者所属组织的名称。Organization: The name of organization with which
the Author is affiliated.
 编辑:通常,创建 Simulation Studio 形式表的人不是原始作者,因此编辑器的名
称也可能很重要。Editor: Often, the person creating the Simulation Studio Proforma is not
the original author and so the name of the Editor may also be important.
 创建日期:这是模型首次写入的日期。Creation Date: This is the date of when the
model was first written.
2–23
Translated by CQU Team Lu

 最 后 修 改 : 这 是 最 新 修 订 版 的 日 期 。 此 值 自 动 设 置 , 但 可 以 更 改 。 Last
Modification: This is the date when the Proforma was mostly recently revised. This value
is set automatically but can be altered.
模型类型。Model Type
在这些框下面是一行用于输入模型类型的单选按钮。详细的模型包括 56 型多区域建筑模型。
简化模型将包括曲线拟合读取器或强制函数组件等内容。Below these boxes are a row of
radio buttons for entering the Model Type. Detailed models would include the multi-zone
building model, Type 56. Simplified models would include such things as curve fit readers
or the forcing function component.
验证。Validation
下面是一行复选框,以确定在该模型上执行的验证类型。这可以是定性的、数值的、分析的、
实验的和“汇编的”,这意味着它被验证为一个被验证的更大系统的一部分。Below this is
a row of check boxes to determine the type of validation that was performed on this model.
This can be qualitative, numerical, analytical, experimental and ‘in assembly’ meaning
that it was verified as part of a larger system which was verified.

图标。Icon
“常规”选项卡的左下部分显示与组件关联的图标(请注意,此按钮的图像包含当前模型
的图标,因此可能与上图中的图标不同)。The lower left part of the General tab shows the
icon that is associated with the component (note that the image of this button contains
the current model’s icon and may thus be different from the icon in the above figure).
单击图标将打开默认为 Microsoft Paint 的图标编辑器(如果安装了其他编辑器并将其作为位
图的默认 Windows OLE 服务器,则会启动其他编辑器;如果此功能无法正常运行,请重新
安装 Microsoft Paint。用户可以修改现有位图图像,或者用另一位图替换它。在 Studio
Studio 中,任何位图都可以用于组件图标,并且可以在大小上有所不同。用户可能希望将较
大的位图用于更重要的设备部件(制冷机、建筑物等),将较小的位图用于较不重要的部件
( 阀 门 、 泵 等 ) 。 也 可 以 直 接 修 改 studio\\proformas\\sub 文 件 夹 中 硬 盘 上 的 .bmp 文
件:.bmp 文件与相关的.tmf 文件同名。如果位图文件与.tmf 文件不在同一目录中,则使用
默认图标。Clicking on the icon will open the Icon Editor which is Microsoft Paint by
default (other editors will be launched if they are installed and as the default Windows
OLE server for bitmaps ; if this function does not operate correctly, please re-install
Microsoft Paint. The user can modify the existing bitmap image or replace it with another
bitmap. In Simulation Studio, any bitmap can be used for a component icon and it can
vary in size. The user may wish to use larger bitmaps for more significant pieces of
equipment (chiller, building, etc.) and smaller bitmaps for less important pieces (valves,
pumps, etc.). It is also possible to modify directly the .BMP files on the hard disk in the
Studio\Proformas\ sub folder: the .BMP files have the same name as the
associated .TMF files. If such a bitmap file is not present in the same directory as
the .TMF file, a default icon is used.

关键词。Keywords
“常规”选项卡的右下角有一个框,用于添加与此模型相关的关键字,如太阳能集热器、
建筑荷载等。The lower right corner of the General tab has a box for adding keywords
concerning this model such as solar collector, building load, etc.
2–24
Translated by CQU Team Lu

类型数和实例数。Type number and number of instances


形式表下部的两个编辑框确定组件的类型号以及组件的可能实例数。某些组件(如泵)可能
有无限个实例。其他组件(如多分区建筑模型)仅允许一个实例。Two edit boxes in the
lower part of the Proforma determine the type number for the component as well as the
number of possible instances of the component. Some components, such as the pump,
have an unlimited number of possible instances. Other components, such as the multi-
zone building model only allow for one instance.

2.3.2. 形式描述页签。Description Tab of the Proforma


形式文件的第二个选项卡(参见图 2.3.2-1)包含有关组件模型的详细信息。这些信息分为
三个不同的部分:模型摘要、详细描述和插件路径。当打开一个新的形式表时,这些部分
最初是空白的。这些信息可以直接输入到框中,也可以从其他 Windows 程序(如 MS Word)
中剪切和粘贴。The second tab of the Proforma file (see Figure 2.3.2-1) contains detailed
information on the component model. This information is broken up into three different
sections: the model abstract, the detailed description and the plug-in path. These
sections are initially blank when a new Proforma is opened. This information can be
typed into the boxes directly or can be cut and paste from other Windows programs such
as MS Word.
 描述:详细描述包含对模型的解释,包括对模型的数学描述。通常,大多数 trnsys
打印的手册信息也包含在标准组件中。描述还允许从剪贴板粘贴文本。Description: The
detailed description contains an explanation of the model including a mathematical
description of the model. Often, most of the TRNSYS printed manual information is also
included here for standard components. The description also allows the pasting of text
from the clipboard.
 注释:此处输入的文本将作为注释显示在 trnsys 输入文件中。这允许将有关组件
的重要信息附加到其所有用户,包括希望使用文本编辑器编辑输入文件的用户。此文本应简
短,以避免输入文件过载。Comment: The text entered here will appear as a comment in
the TRNSYS input file. This allows to attach important information about the component to
all its users, including users who prefer to edit the input file with a text editor. This text
should be short, to avoid overloading the input file.
 插件路径:插件路径包含指向外部应用程序的路径,该应用程序将被执行以修改组
件属性,而不是经典的属性窗口。这种插件可以由用户开发,如附件中所述。Plug-in path:
The plug-in path contains the path to the an external application which will be
executed to modify component properties instead of the classical properties window. Such
plug- ins can be developed by the user, as described in the annex.

2–25
Translated by CQU Team Lu

图 2.3.2-1:抽象部分。Figure 2.3.2-1: Abstract Section

2.3.3. 形式表的变量选项卡。Variables Tab of the Proforma


PrimRMA 文件的变量选项卡,如图 2.3.3-1 所示,是由几个部分的信息组成的。这些信息
部分包含完成组件模型的 trnsys 规范所需的参数、输入、输出、派生和特殊卡。The
variables tab of the Proforma file, an example of which can be seen in Figure 2.3.3-1, is
composed of several sections of information. These sections of information contain the
parameters, inputs, outputs, derivatives, and special cards required to complete the
TRNSYS specification of a component model.
2.3.3.1. 变量按钮。Variables button
选项卡上的第一个按钮称为“变量(参数、输入、输出和导数)”。单击此按钮将打开一
个如图 2.3.3-2 所示的表。The first button on the tab is called “Variables (Parameters,
Inputs, Outputs and Derivatives)”. Clicking on this button opens up a table like the one
shown in Figure 2.3.3-2.

2–26
Translated by CQU Team Lu

图 2.3.3‐1:形式表的变量选项卡。Figure 2.3.3‐1: Variables Tab of the Proforma

图 2.3.3‐2:变量表。Figure 2.3.3‐2: Variable table


对于组件 trnsys 规范中的每个变量(参数、输入、输出和派生),用户必须指定以下信息:
For each of the variables in the TRNSYS specification of a component (parameters, inputs,
outputs, and derivatives) the user must specify the following information:

2–27
Translated by CQU Team Lu

 变量名:用户将在“连接”窗口和所有其他变量信息窗口中看到该名称。The
name of the variable: This name will be seen by the user in the connections window and
all other variable information windows.
 变量(如输入、输出等)的角色更改标准组件的角色需要重新编程和重新编译组件。
The role of the variables such as input, output, etc. Changing the role of a standard
component requires reprogramming and recompiling the component.
 变量的尺寸(功率、温度等):此尺寸必须已在要使用的单位字典(参见第 2.9 节)
中定义。预定义维度“any”允许使变量与任何其他变量兼容:如果用户试图将这些变量连
接到其他变量,则不会对这些变量执行检查。The dimension of the variable (power,
temperature, etc.): This dimension must be already defined in the unit dictionary (refer
to section 2.9) to be used. The pre-defined dimension ‘any’ allows to make a variable
compatible with any other variable: no checks are performed on such variables if the user
attempts to connect them to other variables.
 trnsys 程序为指定维度(c、f、k 等)所需的变量单位。用户可以在装配窗口中为
指定的尺寸使用任何一组单位,程序将把单位转换回此处指定的单位。The unit of the
variable that the TRNSYS program requires for the specified dimension (C, F, K etc.).
The user may use any set of units in the assembly window for the specified dimension,
the program will convert the units back to the unit specified here.
 变量的类型:实数、整数、布尔值或字符串。The type of the variable: Real,
integer, Boolean, or string.
 变量的最小值、最大值和默认值:将零部件模型放置到部件中时将使用这些值。默
认值必须介于最小值和最大值之间。默认值将替换为输入和导数的初始值,并对输出进行
抑制。这些值必须以指定的单位给出。最小值和最大值之间有一个包含两个括号和一个分
号的小框。此设置确定最小值和最大值是否包含在范围内。最小值和最大值可以是“-INF”
或“+INF”,以表示无限制(无穷大)。The minimum, maximum, and default values
for the variable: These values will be used when the component model is placed into
an assembly. The default value must be between the minimum value and the
maximum value. The default value is replaced by the initial value for the inputs and
derivatives and suppressed for the outputs. These values must be given in the units
specified. Between the minimum and maximum values resides a small box containing
two brackets and a semi-colon. This setting determines if the minimum and maximum are
included or not in the range. The minimum and maximum can be "-INF" or "+INF" to
indicate no limit (infinity).
+/-inf 是默认值。+/-INF is the default value.
要在提供的输入框中输入上述信息,只需单击输入框。在某些输入框中,用户将不得不在
输入框中键入信息(名称、最小值、最大值和默认值)。在其他输入框(尺寸、单位和类
型)中,选择输入框时将显示一个弹出菜单。然后,用户应该从提供的列表中选择一个值
并关闭该框,使该选择处于活动状态。请确保检查单位,因为它们将在更改尺寸时重置为
默认单位。To enter the above information in the input boxes provided, simply click on the
input box. In some input boxes, the user will then have to type the information into the
input box (name, minimum, maximum, and default value). In other input boxes (dimension,
unit, and type) a pop-up menu will appear when the input box is selected. The user
should then choose one of the values from the list provided and close the box, to make
the choice active. Make sure to check the units as they will be reset to the default units
2–28
Translated by CQU Team Lu

upon changing the dimension.

2.3.3.1.1. 名字。NAME
此输入框包含变量的名称。该名称将出现在整个 Simulation Studio 程序的参数、输入、输
出或派生项列表中。只有在通过表单访问时,用户才能更改该名称。要更改名称,只需用鼠
标单击输入框并键入新的变量名称。This input box contains the name of the variable. The
name will appear in the list of parameters, inputs, outputs, or derivatives throughout the
Simulation Studio program. The name can be changed by the user only when accessed
through the Proforma. To change the name, simply click in the input box with the mouse
and type the new variable name.

2.3.3.1.2. 维数。DIMENSION
此下拉框用于为 trnsys 变量选择正确的尺寸。只有当用户通过表单访问时,才能改变维度。
若要更改维度,请单击“维度”框。将显示当前在单位字典程序中可用的维度列表。通过单
击选择新维度。然后将突出显示维度名称。请确保检查单位,因为它们将在更改尺寸时重置
为 默 认 单 位 。 This drop down box is used to choose the correct dimension for the
TRNSYS variable. The dimension can be changed by the user only when accessed
through the Proforma. To change the dimension, click on the 'dimension' box. A list of
dimensions that are currently available in the Unit Dictionary program will appear. Choose
the new dimension by clicking on it. The dimension name will be then highlighted. Make
sure to check the units as they will be reset to the default units upon changing the
dimension.

2.3.3.1.3. 单位。UNIT
此框用于为 trnsys 变量选择正确的单位。当可变信息窗口打开时,用户可以更改这些单元。
然而,取决于打开可变信息窗口的位置,改变单元具有不同的效果。当单位从形式表更改时,
所选的新单位将成为此变量的默认单位。(这种变化必须考虑到-重新编程-在组件的源代码
中!)。当在 Simulation Studio 程序中的其他任何位置更改单元时,它仅用于显示目的。
当模拟运行时,变量的值将转换为变量的默认单位。此功能允许用户输入已知单位系统中变
量的值,并让程序在运行时将这些值转换为所需的单位系统。要更改变量的默认单位,请单
击“单位”按钮。对于给定的维度,将显示“单位字典”程序中当前可用的单位列表。通过
单击选择新单元。单元名称将突出显示。This box is used to choose the correct units for
the TRNSYS variable. The units can be changed by the user whenever the Variable
Information window is open. However, depending on where the Variable Information
window was opened, changing the units has different effects. When the units are
changed from the Proforma, the new units selected will become the default units for this
variable. (Such a change must be taken into account - re-programmed - in the
component ’ s source code!). When the units are changed anywhere else in the
Simulation Studio program, it is solely for display purposes. The value of the variable will
be converted to the default units for the variable when the simulation is run. This feature
allows the user to enter the values for the variables in a known unit system and have the
program convert the values to the required unit system at run time. To change the default
units for a variable, click on the 'unit' button. A list of units that are currently available in
the Unit Dictionary program will appear for the given dimension. Choose the new unit by
clicking on it. The unit name will be then highlighted.

2.3.3.1.4. 角色。ROLE
2–29
Translated by CQU Team Lu

“角色”下拉框显示变量是参数、输入、输出还是派生变量时的用户。通过更改此值,用
户将变量从一个组移动到另一个组。它将放在另一个窗口中变量列表的末尾。例如,如果
“效率”原本是一个参数,角色框允许它被改变为一个输入,同时保留其他信息(这样的
变化必须考虑到-重新编程-在组件的源代码中!)。The role drop down box shows the
user if the variable is a parameter, input, output or derivative. By changing this value,
the user moves the variable from one group to another. It will be placed at the end of the
list of variables in the other window. For example, if “ efficiency” was originally a
parameter, the Role box allows it to be changed to an input while retaining the other
information (Such a change must be taken into account - re-programmed - in the
component’s source code!).

2.3.3.1.5. 类型。TYPE
类型下拉框用于为 Simulation Studio 设置变量类型:。The Type drop down box is used to
set the variable type for Simulation Studio purposes:
 实数-用户只能为变量值提供实数,例如 2.315 或 3.14159。。Real - The user is
only able to supply a real number for the value of the variable, 2.315 or 3.14159 for
example.
 整数-用户只能为变量值提供整数,例如 2 或 5。。Integer - The user is only
able to supply an integer for the value of the variable, 2 or 5 for example.
 布尔-用户只能为变量提供布尔值 true('1')或 false('0')。。Boolean - The
user is only able to supply a BOOLEAN value for the variable, TRUE ( ‘ 1 ’ ) or
FALSE (‘0’).
 字符串-用户可以为变量提供任何字符串,例如 start 或 value1。trnsys 中使用字符
串功能为打印机和绘图仪提供标签,并为参数或输入的初始值使用公式或常量名称。String
- The user is able to supply any character string for the variable, START or VALUE1 for
example. The string feature is used in TRNSYS to supply labels for printers and plotters,
and to use EQUATION or CONSTANT names for parameters or initial values of inputs.
要更改变量类型,请单击“类型”按钮。将显示四种可用类型的列表。用鼠标单击新类型,
选择它;类型名称将被突出显示。每当访问变量信息窗口时,用户可以更改变量的类型。
To change the variable type, click on the 'Type' button. A list of the four available
types will appear. Choose the new type by clicking on it with the mouse; the type name
will be then highlighted. Users may change the type for a variable whenever the Variable
Information window is accessed.

2.3.3.1.6. 最小值。MINIMUM
此输入框包含用户在组件中使用模型时可以指定的变量的最小值。最小值以该变量的默认单
位给出。只有在通过形式表访问时,用户才能更改最小值。要更改最小值,只需用鼠标单击
输入框并键入新值。This input box contains the minimum value of the variable that a user
can specify when using the model in an assembly. The minimum value is given in the
default units for that variable. The minimum value can be changed by the user only
when accessed through the Proforma. To change the minimum value, simply click in
the input box with the mouse and type the new value.

2.3.3.1.7. 托架箱。BRACKET BOX


2–30
Translated by CQU Team Lu

此输入框确定最小值和最大值是否包含在允许的变量范围内。括号可以像“[,] ],],],
[,],[ [和] ]。如果左括号是“[”,则最小值包含在范围内,而如果左括号是“%”,则最
小值不包含在允许的范围内。如果右括号是“%”,则最大值包含在范围内,而如果右括号
是“[”,则最大值不包含在允许的范围内。This input box determines if the Minimum
and maximum values are included in the allowed variable range. The brackets can look
like "[ ; ]", "] ; ]" , "[ ; [" , and "] ; [" . If the left bracket is "[" then the Minimum
is included in the range whereas if the left bracket is "]" then the Minimum is not included
in the allowed range. If the right bracket is "]" then the Maximum is included in the range
whereas if the right bracket is "[" then the maximum is not included in the allowed range.

2.3.3.1.8. 最大值。MAXIMUM
此输入框包含用户在组件中使用模型时可以指定的变量的最大值。最大值以该变量的默认单
位给出。只有在通过表单访问时,用户才能改变最大值。要更改最大值,只需用鼠标单击输
入框并键入新值。This input box contains the maximum value of the variable that a user
can specify when using the model in an assembly. The maximum value is given in the
default units for that variable. The maximum value can be changed by the user only
when accessed through the Proforma. To change the maximum value, simply click in the
input box with the mouse and type the new value.

2.3.3.1.9. 违约。DEFAULT
此输入框包含以该变量的默认单位表示的变量的默认值。默认值必须介于变量的最小值和最
大值之间。组件模型中的所有变量最初都设置为默认值。因此,用户应该为模型中的所有变
量输入合理的默认值。默认值只能由用户通过表单访问时更改。要更改默认值,只需在输入
框 中 单 击 并 键 入 新 值 。 This input box contains the default value for the variable
expressed in the default units of that variable. The default value must lie between the
minimum and maximum values for the variable. All variables in a component model are
initially set to the default value. For this reason, users should enter a reasonable default
value for all variables in the model. The default value can be changed by the user only
when accessed through the Proforma. To change the default value, simply click in the
input box and type the new value.

2.3.3.2. 变量信息窗口。Variable Information Window


上面指定的信息可以直接输入到所提供的输入框中,但也可以通过访问可变信息窗口来输
入该信息。可变信息窗口,如图 2.3.3-3 所示,可以通过点击右边的选择按钮来选择一个变
量行(参见图 2.3.3-4)。The information specified above can be entered directly into
the input boxes provided, but it is also possible to enter this information by accessing
the Variable Information window. The Variable Information window, an example of which
is shown in Figure 2.3.3-3, can be accessed by clicking on the Modify button located
on the right after selecting a variable row by clicking on the header (see Figure 2.3.3-4).
变量信息窗口包含 trnsys 变量(参数、输入、输出或导数)的完整描述。也可以通过“连
接”窗口中的“更多”按钮和“装配面板”窗口中某个组件的“输入、输出、参数或派生”
窗口中的“更多”按钮访问“变量信息”窗口。但是,只有通过形式窗口访问时,才能修
改变量。“变量信息”窗口允许用户轻松指定参数、输入、输出或导数所需的信息。此窗
口是唯一的,因为它是唯一允许用户为变量提供文本定义的窗口。当用户在“连接”窗口
中请求有关变量的信息时,此定义可用。应在提供的输入框中输入名称、最小值、最大值
和默认值。尺寸、单位和变量类型应从按下各自按钮时出现的弹出菜单中选择。前面已经
2–31
Translated by CQU Team Lu

描述过输入框和按钮,但是 definition 按钮允许对变量进行更详细的描述。The Variable


Information window contains the complete description of a TRNSYS variable (parameter,
input, output, or derivative). The Variable Information window can also be accessed
through the 'more' button in the Connections window, and the 'more' button in one of
the Inputs, Outputs, Parameters, or Derivatives windows for a component in the
Assembly Panel window. However, the variable may only be modified when accessed
through the Proforma window. The Variable Information window allows the user to easily
specify the required information for a parameter, input, output, or derivative. This
window is unique in that it is the only window which allows the user to give a text
definition to a variable. This definition is available when the user requests information
on a variable in the connections window. The name, minimum value, maximum value,
and default value should be entered in the input boxes provided. The dimension, unit, and
variable type should be chosen from the pop-up menus which appear when their
respective buttons are pressed. The input boxes and buttons have already been described
previously, but the Definition button allows for a more detailed description of the variable.

图 2.3.3-3:变量信息窗口。Figure 2.3.3-3: Variable Information Window

2–32
Translated by CQU Team Lu

图 2.3.3‐4:单击行标题。Figure 2.3.3‐4: Click on the row header


2.3.3.2.1. 定义。DEFINITION
此输入字段包含变量的简短说明。变量定义应该足够完整,以便不熟悉组件模型的用户能够
理解变量的重要性。此定义将由任何请求程序集面板中变量信息的用户看到。This input
field contains a short description of the variable. The variable definition should be
complete enough so that a user, unfamiliar with the component model, is able to
understand the significance of the variable. This definition will be seen by any user
that requests information about a variable in the Assembly Panel.

2.3.3.3. 创建变量循环。Creating Cycles of Variables


循环特性允许用户创建一个变量列表,该列表将根据参数值或给定问题的答案重复指定次
数。通过单击第一个所需变量的编号,选择要包含在循环中的一个或多个变量,按住鼠标
左键并拖动到最后一个所需变量。然后,单击 CreateCycle 按钮,该按钮将创建一个包含所
有选定变量的新循环(参见图 2.3.3-5)。The cycle feature allows the user to create a list
of variables that will be repeated a specified number of times depending on the value of
a parameter or on the answer to a given question. Select one or more variables to be
included in the cycle by clicking on the number of the first desired variable, hold the left
mouse button down and drag to the last desired variable. Then, clicking the Create Cycle
button that will create a new cycle containing all the selected variable (see Figure 2.3.3-5).

2–33
Translated by CQU Team Lu

图 2.3.3-5:周期管理。Figure 2.3.3-5: Cycle management

在图 2.3.3-6 中可以看到一个循环描述窗口,它将允许用户定义如何确定循环的长度;要么
通过对问题的回答,要么通过参数的值(这样的参数不能是“string”类型)。此选择由
“循环描述”窗口中提供的单选按钮完成。以前定义的所有问题都可以通过“选择现有问题”
按钮访问,从而允许多个变量周期依赖于同一问题的答案。如果循环取决于问题的答案,则
作者必须确定问题答案所允许的最小值和最大值。嵌入式循环是允许的,并且以相同的方式
创建。当用户指定要在模型中使用多少个周期时,程序将用整数标识符标记周期中的每个变
量 。 例 如 , 在 “ 装 配 面 板 ” 窗 口 中 查 看 时 , 参 数 “ value ” 的 名 称 变 为 “ value-1 ” 、
“value-2”等。A Cycle Description window, an example of which can be seen in Figure
2.3.3-6, will appear allowing the user to define how the length of the cycle will be
determined; either through the answer to a question, or by the value of a parameter (such
a parameter must not be of type ‘string’). This choice is accomplished by the radio
buttons provided in the Cycle Description window. All questions previously defined will
be accessible by the button “Select an existing question” thereby allowing several
variable cycles to depend on the answer to the same question. If the cycle depends on
the answer to a question, the author must establish the minimum and maximum values
allowed for the answer to the question. Embedded cycles are allowed and are created in
the same way. When the user specifies how many cycles are to be used in the model, the
program will tag each of the variables in the cycle with a integer identifier. For example,
the name of the parameter 'VALUE' becomes 'VALUE-1', 'VALUE-2' etc. when viewed
within the Assembly Panel window.

2–34
Translated by CQU Team Lu

图 2.3.3‐6:周期描述窗口。Figure 2.3.3‐6: Cycle description window


在形式化窗口中,一个循环由一个垂直条表示,该条穿过循环中的所有变量。嵌入式循环也
以这种方式显示,因此可能有几个垂直条相互平行。要删除周期,用户应重新选择周期中的
所有变量。此时,循环符号将被选中。然后,用户可以点击“删除”按钮来删除循环。A
cycle is represented in the Proforma window by a vertical bar that goes through all the
variables within the cycle. Embedded cycles are also shown this way, so that there may be
several vertical bars parallel to each other. To delete a cycle, the user should reselect all
the variables in the cycle. At this point, the cycle symbol will become selected. Then, the
user can click the “Delete” button to remove the cycle.
要编辑现有循环,请选择循环中包含的变量。然后,选择循环符号。此时,用户可以选择
“ 更 改 ” 按 钮 , 并 打 开 相 同 的 循 环 规 格 窗 口 。 To edit an existing cycle, select the
variables contained in the cycle. Then, the cycle symbol will be selected. At this point,
the user can select the “Change” button and the same Cycle Specification window will
open up.

2.3.3.4. 特殊卡片。Special Cards


一旦用户定义了参数、输入、输出和派生,一些组件就需要添加描述语句(或卡片)。需要
特殊卡的型号的一个例子是 65 型联机绘图仪,它必须为每个轴和绘图指定标题。这些特殊
卡可以通过使用特殊卡片部分插入到 TrnSyS 输入文件中,该特殊卡片部分也可以通过形式
表的变量选项卡访问。在图 2.3.3-7 中可以看到使用特殊卡片部分的例子。本手册的“变量”
部分包含通过“装配面板”窗口访问此特殊卡部分时的图像。Once the user has defined
the Parameters, Inputs, Outputs, and Derivatives, some components require addition
description statements (or Cards). An example of a model that requires a special card
is the TYPE 65 Online plotter which must specify the titles for each axis and for the plot.
These special cards can be inserted into the TRNSYS input file by the use of the
Special Cards section which is also accessed through the Variables Tab of the
Proforma. An example of the use of the Special Card section can be seen in Figure
2.3.3-7. The "Variables" section of this manual contains a picture of what this Special
Card section would look like when accessed through the Assembly Panel window.
与外部文件规范一样,作者可以附上用户可以访问的问题的可能答案列表。注-作者无需填
2–35
Translated by CQU Team Lu

写“卡片”、“提问”或“默认”答案输入框。Simulation Studio 程序将只将这些行写入作


者指定的输入文件。Like the external file specification, the author can attach a list of
possible answers to the question which can be accessed by the user. Note - neither the
'Card', 'Question to ask', or 'Default' answer input boxes are required to be filled by the
author. The Simulation Studio program will only write those lines to the input file which
have been specified by the author.

图 2.3.3‐7:特殊卡部分。Figure 2.3.3‐7: Special Cards Section


在图 2.3.3-7 和本手册“变量”部分(第 2.5 节)所示的示例中,以下行将写入 trnsys 输入
文件:In the example shown in Figure 2.3.3-7 and in the "Variables" section of this
manual (section 2.5), the following line would be written to the TRNSYS input file:
标签 3。LABELS 3
“温度”。"Temperatures"
“传热速率”图 1。"Heat transfer rates" "Graph 1"

2.3.3.5. 各单位意见。Comments for Each Unit


现在,在 Simulation Studio 中,可以从每个组件向输入文件写入注释。将为组件的每个实
例输入这些注释。将在形式表(位于“变量”选项卡的底部)中放置一个框,以允许模型开
发人员输入此注释的默认值。It is now possible in Simulation Studio to have a comment
written to the input file from each component. These comments would be entered for
each instance of the component. A box is placed in the Proforma (at the bottom of the
Variables Tab) to allow the model developer to enter a default value for this comment.

2–36
Translated by CQU Team Lu

2.3.4 形式表的“文件”选项卡。The Files Tab of the Proforma


最后一个选项卡是“文件”选项卡,其中包含与组件关联的所有文件的信息。这包括与组
件的一个或多个参数相关联的外部文件(如数据或输出文件)、源代码文件(例如
FORTRAN 子程序或 C++函数)和相关文档或引用(Internet 链接)的列表。The final tab
is the Files tab which contains information about all the files associated with the
component. This includes external files (such as data or output files) which are associated
to one or more parameters of the component, the source code file (e.g. a FORTRAN
SUBROUTINE or a C++ function), and a list of associated documents or references
(Internet links).

图 2.3.4‐1:形式表文件页签。Figure 2.3.4‐1: File Tab of Proforma


外部文件规范允许用户通过使用 trnsys assign、files 或 designate 语句将 trnsys 参数(通
常是逻辑单元)与外部文件相关联。此功能允许作者描述将在程序集窗口中提出的问题。
如果使用 ASSIGN 语句,则必须将参数与此外部文件关联,才能定义其 FORTRAN 逻辑单
元号。例如,“哪个文件包含气象信息?“生成输入文件时,它将包含一个 trnsys assign
语句,其中包含问题的答案和相关参数的值。如果用户更愿意为其组件使用指定输入文件
关键字(请参阅 trnedit 手册中的更多信息),则必须单击“指定”复选框。模型的用户还
可以通过“浏览”按钮访问标准的“打开窗口”对话框,从而在硬盘上找到文件。The
External File Specification allows the user to associate a TRNSYS parameter (typically a
logical unit) with an external file through the use of the TRNSYS ASSIGN, FILES, or
DESIGNATE statements. This feature allows the author to describe a question that will be
asked in the assembly window. If the ASSIGN statement is used, a parameter has to be
associated with this external file to define its FORTRAN logical unit number. For example,
"Which file contains the meteorological information?” When the input file is generated,
it will contain a TRNSYS ASSIGN statement with the answer to the question and the value
2–37
Translated by CQU Team Lu

of the associated parameter. If the user would instead rather use the DESIGNATE input
file keyword for their component (please see more information in the TRNEdit manual),
the “Designate” checkbox will have to be clicked. The user of the model will also be
able to locate a file on the hard disk by accessing the standard Window Open dialog box
through the button BROWSE.
要编辑源代码,请使用“编辑”按钮。最后,通过输入必要的编译命令和开关,compile
module 按钮将编译该模块。这可能是有用的,尽管许多用户更喜欢使用他们的编译器提供
的集成开发环境。有关创建新组件的信息,请参阅 trnsys 文档中的“第 8 卷-程序员指南”。
请注意,文件\/导出为…命令将创建编译项目和源代码。这个编译项目(*.DSP)可以由兼
容的 FORTRAN 和 C\/C++编译器直接打开。然后可以在编译器的集成开发环境(IDE)中
方便地编辑、调试和编译该组件。To edit the source code use the EDIT button. Finally, by
entering the necessary Compile command and switches, the COMPILE MODULE button
will compile the module. This can be useful, although many users prefer to use the
integrated development environment provided with their compiler. Please refer to
‘Volume 8- Programmer’s Guide’ in the TRNSYS documentation for information
about creating new components. Note that the File/Export as... command will create a
compile project along with the source code. This compile project (*.dsp) can be directly
opened by the compatible FORTRAN and C/C++ compilers. The component can then
be conveniently edited, debugged and compiled within the compiler ’ s integrated
development environment (IDE).
最后,在这个窗口的底部有一个名为“关联文件”的框。此框包含此组件的相关文件和
Internet 链接的列表。这些文件可以在适当的程序中打开,通过选择他们的名字和按下编辑
按钮在右边(适当的程序,如 MS Word,必须安装在您的计算机上或其他可访问的)。
Finally, there is a box at the bottom of this window called Associated Files. This box
contains a list of related files and Internet links for this component. These files can
then be opened in the appropriate program by selecting their name and pushing the Edit
button on the right (the appropriate program, such as MS Word, must be installed on your
computer or otherwise accessible).

2.3.5. 从其他模型继承。Inheriting from another model


在以前的 Simulation Studio 版本中,继承是严格执行的。继承允许一个模型从另一个模型
(父模型)中检索多个特征,然后再添加多个特征。当“父”模型改变时,这些变化通过增
加或删除变量或其他项立即反映在模型中。在 Simulation Studio 中,不再强制执行严格继
承。相反,可以在模型之间进行同步继承。换句话说,在一个模型(模型 x)中工作时,可
以“现在从模型 y 继承所有变量”。然后,模型 x 的所有原始变量加上模型 y 的所有变量。
虽然不严格继承,但此方法允许 Simulation Studio 用户对继承发生的时间和程度有更大的
控制权。而且,不再需要有一个经常让用户感到困惑的组件库。同步继承不同于简单地复制
文件。例如,如果用户具有太阳能集热器组件的多个模式,则可以从主模型继承大部分常规
信息,但每个模式可以是具有附加参数的不同模型。当进行一般性更改时,只需在一个模型
中进行更改,然后将其继承给其他模型。使用继承而不是仅仅复制,用户不必 1)在所有模
型中进行常规更改或。In previous versions of Simulation Studio, inheritance was strictly
enforced. Inheritance allows a model to retrieve several characteristics from another
model (the ‘father’ model) and then add several more characteristics. When the
‘father’ model is changed, these changes are instantly reflected in the model by the
addition or removal of variables or other items. With Simulation Studio, strict inheritance is
no longer enforced. Instead, it is possible to make a synchronization inheritance between
2–38
Translated by CQU Team Lu

models. In other words, while working in one model (Model X) it is possible to “now
inherit all variables from model Y”. Then, Model X has all its original variables plus all
the variables from Model Y. While not strict inheritance, this method allows Simulation
Studio users to have greater control over when and to what extent inheritance occurs.
Also, it is no longer necessary to have a component Library which was often confusing
for the users. Synchronization inheritance is different than simply copying a file. For
example, if the user has several modes of a solar collector component, much of the
general information can be inherited from a primary model but each mode can be a
different model with additional parameters. When a general change is made, it only
needs to be made in one model and then inherited to the rest. With inheritance instead
of just making copies, the user does not have to 1) make the general change in all the
models or
2)重做每个模式的所有附加功能。2) redo all the additional features for each mode.
若要使用同步继承,请首先打开要从中进行继承的组件的形式(“父”模型)。然后,点
击“工具/添加儿子”主菜单。这将打开继承屏幕,如图 2.3.5-1 所示。在这个窗口中,您可
以选择一个或多个模型,该模型将继承这个模型。。To use synchronization inheritance,
first open the Proforma of the component from which inheritance will occur (the ‘father’
model). Then, click on the “Tools/Add Sons” main menu. This opens the Inheritance
screen shown below in Figure 2.3.5-1. In this window, you can select one or more
models which will inherit from this model.

图 2.3.5-1:“儿子”。Figure 2.3.5-1: “Sons”


选择所需组件后,使用“确定”按钮关闭此窗口。现在,选择“工具/更新继承”菜单,打
开继承设置窗口(参见图 2.3.5-2)。也有一些选项可以为这个继承选择。这些选项包括一
个可以继承的列表,包括一般信息、变量和附加文件。此外,用户可以选择现有的变量(如
“子”模型中定义的参数)将被保存并添加到继承变量的结尾或丢弃。设置正确后,单击
“确定”以实际执行继承更新。Once the desired components have been selected, close
this window with the OK button. Now, select "Tools/Update Inheritance" menu that will
open the Inheritance settings window (see Figure 2.3.5-2). There are also some
options that can be selected for this inheritance as well. These options include a listing
of what can be inherited including General information, Variables, and attached Files.
Also, the user can select if existing variables (such as parameters already defined in the
‘ son ’ model) will be saved and added to the end of the inherited variables or
discarded. Once the Settings are correct, click OK to actually perform the Inheritance
2–39
Translated by CQU Team Lu

Update.

图 2.3.5‐2:“更新继承”窗口。Figure 2.3.5‐2: "Update Inheritance" window


2.3.6. 导出为 HTML。Export as HTML
file\/export as html 命令以适合在 Internet 上使用或导入到文本编辑器(如 Microsoft Word)
中的 HTML 格式输出当前形式。形式表的所有字段都包含在基于表的大型文档中。除了创
建文件外,Simulation Studio 还会启动用户的 Web 浏览器以打开该文件。此功能旨在使用
户能够轻松地从 Simulation Studio 形式表中为其组件创建打印或联机文档。只有当组件形
式是当前活动窗口时,此命令才可见。The File/Export as HTML command outputs the
current Proforma in HTML format suitable for use on the Internet or for importing into text
editors such as Microsoft Word. All fields of the Proforma are included in a large table-
based document. In addition to creating the file, Simulation Studio starts the user's web
browser to open the file. This feature is intended to allow users to easily create
printed or online documentation for their components from Simulation Studio Proformas.
This command is only visible if a component Proforma is the current active window.

2.3.7. 导出为 FORTRAN/C++。Export as Fortran/C++


此功能旨在允许用户更容易地为 FORTRAN 或 C++代码创建其描述为仿真工作室形式的组
件。只有当组件形式是当前活动窗口时,此命令才可见。This feature is intended to allow
users to more easily create Fortran or C++ code for their components described as a
Simulation Studio Proforma. This command is only visible if a component Proforma is the
current Active Window.
文件/导出为…Fortran \/ C++命令为当前形式窗口创建一个组件(类型)的框架。用户应该
将所有参数、输入和输出信息输入到一个空白的形式表(使用 file\/new\/component 创建)
中,并将其保存到硬盘(在一个.tmf 文件中)。当导出为…选择 Fortran/C++命令,
Studio Studio 使用 T.MF 文件生成一个源文件,该文件包含一个新的 TrnSype 类型的所有
基本语法,包括函数(子例程)定义、参数和输入的读取、TrnSyS 检查功能的调用等。编
译项目(.dsp)。The File/Export as... and Fortran/C++ commands create a skeleton of
a TRNSYS component (TYPE) for the current Proforma window. The user should enter
all the parameter, input, and output information into a blank Proforma (created with
2–40
Translated by CQU Team Lu

File/New/Component) and save it to the hard disk (in a .TMF file). When the Export
as... or Fortran/C++ command is selected, Simulation Studio uses this .TMF file to
generate a source file which contains all the basic syntax for a new TRNSYS type,
including the function (subroutine) definition, the reading of parameters and inputs, calling
of TRNSYS checking functions, etc., as well as a compile project (*.dsp).
生成源代码后,Simulation Studio 将尝试启动用户的编程环境。如果推荐的开发环境(如
Copaq Visual Fortran 66B、英特尔 Visual Fortran、微软 Visual C++ 6 或.NET)安装在用
户的机器上,那么一个完整的、预先配置的编译项目将在该环境中自动打开。(可以修改在
文件\/设置……\/目录\/ FORTRAN 环境和 C++环境下使用的环境)。Once the source code
has been generated, Simulation Studio attempts to start the user ’ s programming
environment. If one of the recommended development environments (such as Compaq
Visual FORTRAN 6.6B, Intel Visual FORTRAN, Microsoft Visual C++ 6.0 or .NET) is
installed on the user’s machine, a complete, pre-configured compilation project will
automatically open in that environment. (It is possible to modify the environment used
under File/Settings…/Directories/FORTRAN environment and C++ environment).
此时,唯一丢失的 FORTRAN\/C++代码是将输入与输出相关的实际方程;在源代码的末尾
可以找到相应的行。默认情况下,输出变量设置为“0”,例如:At this point, the only
missing Fortran/C++ code are the actual equations which relate the inputs to the outputs;
the corresponding lines can be found at the end of the source code. The output variables
are set to ‘0’ by default, for example:
!设置此模型的输出(,value)调用 setOutputValue(1,0)!温度。!Set the Outputs
from this Model (#,Value) Call SetOutputValue(1, 0) ! Temperature
用户可以简单地编辑这些行以添加自己的公式。当然,任何现有的 FORTRAN 或 C++源代
码都可以像往常一样被添加到编译项目中。The user can simply edit these lines to add
his own equations. Of course, any existing FORTRAN or C++ source code can be added
to the compilation project as usual.
用于生成此代码的模板可以在\\TrnSys17 \\Studio\\Stime\\Me 饰件,它们可以使用简单的
文 本 编 辑 器 进 行 修 改 。 The templates used to generate this code can be found in
\\Trnsys17\Studio\Templates\Components They can be adapted using a simple text editor.
一旦源完成,可以编译新类型(通常使用编译器的“构建”函数)。编译的结果将是在
userlib 子目录中自动创建的新 dll。现在,使用新组件的模拟可以在仿真演播室中运行。
Once the source is completed, the new type can be compiled (typically by using the
‘Build’ function of the compiler). The result of this compilation will be a new DLL, which
is automatically created in the UserLib subdirectory. Now simulations using the new
component can be run in the Simulation Studio.

2.4. 装配面板。Assembly Panel


“装配”面板是 Simulation Studio 中的窗口,用户将在其中创建、修改和运行模型(项目)
的装配。可以通过创建一个新的空白项目(使用“文件/新建”和“选择空项目”)或使用
文件/打开菜单项打开一个现有项目来访问组装面板(参见图 4)。The Assembly Panel is
the window in Simulation Studio where the user will create, modify, and run
assemblies of models (projects). The assembly panel can be accessed by creating a new
blank project (using File/New, and selecting ‘Empty project’ ) or by opening an
2–41
Translated by CQU Team Lu

existing project using the File/Open menu item (see Figure 2.4.1-1).
程序集主菜单提供了许多用于处理程序集面板的有用命令。此外,项目工具栏包含许多图
标,其中包含适合于“部件”面板的操作。下面将详细讨论装配面板操作。The Assembly
main menu provides many useful commands for working with the Assembly panel. In
addition, the Project toolbar contains many icons with actions appropriate for the
Assembly panel. The assembly panel actions are discussed in detail below.

2.4.1. 移 动 部 件 和 连 接 。 Moving Components and


Connections
为了将组件模型放置到装配面板中,可以在树状的直接访问工具中选择现有组件。然后,
通过单击“装配”面板,该零部件将被放置在当前项目的“装配”面板中。可以使用多个
工具操作装配面板图标。通常,“选择”工具(箭头指针 )用于选择(简单的左键单
击)、移动(单击并拖动)和编辑(双击)图标。也可以使用“平移”工具( )滑动整
个部件。To place a component model into the assembly panel, an existing component can
be selected in the tree- like Direct Access Tool. Then, by clicking on the assembly panel,
this component will be placed in the Assembly panel for the current project. It is possible
to manipulate the assembly panel icons with several tools. Normally, the "select" tool (an
arrow pointer ) is used to select (simple left click), move (click and drag) and edit
(double-click) icons. It is also possible to use the "pan" tool ( ) to slide the entire
assembly.
要在程序集窗口中移动组件模型或宏之一,用户应首先确保“选择”工具处于活动状态。
然后,用户必须单击模型图标,并在按住鼠标左键的同时,将模型拖动到新位置。附加到
此模型的任何链接都将相应移动。注意,如果在“视图”菜单中选择“SNAP 到网格”,则
只能以网格间隔的间隔移动图标。若要在其间放置零部件,请禁用“捕捉到栅格”。To
move one of the component models or macros within the assembly window, the user
should first make sure that the "select" tool is active. Then, the user must click on the
model icon and, while holding the left mouse button down, drag the model to the new
position. Any links attached to this model will move accordingly. Note that if "Snap to
Grid" is selected in the View menu, the icon can only be moved at grid- spaced intervals.
To place a component in between, turn off "Snap to Grid".
链接是两个组件之间输出-输入连接的“管道”。链接和连接的详细信息将在本手册后面进
行说明。用户可能希望更改链接的位置,以便更容易理解装配面板。要在两个组件之间移动
链接,用户必须首先单击两个模型之间的链接,以便链接处于活动状态(链接的所有角落都
会出现小正方形)。然后,用户必须单击连接到突出显示链接的一个小正方形,并在按住鼠
标左键的同时,将该正方形拖动到所需位置。当用户位于正确的位置时,鼠标指针将变为两
端箭头。链接的作用就像有一个橡皮筋附在正方形上。只有将链接定义为用户定义的链接时,
才能将链接移动到新位置。有关创建和修改组件之间链接的详细信息,请参阅本手册的“连
接”部分(第 2.6 节)。A link is a "pipeline" of output-input connections between two
components. The details of links and connections are explained later in the manual. A
user may wish change the position of a link in order to make the Assembly panel easier
to understand. To move a link between two components, the user must first click on the
link between the two models so that the link becomes active (small squares will appear at
all corners of the link). The user must then click on one of the small squares attached to
the highlighted link and, while holding the left mouse button down, drag that square to
2–42
Translated by CQU Team Lu

the desired location. The mouse pointer will change to a two-ended arrow when the user
is on the proper place. The link will act like there is a rubber band attached to the square.
A link can only be moved to a new location if the link has been defined to be a user-
defined link. Refer to the "Connections" section of this manual for more information on
creating and modifying links between components (section 2.6).
在单击链接的同时按住 control(ctrl-)键,可以向链接添加通道点,也可以删除它们(在单
击现有通道点时)。Holding down the Control (Ctrl-) key while clicking on a link allows to
add passage points to a link, or to remove them (when clicking on an existing passage
point). .

图 2.4.1‐1:样品装配面板。Figure 2.4.1‐1: Sample Assembly Panel


要查看与组件模型关联的参数、输入、输出、派生、特殊卡、外部文件和注释的列表,用
户必须右键单击组件图标并选择变量项。或者,用户可以使用菜单项集合/变量来打开当前
选择的组件的变量窗口。To view the lists of parameters, inputs, outputs, derivatives,
special cards, external files and comments associated with a component model, the
user must right-click on the component icon and select the Variables item.
Alternatively, the user can use the menu item Assembly/Variables which will open the
Variables window for the currently selected component.
若要重命名组件模型,请双击所需模型的名称,以便在模型名称中显示光标。使用键盘重
新键入名称。名称必须唯一。按回车键验证组件的新名称。To rename a component model,
double-click on the name of the desired model so that a cursor appears in the name of
the model. Retype the name using the keyboard. The name must be unique. Press the
Return key to validate the new name of the component.
要在程序中选择多个项目,用户可以使用两种方法之一。按住 shift 键的同时用鼠标单击选
定的组件,可以顺序选择或取消选择项。用户还可以单击装配面板的空白区域,并在按住
鼠标按钮的同时将光标滑动到新位置。包含在由拖动形成的框中的每个项都将被选中。一
2–43
Translated by CQU Team Lu

旦选择了多个项,可以通过单击鼠标左键单击其中的一个组件并将其拖动到一个新位置来
移 动 这 些 项 。 To select multiple items in the program, users may utilize one of two
methods. Items may be selected or deselected sequentially by clicking on the selected
components with the mouse while holding the SHIFT key. Users may also click on an
empty area of the assembly panel and, while holding the mouse button down, slide the
cursor to a new location. Every item that is contained within the box formed by the drag
will be selected. Once multiple items have been selected, these items can be moved by
clicking on one of the selected components with the left mouse button and dragging it to a
new location.
By pressing the F2 key, the names of the components will be replaced with the component’s
Type and Unit numbers.

2.4.2. 删除组件。Deleting Components


用户可以通过使用鼠标左键选择项目,然后按下 DEL 键或使用编辑/剪切菜单命令来删除两
个模型之间的模型或链接。The user can delete a model or a link between two models
by selecting the item with the left mouse button and then pressing the DEL key or using
the Edit/Cut menu command.

2.4.3. 撤消/重做操作。Undoing/Redoing an operation


“编辑/撤消”菜单项允许用户撤消以前的操作。例如,用户可以撤消两个组件的链接或删
除组件模型。The Edit/Undo menu item allows the user to undo the previous operation.
For example, the user may undo the linking of two components, or the deletion of a
component model.

2.4.4. 复制或复制组件。Duplicating or Copying Components


“编辑/复制”菜单命令允许用户在“装配面板”窗口中精确复制一个零部件模型。要使用
此工具,请单击要复制的零部件模型,然后选择菜单命令“编辑\/复制”。然后选择“编辑/
粘贴”将副本放置在部件面板上,并将其移动到所需位置。新模型将包含用户在初始模型
中输入的所有信息。The Edit/Copy menu command allows the user to make an exact
copy of one of the component models in the Assembly Panel window. To use this tool,
click on the component model to be duplicated and then select the menu command
Edit/Copy. Then select Edit/Paste to place the copy on the Assembly Panel, and move it
to the desired location. The new model will have all the information that the user has
entered in the initial model.

2.4.5. 使用直接访问工具栏。Using the Direct Access Toolbar


直接访问工具栏(参见图 2.4.5-3)允许用户快速轻松地检索任何组件模型并将其放置在组
装面板上。要使用此工具,请在树结构中选择一个零部件,然后单击“部件”面板。相应
的零部件将添加到装配面板中。此树结构也可以从直接访问菜单/插入模型访问(参见图
2.4.5-1)。The Direct Access Toolbar (see Figure 2.4.5-3) allows users to quickly and
easily retrieve any of the component models and place them on the assembly panel. To
use this tool, select a component in the tree structure and click on the assembly panel.
A corresponding component is added to the assembly panel. This tree structure is also
accessible from the Direct Access Menu/Insert Model (see Figure 2.4.5-1).

2–44
Translated by CQU Team Lu

图 2.4.5-1:直接访问工具。Figure 2.4.5-1: Direct Access Tool

单击此菜单时,将显示一个对话框,其中包含所有可用组件(如直接访问工具中的组件)。
When clicking this menu, a dialog appears containing all available components (like in the
Direct Access Tool).
参考图 2.4.5-2,选择了多区域建筑组件;类型 56。通过这个过程,用户将对他将要选择的
模型以及该组件的“操作模式”做出若干选择。TRNSYS 的主要手册有关于不同组件的不
同模式的非常详细的信息。Referring to Figure 2.4.5-2, the multi-zone building component
has been selected; TYPE56. Through this process, the user will make several choices
about the model he will select and also the “operation mode” of that component. The
main TRNSYS manual has very detailed information about the different modes of the
different components.

图 2.4.5‐2:选择 56B 类型的直接访问菜单。Figure 2.4.5‐2: Direct Access Menu with


TYPE56b chosen
2–45
Translated by CQU Team Lu

选择组件后,关闭对话框,光标将变为加号(+)。将光标移动到“装配面板”窗口中应放
置零部件模型的位置,然后单击。组件模型将出现在装配面板中。Once a component has
been selected, close the dialog and the cursor will change to a plus sign (+). Move the
cursor to the point on the Assembly Panel window where the component model should
be placed and click. The component model will appear in the Assembly Panel.

图 2.4.5‐3:选择 56B 类型的直接访问工具栏。Figure 2.4.5‐3: Direct Access Toolbar with


type56b chosen
2.4.6. 获 取 信 息 ( 访 问 形 式 表 ) 。 Getting Information
(Accessing the Proforma)
有几种方法可以访问部件面板上的组件或宏的形式表。首先,使用选择工具选择组件,然后
从项目工具栏或“程序集\/形式”菜单项中选择信息图标( )。否则,通过右键点击图标,
用户可以从右击菜单中选择“PrimRMA”。形式表包含组件模型的完整描述,从模型功能
概述到所有必需参数、输入、输出和导数的描述。它可以在仿真工作室的装配面板上进行修
改 。 有 关 更 多 信 息 , 请 参 阅 本 手 册 的 “ 形 式 ” 部 分 。 There are several methods for
accessing the Proforma for a component or macro on the Assembly Panel. First, select
the component using the Select tool and then select the information icon ( ) from the
Project toolbar or Assembly/Proforma menu item. Otherwise, by right-clicking on an icon
the user can select "Proforma" from the right-click menu. The Proforma contains a
complete description of the component model from an overview of the model's function to
descriptions of all the required parameters, inputs, outputs, and derivatives. It can be
modified from the Assembly panel in Simulation Studio. Refer to the "Proforma" section of
this manual for more information.

2.4.7. 更 改 组 件 的 图 层 。 Changing the Layer of the


Component
每个组件都被指定为“层”,在该层上,将显示到同一层上其他组件的链接。任何层的组合
都可以在任何时间显示。其思想是将组件保持在单独的层上。有许多预定义层,但用户也可
以在“配置”窗口的“文件/设置/层”下创建自己的层。预定义的图层包括:天气/数据文件、
水循环、干管、空气循环、输出和文本。若要将一个或多个组件移动到不同的层,请选择一
2–46
Translated by CQU Team Lu

个或多个组件,然后单击“装配/发送到层”菜单项。将显示一个子菜单,其中包含所有定义
的图层。单击其中一个选项,组件将移动到此层。同一层上的组件之间的链接是可见的。如
果显示了来自两个层的组件,则会显示到其他层上组件的链接。可以在不同层上的组件之间
建立链接。当然,通过点击菜单“查看/显示层”菜单上的“所有层”(这是默认设置)始终
可以看到所有组件(和所有链接)。Each component is assigned "layers" on which it, and
the links to other components on the same layers, will be displayed. Any combination of
layers can be displayed at any time. The idea is to maintain the components on
separate layers. There are many pre-defined layers but the user may also create his own
layers in the configuration window under File/Settings/Layers. The pre-defined layers
include: Weather / Data Files, Water Loop, Main, Air Loop, Outputs, and Text. To
move one or more components to a different layer, select one or more components
and then click the Assembly/Send to Layer menu item. A submenu will appear with
all the defined layers. Click on one of these choices and the components will be moved to
this layer. Links between components on the same layer are visible. Links to components
on other layers are shown if the components from both layers are shown. Links can be
made between components on different layers. Of course, it is always possible to see all
the components (and all the links) by clicking on the “ All Layers ” on the menu
'View/Show Layers ' menu, which is the default.

2.4.8. 隔离组件。Isolating a component


右键单击上下文菜单“graphic->focus on”允许用户仅显示连接到选定组件的组件。“具
有焦点”的组件由彩色矩形勾勒。fowus“off”使项目视图恢复正常。The right-mouse
click context menu “ Graphic->Focus on ” allows the user to display only those
components which are connected to the selected components. The component which
“has the focus” is outlined by a coloured rectangle. Fowus “Off” returns the project
view to normal.

图 2.4.8‐1:聚焦于组件。Figure 2.4.8‐1: Focusing on a component

2.4.9. 旋转/翻转零部件。Rotating/flipping a component

2–47
Translated by CQU Team Lu

鼠标右键单击上下文菜单“图形->顺时针旋转”、“图形->逆时针旋转”、“图形->水平翻
转”、“图形->垂直翻转”,允许通过旋转(旋转)和镜像(翻转)修改组件的图形表示。
The right-mouse click context menu “ Graphic->Rotate clockwise ”, “Graphic->Rotate
counterclockwise ”, “ Graphic->Flip horizontal ”, “ Graphic->Flip vertical ”, allowto
modify the graphical representation of a component by turning (rotating) and mirroring
(flipping) it.

2.4.10. 创建链接。Creating Links


“装配/链接模式”菜单命令允许用户指定两个零部件模型之间的信息流。信息流的方向是
从第一个模型到第二个模型(第一个模型的输出==>第二个模型的输入)。模型的输入始终
表示为流入组件图标的线。组件模型的输出始终表示为离开组件图标的行。要将一个组件
的输出连接到另一个组件的输入,用户有多种方法可供选择。The Assembly/ Link Mode
menu command allows the user to specify information flow between two component
models. The direction of information flow is from the first model to the second model
(outputs of first model ==> inputs of second model). Inputs to a model are always
represented as a line flowing into a component icon. Outputs from a component model
are always represented as a line leaving the component icon. To connect the outputs of
one component to the inputs of another component, the user has several methods to
choose from.
创建多个链接:要创建多个链接,最好的操作方法是使用“装配/链接模式”菜单项打开链
接模式。然后,光标将改变以反映正在进行的链接操作,该操作通常是十字线(+)。当光
标位于一个可以启动或开始链接的组件之上时,光标在一个圆中呈现为十字准线。当用户十
字线接近组件时,图标周围会出现 8 个端口。每个端口都可以用来将新链接链接到图标。活
动的(选中的)一个显示为一个红色圆圈。To make many links: The best way to operate
when you want to make many links is to turn on the Link Mode using the Assembly/Link
Mode menu item. Then, the cursor will change to reflect ongoing link operations which
is normally a crosshair (+). When the cursor is above a component that can start or
begin a link, the cursor appears as a crosshair in a circle. When the user crosshair
approaches a component, 8 ports appear around the icon. Each port can be used to hook
the new link to the icon. The active (selected) one is shown as a filed, red circle.

图 2.4.10‐1:选择端口以启动链接。Figure 2.4.10‐1: Selecting a port to start a link


当用户单击组件开始链接时,该链接将显示为组件和光标之间的直线(一旦光标离开组件)。
用户必须通过单击第一个模型的输出将连接到的组件模型来完成链接过程。同样,8 个端口
中的每一个都可以被选为目的地。When the user clicks on the component to begin the link,
the link is shown as a straight line between the component and the cursor (once the cursor
is moved away from the component). The user must complete the link process by clicking
on the component model to which the outputs of the first model will be connected.
Again, each of the 8 ports can be picked as a destination.
将在两个组件之间绘制一条分段线,以指示两个组件之间的信息流。这条分段的线最初将被
涂成蓝色,表示两个组件之间存在信息流,但变量级别上的流尚未定义。当在可变级别上指
定信息流时,链接将变为黑色。当用户完成链接时,可以通过重新选择装配/链接模式菜单
2–48
Translated by CQU Team Lu

命令,右键单击装配面板中的自由点或选择另一工具来关闭链接模式。A segmented line


will be drawn between the two components to indicate information flow between the two
components. This segmented line will initially be colored blue to signify that the there is
information flow between the two components, but that the flow on a variable level has
not yet been defined. When the information flow is specified on a variable level, the link
will turn black. When the user is done making links, the Link Mode can be turned off by
re-selecting the Assembly/Link Mode menu command, right- clicking on a free spot in
the assembly panel or selecting another tool.
只需建立一个链接:用户可以选择起始组件,然后使用鼠标右键从右键下拉菜单中选择“开
始链接”。然后,光标将改变以反映正在进行的链接操作。用户必须通过(左)单击第一个
模型的输出将连接到的组件模型来完成链接过程。之后,单击一个组件将不会启动另一个链
接。因此,以这种方式创建单个链接。To make just one link: The user can select the
starting component, then use the right mouse button to select “Start Link” from the
right-click dropdown menu. Then, the cursor will change to reflect an ongoing link
operation. Users must complete the link process by (left) clicking on the component
model to which the outputs of the first model will be connected. After that, clicking on a
component will not start another link. Thus, a single link is created in this way.
如果用户希望指定连接这两个组件的链接的路径,则用户应首先单击输出将来自的组件。随
后在装配面板窗口中的开口点上单击会导致将接头放置在这些位置。然后,连接将像一个橡
皮筋一样附着在这个关节上。用户应该通过单击将接收这些输出的组件来结束用户定义的链
接。If a user wishes to specify the path of the link joining the two components, the user
should first click on the component from which the outputs will come. Subsequent clicks
on open spots in the Assembly Panel window will cause joints to be placed in these
positions. The link will then act like a rubber band which has been attached to this joint.
Users should end the user-defined link by clicking on the component which will receive
these outputs.
要指定第一个模型的哪些输出连接到第二个模型的哪些输入,用户应双击两个组件之间的
链接,并激活选择工具。将出现一个连接窗口,在该窗口中用户可以指定详细的输入\/输出
连接。有关更多信息,请参阅“连接”一章。To specify which outputs of the first model
are connected to which inputs of the second model, the user should double-click on the
link between two components with the Select tool active. A connection window will appear
in which the user can specify the detailed input/output connections. Refer to the
"Connections" chapter for more information.

2.4.11. 创建宏组件。Creating a Macro Component


宏概念允许用户用一个宏模型替换选定的组件以及这些组件之间的连接。宏模型将具有:
The macro concept allows the user to replace selected components, and the connections
between these components, with a single macro-model. The macro-model will have:
 作为参数:它包含的所有模型的参数。as parameters: the parameters of all its
contained models
 作为输出:它包含的所有模型的输出。as outputs: the outputs of all its contained
models
 作为输入:所有包含模型的未链接输入。as inputs: the unlinked inputs of all its
contained models
 作为导数:它包含的所有模型的导数。as derivatives: the derivatives of all its
2–49
Translated by CQU Team Lu

contained models
 作为外部文件:它所包含的所有模型的外部文件。as external files: the external
files of all its contained models
 作为特殊卡:所有包含模型的特殊卡。as special cards: the special cards of all its
contained models
宏模型的行为类似于任何其他模型。它可以被移动,用于创建其他宏、删除、保存为模型
等。创建宏模型时,首先选择要用宏模型替换的模型,通过按住 Shift 键来选择几个组件或
在几个组件周围画一个框来选择它们。或者,可以用鼠标绘制包含一组模型的矩形,以选
择包含在矩形中的所有模型。然后,单击“程序集/创建宏”菜单项,或单击“项目”工具
栏上的按钮( )。程序将用宏模型替换选定的模型。The macro-model behaves like any
other model. It can be moved, used to create other macros, deleted, saved as a model,
etc. To create a macro-model, first select the models to be replaced with a macro-
model by holding down the SHIFT key to select several components or draw a box
around several components to select them. Alternatively, a rectangle containing a set of
models can be drawn with the mouse to select all models contained in the rectangle.
Then, click on the Assembly/Create Macro menu item, or click on the button ( ) on
the Project Toolbar. The program will replace the selected models with a macro-model.
可以通过双击名称和键入新文本来更改宏变量名。Macro variable names can be changed
by double-clicking on the name and typing a new text.

2.4.12. 分解现有宏。Exploding an existing macro


“装配/分解宏”菜单项用于用用于创建宏模型的组件和连接替换宏模型。选择宏模型,然
后单击此菜单命令将用其组件和连接替换宏模型。如果用户只想查看宏,或者稍微修改宏
模型,则应该打开宏模型(见下文)。The Assembly/Explode Macro menu item is used
to substitute a macro-model by the components and connections that were used to
create the macro-model. Selecting a macro-model and then clicking this menu command
will replace the macro-model by its components and connections. If the user just wishes
to view the macro, or slightly modify the macro-model, the user should instead open the
macro model (see below).

2.4.13. 打开现有宏。Opening an existing macro


“装配/打开宏”菜单项用于创建其他装配面板,该面板显示用于创建宏模型的零部件和连
接。“装配/关闭宏”菜单项关闭显示宏的装配面板。The Assembly/Open Macro menu
item is used to create an additional assembly panel that displays the components and
connections that were used to create the macro-model. The Assembly/Close Macro
menu item closes the assembly panel displaying the macro.
在宏内部,组件左上角和右上角的小箭头表示该组件在宏外部具有传入和\/或传出链接。这
些链接可以用鼠标右键上下文菜单“与……编辑连接”来访问。Inside a macro, little
arrows on the top-left and top-right corners of a component indicate that this
component has incoming and/or outgoing links outside the macro. These links can be
accessed with the right-mouse click context menu “Edit Connections with…”.

2–50
Translated by CQU Team Lu

图 2.4.13-1:具有当前宏外部链接的组件。Figure 2.4.13-1: a component with links outside


the current macro

2.4.14. 保存宏。Saving a Macro


要存储宏模型,请右键单击上下文菜单,然后选择“保存宏”。将出现一个窗口,提示用
户为保存的宏模型提供名称。保存到.\\trnsys17\\studio\\proformas 目录(或其子文件夹)
后,宏将像“普通”组件一样出现在直接访问工具中(使用直接访问\/刷新树命令更新直接
访问工具)。To store a macro-model, bring up the context menu by right-clicking on it,
then choose Save macro. A window will appear prompting the user to supply a name to
the saved macro-model. Once saved in the \Trnsys17 \Studio \Proformas directory (or a
subfolder thereof), the macro will appear in the direct access tool like ‘ normal ’
components (use the Direct Access/Refresh tree command to update the direct access
tool).

2.4.15. 保存项目。Saving a Project


“文件/保存”或“文件/另存为”工具允许用户将“部件面板”窗口的全部内容另存为项目。
在安装目录的 myprojects 目录中创建新项目后,该项目将自动保存。用户应该定期“清理”
此目录,以删除旧的和未使用的项目。项目可以存储或复制在硬盘上的任何地方。The
File/Save or File/Save As tool allows the user to save the entire contents of the
Assembly Panel window as a project. A new project has automatically been saved after
its creation in the MyProjects directory in the installation directory. Users should
‘clean’ this directory regularly, to remove old and unused projects. Projects can be
stored or copied anywhere on the hard disk.

2.4.16. 添加或删除 trnsys trace 命令。Adding or removing the


TRNSYS Trace command
装配/添加-删除跟踪工具用于通知 trnsys 仿真程序在仿真过程中应跟踪哪些组件模型。选择
一个或多个组件,然后单击此菜单命令或项目工具栏上的跟踪图标,将使用类似于跟踪工
具图标的示意图标记此模型(请参见图 2.4.16-1)。或者,可以首先选择跟踪工具,然后通
过使用活动跟踪工具选择跟踪标记来跟踪组件。trnsys 程序将从模拟开始到模拟结束跟踪此
组件(列出每次调用此组件时的所有参数、输入、输出和导数)。选择一个已经被跟踪的
组件,然后单击该组件将从组件模型中删除跟踪标记。在跟踪组件时应注意,因为大量的
数 据 可 能 由 于 相 对 较 短 的 模 拟 而 产 生 。 有 关 trnsys trace 命 令 的 更 多 信 息 , 请 参 阅
“ Volume 7 trnedit:Editing the input file and creating trnedit applications ” 。 The
Assembly/Add-Remove Trace tool is used to inform the TRNSYS simulation
program which component models should be traced during the simulation. Selecting one
or more of the components and then clicking this menu command or the Trace icon on
the Project toolbar will tag this model with footprints similar to the icon of the Trace
tool (see Figure 2.4.16-1). Alternatively, the Trace tool can be selected first and then
components can be marked for tracing by selecting them with the active Trace tool.
The TRNSYS program will trace this component (list all the parameters, inputs,
2–51
Translated by CQU Team Lu

outputs, and derivatives at each call to this component) from the beginning of the
simulation to the end of the simulation. Selecting a component which is already being
traced and then clicking this component will remove the trace tag from the component
model. Care should be taken when tracing components as voluminous data can result
from a relatively short simulation. Please refer to “Volume 7 TRNEDit: Editing the Input
File and Creating TRNEDIT Applications” for more information on the TRNSYS trace
command.

图 2.4.16‐1:跟踪组件模型。Figure 2.4.16‐1: Traced Component Model


2.4.17. 向程序集窗口添加文本。Adding Text to the Assembly
Window
项目工具栏(上的“程序集/添加文本”菜单项或“添加文本”图标( )允许项目的创建
者将文本字符串插入到程序集面板本身。这些文本字符串允许用户提醒自己项目的某些特
性。这在打印装配面板时也很有用。若要使用此特性,请单击“添加文本”菜单项,然后
单击“装配”面板上的空间,用户可以开始在所需文本中键入该空间。文本将添加到文本
层。The Assembly/Add Text menu item or Add Text icon on the Project Toolbar ( )
allows the creator of a project to insert text strings onto the Assembly panel itself. These
text strings allow the user to remind themselves of certain characteristics of the project.
This is also useful when the Assembly panel is printed. To use this feature, click on
the Add Text menu item and then click a space on the Assembly Panel at which point
the user can start typing in the desired text. The text will be added on the text layer.

2.4.18. 锁定和解锁部件。Locking and Unlocking Components


程序集锁定/解锁菜单项或锁定工具栏项( )允许项目的创建者锁定程序集面板中的某些
组件。无法删除或修改这些锁定的组件。选择其中一个组件并单击此命令将用挂锁标记此
模型,如图 2.4.18-1 所示。再次单击此命令将解锁模型。将部件另存为项目时,将保留模
型的锁定\/解锁状态。如果 trnedit 命令被自动写入 trnsys 输入文件,则如果整个组件被锁定,
则不会写入 trnedit 语句。The Assembly/Lock-Unlock menu item or Lock toolbar item
( ) allows the creator of a project to lock certain components in the assembly panel.
These locked components cannot be erased nor modified. Selecting one of the
components and clicking this command will tag this model with a padlock as shown in
Figure 2.4.18-1. Clicking again on this command will unlock the model. The
locked/unlocked status of the model will be preserved when the assembly is saved as a
project. If TRNEDIT commands are being automatically written to the TRNSYS input file,
no TRNEDIT statements will be written if the entire Component is locked.

图 2.4.18-1:锁定组件模型。Figure 2.4.18-1: Locked Component Model

2–52
Translated by CQU Team Lu

2.4.19. 访 问 模 拟 控 制 卡 。 Accessing the Simulation Control


Cards
汇编/控制卡菜单命令允许用户指定 trnsys 程序所需的模拟控制卡。控制卡还可以通过右键
单击装配面板中的空白区域并从下拉菜单中选择“控制卡…”来快速访问。单击 工具也
将打开控制卡窗口,如图 2.4.19-1 所示。The Assembly/ Control Cards menu command
allows the user to specify the simulation control cards which are required by the
TRNSYS program. The control cards can also be accessed quickly by right- clicking on
a blank area in the Assembly Panel and selecting "Control Cards..." from the drop down
menu. Clicking on the tool will also open the Control Cards window as shown in Figure
2.4.19-1.

图 2.4.19-1:控制卡窗口。Figure 2.4.19-1: Control Cards Window

在此窗口中,用户必须指定要在模拟中使用的控制卡。有关 Trnsys 控制卡的完整说明,用


户应参阅第 8 卷“程序员指南”。In this window, users must specify the control cards to
be used in the simulation. Users should refer to Volume 8 ‘Programmer’s Guide’ for
a complete description of the TRNSYS control cards.
在该窗口的“控制”选项卡中,可以选择是否应在 trnsys 输入文件中生成 trnedit 命令。一
个包含 TrnEd 指令的输入文件可以用来在 TrnEdIT 程序的帮助下从仿真项目中创建独立的
应用程序(参见“卷 7 TrnIDIT:编辑输入文件并创建 TrnDIT 应用程序”)以获取更多信息。
当选择“write trnedit commands”时,允许用户使用 trnedit 输入文件,此选项将生成更多
常量(模拟项目中每个未锁定变量一个)。这些额外的常数可能导致巨大的模拟运行非常缓
慢。另一个选项“不要编写 trnedit 命令”,会生成更清晰的输入文件。默认值是“不要写
2–53
Translated by CQU Team Lu

入 trnedit 命令”。In the control tab of this window, it is possible to choose if TRNEDIT
commands should be generated in the TRNSYS input file or not. An input file containing
TRNEDIT commands can be used to create stand-alone applications from a simulation
project with the help of the TRNEDIT program (see “Volume 7 TRNEDit: Editing the
Input File and Creating TRNEDIT Applications” for more information). While selecting
'Write TRNEDIT commands' allows the user of the input file with TRNEDIT, this option
will generate more CONSTANTS (one for each unlocked variable in the simulation
project). These extra constants may cause huge simulations to run very slowly. The
other option, 'Don’t write TRNEDIT commands', produces more legible input files. The
default value is “Don’t write TRNEDIT commands”.
另一个变量控制在 trnsys 输入文件中写入 simulation studio 元命令。如果该值为“true”
(打开),Simulation Studio 元命令将添加到 trnsys 输入文件中。这些命令被 trnsys 当作注
释处理,即它们不会对模拟产生任何影响。但是,它们允许 Simulation Studio 使用文件导入
功能从 Trnsys 输入文件更好地重建仿真项目。这对于重新导入修改过的 trnsys 输入文件很
有用。Another variable controls the writing of Simulation Studio Meta-commands in the
TRNSYS input file. If this value is "True" (On), Simulation Studio Meta-Commands will be
added to the TRNSYS input file. These commands are treated by TRNSYS like
comments, i.e. they will not have any influence on the simulation. However, they allow
Simulation Studio to better reconstruct a simulation project from a TRNSYS input file, using
the File/Import function. This is useful for re-importing a modified TRNSYS Input file.
如果导入文件中不存在元命令,Simulation Studio 将使用 EXE 目录中的 modelconffile.conf
文件将单元声明映射到形式化格式。If Meta-commands are not present in the import file,
Simulation Studio uses the ModelConfFile.conf file in the EXE directory to map UNIT
declarations to PROFORMAs.
用户可以通过单击散布在控制卡窗口中的锁来锁定(或解锁)模拟中的任何或所有控制卡。
锁定控制卡不能更改。窗口中的所有锁都可以通过点击窗口左侧的“锁定所有”按钮来锁定。
控制卡将写入在“文件组名”输入框中指定的 trnsys 输入文件。Users have the ability to
lock (or unlock) any or all of the control cards for a simulation by clicking on the locks
scattered throughout the control card window. Locked control cards can not be changed.
All the locks in the window can be locked by clicking the Lock All Button at the left
side of the window. The control cards will be written to the TRNSYS input file specified in
the 'Deck file name' input box.
“模拟开始时间”、“模拟停止时间”和“时间步长”的值将分别以“开始”、“停止”
和“步长”表达式的名称写入 Trnsys 表达式。这些方程名可以在方程组分中使用,也可以
用作任何组件模型(例如打印机组件)的参数。有关使用这些方程式的更多信息,请参阅
本手册的“方程式”部分。The value for the 'Simulation start time', the 'Simulation stop
time', and the 'Time step' will be written as TRNSYS equations with the equation names
'START', 'STOP', and 'STEP' respectively. These equation names can be used in the
equations component or as parameters to any component model (the printer component
for example). Refer to the "Equations" section of this manual for more information on
using these equations.
请注意,在“模拟输入文件名”框的位置旁边有一个“浏览”按钮,该按钮允许用户在硬盘
上搜索要用于 trnsys 输入文件的文件名的位置和名称。列表文件的名称和路径与输入文件相
同,但扩展名自动为*.lst。名称**.dck 可用于插入当前项目名称。Note that next to the
location of the Simulation Input File Name box is a BROWSE button which allows the
2–54
Translated by CQU Team Lu

user to search the hard drive for the location and name of the filename they wish to
use for the TRNSYS input file. The name and path for the list file is identical to the input
file except for the extension which is automatically *.lst. The name ***.dck can be used to
insert the current project name.
“组件订单”选项卡将打开另一个窗口,用户可以在其中重新排序仿真中的组件,如图
2.4.19-2 所示。默认情况下,零部件和表达式块按它们在“部件面板”窗口中的放置顺序显
示。通过选择组件,按住鼠标左键并向上或向下滑动组件,组件可以在输入文件中较早或
更晚地移动。在甲板文件中生成的单位号码可以通过点击鼠标或按相应的线按下 F2 键来修
改。The "Component Order" tab will open another window in which the user can reorder
the components in the simulation as shown in Figure 2.4.19-2. By default, the components
and equation blocks appear in the order in which they were placed in the Assembly Panel
window. By selecting a component, holding the left mouse button down and sliding the
component up or down, the component can be moved earlier or later in the input file.
The unit number generated in the deck file can be modified by clicking with the mouse
or pressing F2 key on the corresponding line.
“优化组件顺序”按钮将优化顺序以使模拟更有效。The Optimize components order
button will optimize the order for the simulation to be more efficient.

图 2.4.19‐2:组件订单窗口。Figure 2.4.19‐2: Component Order Window


2.4.20. 仅生成输入文件。Generate the Input File Only
“计算/创建输入文件”菜单项或“写入输入文件”工具栏图标( )允许用户仅在不运行
模拟的情况下生成输入文件。当用户希望检查所有组件当前连接正确而不启动模拟(用户
知道 将不 会正 常运 行, 因为 模拟 没有 完全 构建 )时 ,这 种能 力是 非常 有价 值的 。The
2–55
Translated by CQU Team Lu

Calculate/Create Input File menu item or the Write Input File toolbar icon ( ) allows
users to generate the input file only without running the simulation. This capability can be
very valuable when the user wants to check that all the components are currently
connected properly without starting a simulation (that the user knows will not run properly
because the simulation is not completely constructed).

2.4.21. 访 问 生 成 的 输 入 文 件 ( .dck ) 。 Accessing the


Generated Input File (*.dck)
“计算/打开/输入文件”菜单项或“文件组”工具栏图标( )允许用户通过 Simulation
Studio 访问生成的输入文件。Simulation Studio 生成的文件将在编辑器窗口(默认情况下
为记事本)中打开。如果用户编辑并保存此文件,则不会模拟更改。选择“运行模拟”命
令后,输入文件将被新版本覆盖,更改将丢失。The Calculate/Open / Input File menu
item or the Deck File toolbar icon ( ) allows users to access the generated input file
through Simulation Studio. The file, which Simulation Studio has generated, will be
opened in the editor window which is Notepad by default. If the user edits this file and
saves it, the changes will NOT be simulated. When the Run Simulation command is
selected, the input file is overwritten with a new version and changes are lost.

2.4.22. 运行模拟。Running the Simulation


“计算/运行仿真”菜单项或“运行”工具栏图标( )允许用户在当前打开的项目上运行
trnsys 仿真程序。单击此命令将启动以下过程:The Calculate/Run Simulation menu item
or Run toolbar icon ( ) allows the user to run the TRNSYS simulation program on the
currently opened project. Clicking on this command starts the following process:
 该项目是检查任何错误或遗漏,模拟工作室可以找到(验证)。The project is
checked for any errors or omissions which Simulation Studio can find (verified).
 trnsys 输入文件是从项目生成的。The TRNSYS input file is generated from the
project.
 trnsys 仿真程序是用新创建的输入文件运行的。The TRNSYS simulation program
is run with the newly created input file.
一旦 TrnSyS 程序完成了仿真,控制返回到模拟工作室程序,在那里可以分析结果,可以创
建图形,或者可以运行额外的模拟。分析模拟结果时应小心,因为 trnsys 和 simulation
studio 在运行新模拟时都不会自动删除输出、列表和打印文件。如果新的模拟失败,则输出
和打印文件可能来自此输入文件以前的成功模拟。在分析结果之前,用户应始终检查 trnsys
列表文件中的警告或错误源。Once the TRNSYS program has finished the simulation,
control is returned to the Simulation Studio program where the results can be analyzed,
graphs can be created, or additional simulations can be run. Care should be taken when
analyzing the results from a simulation as neither TRNSYS nor Simulation Studio
automatically delete the output, list, and plot files when a new simulation is run. If a new
simulation fails, the output and plot files may be from the previous successful
simulation of this input file. Users should always check the TRNSYS list file for sources of
warnings or errors before analyzing the results.

2.4.23. 通过错误管理器访问列表文件(.lst)。Accessing the List


2–56
Translated by CQU Team Lu

File (*.lst) through the Error Manager


calculate\/open\/list file 菜单项或 listfile 工具栏图标( )允许用户访问错误管理器,它分
析和解析 trnsys 在模拟过程中生成的列表文件。文件将在错误管理器中打开(参见图
2.4.23-1)。此对话框包含所有生成的 trnsys 错误消息,并且是在模拟无法运行时检查的第
一个位置。The Calculate/Open/List File menu item or the List File toolbar icon ( )
allows users to access the Error Manager, which analyzes and parses the list file which is
generated by TRNSYS during a simulation. The file will be opened in the Error Manager
(see Figure 2.4.23-1). This dialog contains all generated TRNSYS error messages and is
the first place to check when the simulation fails to run.

图 2.4.23‐1:错误管理器‐消息选项卡。Figure 2.4.23‐1: Error Manager ‐ Messages tab


错误管理器窗口最多包含 3 个选项卡:消息、单位统计信息、类型统计信息。“stats”选
项卡仅在启用调试时可用(控制卡中的参数“debug mode”设置为“true”)。一个按钮
允许打开完整的日志文件:“lst file…”。The error manager window contains up to 3
tabs: Messages, Units stats, Types stats. The ‘stats’ tabs are only available if
debugging is enabled (parameter ‘Debug mode’ set to ‘true’ in Control Cards). A
button allows to open the complete log file : ‘Lst file...’

2.4.23.1. 消息标签。Messages tab

2–57
Translated by CQU Team Lu

此选项卡顶部包含一个表,该表汇总了模拟期间发生的所有消息。对于每条消息,This tab
contains a table on the top which summarizes all messages that occurred during the
simulation. For each message,
 严 重 性 是 消 息 的 类 型 。 它 可 以 被 注 意 、 警 告 和 错 误 。 Severity is the type of
message. It can be notice, warning and error.
 时间是模拟过程中消息出现的时间。Time is the time when the message appeared
during the simulation.
 unit 是负责消息的组件(如果可用)的单元号。Unit is the unit number of the
component that is responsible of the message (if available).
 type 是负责消息的组件(如果可用)的类型号。Type is the type number of the
component that is responsible of the message (if available).
如果类型/单位号信息可用,双击行将打开相应的组件属性以检查参数的有效性。如果无法
将错误分配给特定组件(例如,全局信息中的错误等),则此信息可能不可用。If the type
/ unit number information is available, double clicking on a row will open the
corresponding component properties to check the validity of the parameters. This
information may not be available if an error cannot be assigned to a particular component
(e.g. error in global information, etc.).
为了创建单元/类型统计信息,调试模式(控制卡 6)必须设置为“真”。否则,这些选项卡
不可用。In order to create Unit / Type statistics, debug mode (control card #6) must be
set to ‘true’. Otherwise, these tabs are not available.
注意,底部的复选框可用于筛选显示的消息。Note that at the bottom, check boxes are
available for filtering displayed messages.
2.4.23.2. 单位统计选项卡。Units stats tab

2–58
Translated by CQU Team Lu

图 2.4.23‐2:错误管理器‐单位统计选项卡。Figure 2.4.23‐2: Error manager ‐ Units stats


tab
此选项卡顶部包含一个表,该表汇总每个单元的计算时间。This tab contains a table at the
top which summarizes time of calculation spent for each unit.
底 部的 复 选 框可 用 于 筛选 显 示 的行 , 这取决 于 所 选的 单 元 号。The check box at the
bottom can be used for filtering displayed rows, depending on the selected unit number.
仅当调试模式(控制卡 6)必须设置为“真”时,此选项卡才可用。This tab is only
available if debug mode (control card #6) must is set to ‘true’.

2.4.23.3. 类型统计选项卡。Types stats tab

2–59
Translated by CQU Team Lu

图 2.4.23‐3:错误管理器‐类型统计选项卡。Figure 2.4.23‐3: Error Manager – Types stats


tab
此选项卡顶部包含一个表,该表汇总了每种类型的计算时间。This tab contains a table at
the top which summarizes time of calculation spent for each type.
底部的复选框可以用于筛选显示的行,这取决于所选的类型号。The check box at the
bottom can be used for filtering displayed rows, depending on the selected type number.
仅当调试模式(控制卡 6)必须设置为“真”时,此选项卡才可用。This tab is only
available if debug mode (control card #6) must is set to ‘true’.

2.4.23.4. LST 文件…标签。Lst file... tab

2–60
Translated by CQU Team Lu

图 2.4.23‐4:错误管理器–LST 文件…选项卡。Figure 2.4.23‐4: Error Manager – Lst


file… tab
此选项卡显示.lst 文件的内容,该文件包含模拟过程中出现的所有消息。使用默认编辑器
(请参见文件\/设置\/目录)。。This tab displays the content of the .lst file, which
contains all messages that appeared during the simulation. The default editor (see
File/Settings/Directories) is used.

2.4.24 使用电子表格打开输出文件。Opening Output Files with a


spreadsheet
程序集在电子表格中打开工具启动电子表格应用程序,如文件\/设置…\/目录\/扩展应用程序
下配置的。要使用电子表格,用户必须选择包含要加载到电子表格中的数据的打印机模型
的图标,然后单击菜单命令。The Assembly/Open in Spreadsheet tool launches the
spreadsheet application, as configured under File/Settings … /Directories/SPREAD
application. To use the spreadsheet, the user must select the icon of the printer model
which contains the data to be loaded into the spreadsheet and then click on the menu
command

2.5. 变量。Variables
在 Simulation Studio 中创建程序集的一个重要步骤是为每个组件模型指定所需的变量。通过
2–61
Translated by CQU Team Lu

双击所需的模型图标,可以在装配面板中访问特定变量(输入、输出、参数和导数)窗口。
参数、输入、输出和导数都可以在使用选项卡视图的单个窗口中使用。用户需要指定所有参
数、所有输入的初始值以及模型中可能存在的任何导数。输出窗口仅供参考。未能向组件模
型 提 供 这 些 信 息 将 导 致 组 件 使 用 默 认 信 息 。 An important step in the creation of an
assembly in Simulation Studio is the specification of the required variables for each
component model. The specific variable (input, output, parameter, and derivative)
window can be accessed in the assembly panel by double-clicking the desired model icon.
The parameters, inputs, outputs and derivatives are all available in a single window using
a tabbed view. The user is required to specify all the parameters, the initial values for all
the inputs, and any derivatives that may be present in the model. The output window is
just for informational purposes. Failure to provide any of this information to the component
model will result in default information being used for the component.
不同的变量选项卡包含一些独特的功能,但在外观和操作上都非常相似。Trnsys 辐射处理
器的输入窗口如图 2.4.24-1 所示。每个变量集都包含组织成数据行的重要变量信息。每行
包含:The different variable tabs contain some unique features, but are all very similar in
look and operation. The inputs window for a TRNSYS radiation processor is shown in
Figure 2.4.24-1. Each variable set contains important variable information organized into
rows of data. Each row contains:
 输入、输出或参数的数目。The number of the input, output or parameter.
 一个符号,指示此变量是锁定的 还是未锁定的 。A symbol to indicate whether
this variable is locked or unlocked .
 变量的名称。连接的输入变量名称用黑色书写,而非连接的变量则用蓝色书写。。
The name of the variable. Connected input variables names are written in black, while
non connected variables are blue.
 包含此变量当前值的输入框。只有当变量未锁定时,才能更改此值。变量的新值必
须在组件模型作者指定的范围内。An input box containing the current value for this variable.
This value may be changed only if the variable is unlocked. The new value for the
variable must lie within the bounds specified by the author of the component model.
 变量的当前单位。The current unit for the variable.
 一个“更多”按钮,允许用户提供有关变量的其他详细信息。A 'more' button to
allow users additional detailed information on a variable.
如果有专门的外部程序(所谓的插件)可用于编辑组件的变量,则变量窗口的左下角将显示
一个表示魔术棒( )的图标。按下此按钮将激活打开外部应用程序。例如,类型 14 的函
数编辑器(在 Utilities\/Forcing Functions 下)。。If a specialized, external program (a so-
called plug-in) is available to edit the variables of a component, an icon representing a
magic stick ( ) appears in the bottom-left corner of the variable window. Pushing this
button will activate open the external application. An example is the function editor for type
14 (under Utilities/Forcing functions).

2–62
Translated by CQU Team Lu

图 2.4.24-1:输入窗口。Figure 2.4.24-1: Inputs Window

变量窗口包含一组工具,详细说明如下:The variable windows contain a set of tools that


are explained in detail below:

2.5.1. 锁定和解锁项目。Locking and unlocking Items


要锁定或解锁变量,请单击直接位于变量名左侧或直接位于变量名上的锁定符号。该变量
的锁定符号将更改以指示您的选择。锁定参数的值被格式化,以指示值不能更改。解锁参
数行和三个锁定参数行的示例如下所示:To lock or unlock a variable, click on the lock
symbol located directly to the left of the variable name or directly on the name of the
variable. The lock symbol for that variable will change to indicate your choice. The value
for locked parameters is grayed to indicate that the value can not be changed. An
example of an unlocked parameters line and three locked parameters line are shown
below:

图 2.5.1-1 : 锁 定 和 解 锁 变 量 示 例 。 Figure 2.5.1-1: Example of Locked and Unlocked


Variables

2.5.2. 锁 定 或 解 锁 所 有 变 量 。 Locking or Unlocking all the


Variables
如果用户希望锁定所有变量,只需单击“全部锁定\/解锁”按钮( )即可执行此任务。再
次单击“全部锁定\/解锁”按钮将解锁窗口中的所有变量。If the user wishes to lock all the
variables, a single click on the Lock/Unlock All button ( ) will perform the task. Clicking
2–63
Translated by CQU Team Lu

again on the Lock/Unlock All button will unlock all the variables in the window.
如果使用 trnedit 模式(汇编/控制卡\/写入 trnedit 命令;有关详细信息,请参阅 trnedit 手
册),则参数、输入或导数的锁定具有重要影响。未连接输入的未锁定参数或未锁定初始
值将写入生成的。The locking of a parameter, input, or derivative has important effects if
TRNEDIT mode is used (Assembly/Control Cards/Write TRNEDIT commands; see
the TRNEdit manual for details). An unlocked parameter or unlocked initial value of an
unconnected input will be written to the generated
trnsys 以 trnedit 格式输入文件。只有在 TrnEdID 格式中写入的这些变量可以是 1)在
TrNeDIT 程序中由用户更改,2)在 TRNBuild 中放入参数表。因此,在决定是否锁定或解
锁 某 个 参 数 时 , 应 该 考 虑 一 下 。 TRNSYS input file in TRNEDIT format. Only these
variables that are written in TRNEDIT format can be 1) changed by a user in the
TRNEDIT program and 2) put into a parametric table in TRNBuild. Therefore, the
decision to leave a parameter locked or unlocked should be made with some thought.
要更改变量的当前值,用户必须在包含当前值的输入框中单击并输入新值。按箭头键或制
表键将光标放在下一个要编辑的值中。只有当变量未锁定时,才能更改此值。变量的新值
必须在组件模型作者指定的范围内。由于明显的原因,输出窗口不包含此输入框。To
change the current value for a variable, the user must click in the input box containing
the current value and enter a new value. Pressing the arrow keys or TAB key will place the
cursor in the next value to edit. This value may be changed only if the variable is
unlocked. The new value for the variable must lie within the bounds specified by the
author of the component model. The output window does not contain this input box for
obvious reasons.
要更改变量的单位,用户必须选择当前单位。用鼠标点击当前设备或选择“Alt”+向下箭头
将显示下拉菜单。将出现一个弹出菜单,其中包含此变量的可用单位选项(基于变量的维
度)。选择新的单位,盒子就会消失。变量的值将更改以反映您对单位的新选择。用户不
必担心在正确的单位系统中指定变量。Simulation Studio 程序将根据 TRNSYS 仿真程序的
要求自动将变量转换为正确的单位集。如果按下更多按钮,可以看到 TrnSIS 程序所需的单
元。所需的单位是“单位”输入框中显示的单位。To change the units for a variable, the
user must select the current unit. By clicking on the current unit with the mouse or by
selecting "Alt" + Down-Arrow will make the drop down menu appear. A pop-up menu
will appear with available choices of units for this variable (based on the dimension of the
variable). Choose the new unit and the box will disappear. The value of the variable will
change to reflect your new choice of units. Users do not have to worry about specifying
a variable in the correct unit system. The Simulation Studio program will automatically
convert the variable to the correct set of units as required by the TRNSYS simulation
program. The units required by the TRNSYS program can be seen if the More button is
pressed. The required unit is that unit shown in the 'Unit' input box.
单击 more 按钮将弹出一个关于变量的详细信息窗口。示例变量详细信息窗口如图 2.5.2-1
所示。Clicking on the more button will bring up a window of detailed information on the
variable. A sample Variable Detail window is shown in Figure 2.5.2-1.

2–64
Translated by CQU Team Lu

图 2.5.2‐1:变量信息窗口。Figure 2.5.2‐1: Variable Information Window


此窗口主要用于获取有关 trnsys 变量的详细信息。This window is used primarily to get
detailed information on a TRNSYS variable.
如果用户希望使用 trnsys 公式名或常量作为参数值或输入的初始值,则应按下“类型”按钮,
并将变量类型从其当前状态更改为“字符串”。这将允许用户在值输入框中键入方程式或常
数的名称。当使用方程式名称作为参数或输入的初始值作为时变方程式时,应小心使用
TRNSYS 方程式解算器。请参阅“第 7 卷 trnedit:编辑输入文件和创建 trnedit 应用程序”,
了解有关方程式和常数的更多信息。希望使用公式作为组件输入的用户需要使用公式组件
(assembly\/insert equation 命令)。用户也可以在此窗口中更改此变量的单位。有关更多
信息,请参阅本手册形式章节中包含的变量详细信息窗口的说明(第 2.3 节)。If a user
wishes to use a TRNSYS equation name, or constant, as the value for a parameter or the
initial value of an input, the Type button should be pressed and the variable type
changed from its current status to "string". This will allow the user to type the name of the
equation or constant into the value input box. Care should be taken when using equation
names as parameters or initial values of inputs as time- varying equations will cause
problems with the TRNSYS equation solver. Please refer to “ Volume 7 TRNEDit:
Editing the Input File and Creating TRNEDIT Applications” for more information on
equations and constants. Users wishing to use equations as inputs to a component
are required to use the equations component (Assembly / Insert Equation command).
Users may also change the units for this variable in this window. Refer to the description
of the Variable Detail window contained in the Proforma chapter of this manual for more
information (section 2.3).

也可以通过点击信息按钮( )打开表单。。The Proforma can also be opened by


clicking on the information button ( ).
2–65
Translated by CQU Team Lu

在许多组件中,都有要填写的特殊卡、要指定的周期或要指定的外部文件和注释。下面讨论
这些主题。有关特殊卡、循环和外部文件的详细信息可在本手册的“PrimRMA”部分找到。
In many components, there are special cards to be filled in, cycles to be specified, or
external files to be specified and comments. These topics are discussed below. Detailed
information about special cards, cycles, and external files can be found in the "Proforma"
section of this manual.

2.5.3. 特殊卡片。Special Cards


特殊卡要求用户指定组件所需的一些附加信息。一个很好的例子是 65D 型在线绘图仪,如
图 2.5.3-1 所示,它需要指定 Y 轴和标题的标签。应在提供的输入框中输入附加信息。
Special cards require the user to specify some additional information that is needed by the
component. A good example is the TYPE 65d Online plotter, shown below in Figure
2.5.3-1, which requires the specification of the labels for the Y-axis and title. The
additional information should be entered in the input boxes provided.

图 2.5.3-1:特殊卡示例。Figure 2.5.3-1: Special Cards Example

2.5.4. 循环。Cycles
在许多组件中,参数、输入、输出或导数的数量取决于对向用户提出的问题的答案。用户必
须在输入框中输入一个在指定有效范围内的数字。循环示例如图 2.5.4-1 所示。In many
components, the number of parameters, inputs, outputs, or derivatives depend on the
answer to a question posed to the user. Users must enter a number in the input box
provided that lies within the specified validity range. An example of a cycle is shown in
Figure 2.5.4-1.

图 2.5.4-1:输入循环对话框。。Figure 2.5.4-1: Dialog for input cycle.


在本例中,16 型辐射处理器的输出数量取决于用户希望计算辐射的曲面数量。输出(或输
入、导数或参数)的数量将改变,以反映这个周期的答案。In this example, the number
of outputs for the Type 16 radiation processor depends on how many surfaces for
which the user wishes to have the radiation calculated. The number of outputs (or inputs,
derivatives, or parameters) will change to reflect the answer to this cycle.
2–66
Translated by CQU Team Lu

在某些情况下,循环的“大小”(包含在循环中的变量数)也可以由另一个参数的值确定。
In some cases, the ‘size’ of a cycle (the number of variables contained in it) may also
be determined by the value of another parameter.
对于某些特殊模型,例如多区域建筑模型(类型 56),变量的数量和名称取决于某些外部
文件(例如建筑描述文件)。这些组件的输入和输出适应这样一个外部文件的内容。例如,
如果用户在 trnbuild 中向建筑添加了附加热区,则附加的默认输出(例如区域温度)将添加
到输出列表中。鼠标右键菜单“更新构建变量列表”可以用来更新这些列表。For some
special models, such as the multi zone building model (type 56), the number as well as
the names of the variables depend on some external file (e.g., the building description
file). The inputs and outputs of these components adapt to the contents of such an
external file. For example, if the user adds an additional thermal zone to a building in
TRNBuild, additional default outputs (such as the zone temperature) will be added to
the list of outputs. The right-mouse-click menu ‘Update building variable list’ can be
used to update these lists.
在与气流模拟工具 Comis(157 型)耦合的情况下,输出变量名称将作为特定参数的函数自
动调整。例如,将 157(“output-1”)类型的参数 8 设置为“2.3”将导致此组件的第一个
输出命名为。In the case of the coupling with the air flow simulation tool COMIS (type 157),
the output variable names will automatically adapt as a function of certain parameters. For
example, setting parameter 8 of type 157 (‘Output-1’) to ‘2.3’ will cause the first
output of this component to be named.
“FMA 2->3(从 Comis 2 区到 Comis 3 区的耦合流量[kg\/h])-1”,而不仅仅是“输出
1”。‘Fma 2->3 (Coupling flow from COMIS zone 2 to COMIS zone 3 [kg/h])
-1’ instead of just ‘Output 1’.

2.5.5. 外部文件。External Files


在大多数输出生成组件中,通常会提示用户指定包含输出数据的外部文件的名称。这是在
Simulation Studio 中通过使用外部文件规范实现的。用户可以在输入框中输入所需信息,或
者浏览硬盘以获取该问题的答案。图 2.5.6-1 显示了从 Type25 打印机中获取的示例。In
most of the output producing components, it is common for the user to be prompted to
specify the name of an external file which will contain the output data. This is
accomplished in Simulation Studio by the use of an external file specification. Users
can enter the required information in the input box or browse the hard disk for answers
for this question. An example taken from the TYPE 25 printer is shown below in Figure
2.5.6-1.

用户可能希望浏览硬盘上的正确文件。浏览窗口可以通过按文件名( )旁边的
“浏览”按钮打开。。The user may wish to browse for the proper file on the hard drive.
The browsing window can be opened by pressing the "Browse" button next to the file

name ( ).

2.5.6. 评论。Comment
注释可以在注释选项卡中指定(见图 2.5.6-2)。此注释将写入 trnsys 输入文件。Comment
can be specified in the comment tab (see Figure 2.5.6-2). This comment will be written to
the TRNSYS input file.
2–67
Translated by CQU Team Lu

还可以指定插件路径。插件是可用于编辑组件属性的可执行文件(.exe)。它可以是图形化
的,如需要的复杂(见附录 2 如何创建新插件)。A plug-in path can also be specified. A
plug-in is an executable file (.exe) that can be used to edit component properties. It can be
graphical and as complex as needed (see Appendix 2 How to create new Plug-ins).

图 2.5.6‐1:外部文件示例。Figure 2.5.6‐1: External Files Example

图 2.5.6-2:注释选项卡示例。Figure 2.5.6-2: Comment tab example

2.6. 连接。Connections
2–68
Translated by CQU Team Lu

随着组件模型中变量值的指定完成,用户指定信息如何从一个组件流向另一个组件是很重要
的。在 Simulation Studio 中,此信息流由“装配面板”窗口中两个组件之间的链接指示。
但是,装配面板上显示的链接纯粹是信息性的。用户必须指定两个组件之间链接的详细信息,
才能将信息从一个组件实际流到另一个组件。要指定两个组件之间链接的详细信息,请使用
“连接”窗口。当用户双击两个组件之间的链接(当选择工具 处于活动状态时)或使用
鼠标右键单击并编辑连接时,将打开“连接”窗口。。With the specification of the values
for the variables in the component models complete, it is important that users specify
how information flows from one component to another. In Simulation Studio, this
information flow is indicated by a link between two components in the Assembly Panel
window. However, the link shown on the assembly panel is purely informational. Users
must specify the details of the link between two components to actually flow information
from one component to another. To specify the details of a link between two
components, the Connections window is used. The Connections window is opened when
the user double-clicks on the link between two components (while the Select tool is
active) or use mouse right click and Edit connections with....
“连接”窗口包含两个选项卡(参见图 2.6.1-1 和图 2.6.1-2)、“经典”和“表”。第一个
选项卡是 Simulation Studio 以前版本中使用的经典选项卡,第二个选项卡是一个表,它总
结了两个连接组件之间涉及的所有连接。两个选项卡都依赖于每个选项卡上的用户交互,
并 根 据 用 户 交 互 进 行 更 新 。The Connections window contains two tabs (see Figure
2.6.1-1 and Figure 2.6.1-2), “Classic” and “Table”. The first tab is the classic one
used in previous version of Simulation Studio, the second one is a table which
summarizes all connections involved between the two connected components. Both tab
are dependant and updated depending on user interactions on each tab.
每个选项卡有两列变量。第一列包含第一个组件模型的输出,而第二列包含第二个组件模型
的输入。作为参考,要链接的零部件模型的名称显示在“连接”窗口的标题栏的上方。在所
有连接到此组件之后,组件中未连接的任何输入都将被假定为始终在其初始值处保持恒定。
Each tab has two columns of variables. The first column contains the outputs of the
first component model while the second column contains the inputs to the second
component model. For reference, the names of the component models being linked
appear above in the title bar of the Connections window. Any input that is left
unconnected in a component after all connections have been made to this component will
be assumed to be constant at its initial value for all time.
在 Classic 选项卡中,要指定这两个组件的信息流,用户必须将第一个组件(左侧)的输出
连接到第二个组件(右侧)所需的输入。已连接的输入和输出(在此窗口或另一个连接窗口
中)将以黑色列出。尚未连接的输入和输出将显示为蓝色。记住,在 TrnSyS 中,输入只能
有一个连接,而输出可能有多个连接。突出显示的链接将显示为红色。在 inputs 列的右侧是
输入框,用于指定输入的初始值。输入的初始值可以在这里输入,也可以在“变量”窗口的
“输入”选项卡中输入。要更改初始值,请按“选择”工具的按钮以从“连接”工具(默认
工具)更改。然后,单击要更改的初始值。要更改“变量”窗口中的初始值,请参阅本手册
的“变量”部分以了解更多信息。In the classic tab, to specify the information flow for
these two components, users must connect the outputs of the first component (left-side)
to the required inputs of the second component (right-side). Inputs and outputs that
have been connected, either in this window or in another Connections window, will be
listed in black. Inputs and outputs which have not yet been connected will be colored
blue. Remember, in TRNSYS, inputs can have only one connection while outputs may
2–69
Translated by CQU Team Lu

have several connections. Highlighted links will appear in red. To the right of the inputs
column are input boxes for the specification of the initial values of the inputs. The initial
values of the inputs could be entered here or in the inputs tab of the Variables window. To
change the initial values, press the button for the Select tool to change from the
connection tool (which is the default tool). Then, click on the initial value that you wish to
change. To change the initial values in the Variables window, refer to the "Variables"
section of this manual for more information.
在“表”选项卡中,仅显示连接。换句话说,如果两个相关组件之间没有可用的连接,则表
中将不会显示行。要为这两个组件指定信息流,用户必须添加一行并指定输出(左组合框)
和输入(右组合框)。然后,Classic 选项卡也会更新,并显示一个新连接。In the table tab,
only connections are displayed. In other words, if no connections are available between
the two involved components, no line will appear in the table. To specify the information
flow for these two components, users must add a line and specify the output (left combo
box) and input (right combo box). Then, the classic tab is also updated and a new
connection appears.

2.6.1. 创建连接。Creating a Connection


在“经典”选项卡中:In the classic tab:
单击未连接输出的名称(左列),然后单击输入的名称(右列),将在输入和输出之间画一
条线。这两个变量现在连接起来了。输入可以只连接到一个输出,但是输出可以连接到许多
不同的输入。Simulation Studio 只允许用户连接同一维度的变量,即“temperature”到
“temperature”。不能使用在上一个连接窗口中已连接的输入。Clicking on the name of
an unconnected output (left column) and then clicking on the name of an input (right
column) will draw a line between the input and the output. These two variables are now
connected. Inputs may only be connected to one output, but outputs may be connected
to many different inputs. Simulation Studio will only allow users to connect variables of
the same dimension, i.e. 'temperature' to 'temperature'. Inputs that have already been
connected in a previous connection window cannot be used
在这个连接窗口中,将显示为黑色。这样做是为了避免将一个输入链接到两个或多个不同的
输出。in this connection window and will be colored black. This is done to avoid linking an
input to two or more different outputs.

2–70
Translated by CQU Team Lu

图 2.6.1‐1:连接窗口‐经典选项卡。Figure 2.6.1‐1: Connections Window – Classic tab


在“表格”选项卡中: In the table tab:

单击链接按钮( )将在两个组件之间添加新行(即新连接)。默认情况下,在找到的第
一个兼容变量之间创建连接(即,这两个变量具有相同的维度和单位)。一旦添加了连接,
就可以通过在相应的组合框中选择其他变量(输入或输出变量)来修改。Clicking on the
Link button ( ) will add a new line (i.e. a new connection) between the two
components. By default, the connection is created between the two first compatible
variables found (i.e. the two variables have the same dimension and unit). Once the
connection is added, it can be modified by selecting other variables in the corresponding
combo box (for input or output variable).

2–71
Translated by CQU Team Lu

图 2.6.1-2:连接窗口-表选项卡。Figure 2.6.1-2: Connections Window – Table tab

2.6.2. 选择连接。Selecting a connection


在“经典”选项卡中:In the classic tab:
有时,很难确定(因为许多交叉线)连接位置。因此,如果用户单击已连接的输入或输出,
这将“突出显示”链接。连接的输入和输出名称以及链接行都将变为红色。使用“对齐”按
钮( )将对齐选定连接中的元素,以便于可视化。Sometimes, it is difficult to determine
(because of many crossing lines) the connection location. Therefore, if the user clicks on
either an input or output that is already connected, this will “highlight” the link. Both the
connected input and output names as well as the link line will change color to red. The
use of the align button ( ) will align the elements in the selected connection for easier
visualization.
连接可以从右到左或者从左到右。Connections can be made right-to-left or left-to-right.
可以使用窗口顶部的弹出菜单对变量进行筛选。Variables can be filtered by unit using the
popup menu on top of the window.
变量可以使用“自然”顺序排序(由组件的作者定义并在输入文件和文档中使用,使用
“ReloButter”1-2-3′)或按字母顺序(“ReloButt”-Z′)。Variables can be sorted
using ‘natural’ order (as defined by the component’s author and used in the input file
and documentation, use radiobutton ‘1-2-3’) or in alphabetic order (radiobutton ‘A-Z’).

在“表格”选项卡中:。In the table tab:


单击行标题将选择相应的连接。然后,该行以黑色突出显示。Clicking on the row header
will select the corresponding connection. Then, the row is highlighted in black.

2.6.3. 删除连接。Deleting a connection


“连接”窗口( )中的“删除连接”按钮允许用户删除输入输出连接。The Delete
Connection button in the Connection window ( ) allows the user to delete an input-
output connection.
在“经典”选项卡中:In the classic tab:
单击输入或输出的名称将突出显示连接(将连接行和其他变量名称更改为红色)。然后,用
户可以通过按下删除连接按钮来删除连接两个变量的行。此操作将删除这两个变量之间的信
息流。Clicking on either the name of the input or the name of the output will highlight the
connection (change the connection line and the other variable name to the color red). The
user can then delete the line joining the two variables by pressing the Delete
connection button. This action deletes the information flow between these two variables.
在“表格”选项卡中:In the table tab:
单击行标题将选择相应的连接,可以通过单击“删除连接”按钮来删除该连接。Clicking on
the row header will select the corresponding connection, which can be deleted by clicking
on the Delete Connection button.

2–72
Translated by CQU Team Lu

2.6.4. 获取有关变量的信息。Get Information on a Variable


仅在“经典”选项卡中可用:Only available in the classic tab:
双击变量名用于查看有关特定输入或输出的详细信息。双击输入或输出的名称将打开“变量”
窗口,如图 2.4.24-1 所示。然后,用户可以按“更多”按钮输入或输出他们感兴趣的细节信
息。Double-clicking on a variable name is used to view detailed information about a
particular input or output. Double-clicking on the name of an input or output will open
the Variables window as shown in Figure 2.4.24-1. Then, the user can press the
"More" button for the input or output about which they are interested in getting detailed
information.

2.6.5. 删除多个链接。Deleting multiple links


用户可以通过点击窗口左边的“删除所有链接”按钮( )来删除所有链接。The user can
delete all the links by clicking on the Delete All Links button ( ) on the left of the
window.

2.6.6. 链路定位。Link Positioning


“连接”窗口底部的按钮( )用于定义当一个组件或链接本身移动时,两个组件之间的
链接将如何移动。根据按钮是否被“按下”,它决定链接是否遵循默认位置或用户定义的
位置。这也可以从装配面板中的链接的右键菜单中更改。The button on the bottom of the
connections window ( ) is used to define how a link between two components will
move when one of the components, or the link itself, is moved. Depending on if the
button is "pressed" or not, it determines if the link will follow default positions or user-
defined positions. This can also be changed from the right-click menu of the link in the
Assembly Panel.

2.6.6.1. 用户定义的链接位置。User Defined Positions for Links


如果链接位置按钮是“扩展的”,则表示两个组件之间的链接将在其从一个组件到另一个组
件的路径中由用户定义。当此选项处于活动状态时,链接将不会跟随其中一个组件的移动。
相反,链接中最靠近组件的部分将随着链接的移动而拉伸。当链接处于此模式时,用户可以
重新定位它。If the link position button is "extended", it indicates that the link between
two components will be user- defined in its path from one component to another. When
this choice is active, the link will not follow the movement of one of the components.
Instead, the part of the link closest to the component will stretch as the link is moved.
When the link is in this mode, it may be repositioned by the user.

2.6.6.2. 链接的默认位置。Default Positions for Links


如果“按下链接位置”按钮,它将通知 Simulation Studio 程序,当链接中的一个组件移动
时,两个组件之间的链接应重置为默认位置。在此模式下,两个组件之间的线中的所有弯板
都将以 90 度角发生。If the link position button is "pressed", it informs the Simulation
Studio program that the link between two components should be reset to default positions
when one of the components in the link is moved. In this mode, all bends in the line
between two components will occur at 90 degree angles.

2–73
Translated by CQU Team Lu

图 2.6.6-1 : 链 接 的 默 认 位 置 。 Figure 2.6.6-1:图 2.6.6-2:用户定义的链接位置。Figure


D f lt iti f li k U d fi d iti f li k

2.6.6.3. 链接属性。Link properties


链接属性工具( )将关闭“连接”窗口并打开链接的属性窗口。这个窗口的“行”选项
卡可以用来调整表示链接的线条的图形属性。The link property tool ( ) will close the
connections window and open the link’s property window. The ‘line’ tab of this
window can be used to adjust graphical attributes of the line representing the link.

图 2.6.6‐3:连接窗口‐表选项卡。Figure 2.6.6‐3: Connections Window – Table tab

2.7. 方程。Equations
trnsys 的一个非常有用的特性是能够在输入文件中定义不在组件中的方程。这些方程可以是
其他部件、数值或先前定义的方程的输出的函数。然后,这些方程可以被用作其他组件的输
入,或者作为参数,输入的初始值,或者如果方程是时间无关的,则是导数。请参阅
“Volume 7 trnedit:Editing the input file and creating trnedit applications”,了解有关方程
式使用的更多信息。在 Simulation Studio 中,使用一个特殊的方程式组件最容易完成方程
式的使用。该方程组组件可以放置在一个程序集中,也可以像其他组件一样保存。A very
useful feature in TRNSYS is the ability to define equations within the input file which are
not in a component. These equations can be functions of outputs of other components,
2–74
Translated by CQU Team Lu

numerical values, or previously defined equations. These equations can then be used
as inputs to other components, or as parameters, initial values of inputs, or derivatives if
the equations are time independent. Refer to “Volume 7 TRNEDit: Editing the Input File
and Creating TRNEDIT Applications” for more information on the use of equations. In
Simulation Studio, the use of equations is most easily accomplished by using a special
equations component. This equations component can be placed in an assembly or saved
like any other component.
公式组件不会在生成的输入文件中由 unit,type 语句表示。相反,此组件中包含的信息将放
在 trnsys 输入文件中的一个表达式语句中。用户可以在控制卡窗口中指定方程的位置。不
同 的 方 块 可 以 放 置 在 输 入 文 件 的 任 何 地 方 , 并 且 排 列 成 不 同 的 组 件 。 The equation
component will not be represented in the generated input file by a UNIT, TYPE statement.
Rather, the information contained in this component will be placed in an EQUATIONS
statement within the TRNSYS input file. The user can specify the location of the
equations in the Control Cards window. Different blocks of equations can be placed
anywhere within the input file and are arranged just like different components.
若要将公式添加到打开的部件面板,请选择“部件\/插入新公式”。当在装配面板中放置时,
方程组组件可以链接到所有其他组件的输出和输入,就好像它是一个正常组件一样。双击
“方程式”图标将打开用于创建方程式的对话框。这个窗口可以在图 2.66-1 中看到。To
add equations to an opened assembly panel, select Assembly/Insert New Equation.
When put in place in the assembly panel, the equations component can be linked to the
outputs and inputs of all other components as if it were a normal component. Double-
clicking on the "Equation" icon will open the dialog box used to create the equations. This
window can be seen in Figure 2.6.6-1.
此窗口包含:This window contains:
 在 TrnSyS(Sin,and,Ge 等)中定义的特殊操作符作为按钮。Special operators
defined in TRNSYS (SIN, AND, GE, etc.) as buttons
 一个可以用鼠标点击的数字键盘。A keypad of numbers that can be clicked with the
mouse.
 用于方程式(中间)或方程式组件中定义的输出的变量列表(位于右上角的列表
框)。A list of variables that are used in equations (intermediates) or outputs that are
defined in the equations component (list box located in upper right corner)
 输入 方 程 式 的 变 量 列 表 ( 左 上 角 ) 。 A list of variables that are inputs to the
equations (upper left corner)
 将显示由公式定义的当前变量的框(左中)。A box that will display the current
variable being defined by an equation (middle left)
 包含实际公式的框(右中)。A box containing the actual equation (middle right)
 时间(当前模拟时间)、开始(在控制卡中定义的模拟开始时间)、停止(在控制
卡中定义的模拟停止时间)和步骤(在控制卡中定义的模拟时间步骤)包含在特殊运算符中。
TIME (the current simulation time), START (the simulation start time defined in the control
cards), STOP (the simulation stop time defined in the control cards), and STEP (the
simulation timestep defined in the control cards) are included with the special operators.
 “编辑所有公式”按钮,允许在文本编辑器中同时编辑此组件定义的所有公式。A
button ”Edit all equations” which allows to edit all equations defined by this component
2–75
Translated by CQU Team Lu

at the same time in a text editor


方程组中定义的变量可以被认为是方程模型的输出。然后,这些输出可以链接到其他组件
的输入。同样,定义为方程的输入的变量将被显示为这个“均等”分量的输入,并且可以
链接到其他组件的输出。The variables that are defined in the equations component
can be thought of as outputs from the equations model. These outputs can then be
linked to inputs of other components. Likewise, the variables defined as inputs to the
equations will be displayed as inputs to this "equa" component and can be linked to the
outputs of other components.

图 2.6.6‐1:公式窗口。Figure 2.6.6‐1: Equation Window


输入公式应遵循以下步骤:The following steps should be followed to enter an equation:
1) 决定哪些变量名将被输入到这些方程中,哪些变量将被输出到这些方程中。Decide what
variable names will be inputs to these equations and what variables will be outputs from
these equations.

2)单击输入框( )旁边的“添加新输入变量”按钮。通常最好用有意义的值重命名新的
输入变量。“均等”组件中的方程可以保存并用于将来的项目中,因此名称越令人难忘,它
就越好。Click on the "Add a new input variable" button next to the inputs box ( ). It
2–76
Translated by CQU Team Lu

is usually best to rename the new input variable with a meaningful value. The equations
in the "equa" component can be saved and used in future projects so the more
memorable the name is, the better it is.
3) 一旦在输入框中定义了所有必需的输入,请对右上角框中的输出变量执行相同的操作。
再 次 单 击 “ 添 加 新 输 出 变 量 ” 按 钮 , 并 为 此 输 出 变 量 输 入适 当 的 名 称 。 Once all the
necessary inputs are defined in the input box, do the same for output variables in the
upper right hand box. Again, click on the “Add a new output variable" button and enter
an appropriate name for this output variable.
4) 下一步是定义输出变量和一个或多个输入变量之间的关系。因此,点击一个输出变量来
选择它。然后,单击“选择编辑输出”按钮( )。The next step is to define the
relationship between an output variable and one or more input variables. Therefore, select
an output variable by clicking on it. Then, click on the "Select the output for edition"
button ( ).
5) 现在,所需的输出应该出现在左中框中。用户有几个选项可以输入公式:Now, the
desired output should appear in the middle left box. The user has several options to enter
the equation:
单击“Trnsys 特殊运算符”按钮,将其放置在“公式”框中。Click on the TRNSYS special
operator buttons to place them in the equation box.

选择一个输入或先前定义的输出,然后单击“放入公式”按钮( )将其放入公式中。。
Select an input or previously defined output and then click on the "Place in equation"
button ( ) to place it in the equation.
只需在公式框中键入。Simulation Studio 正在监视键入的内容。如果不能将变量名识别为输
入、输出或特殊运算符,则变量名将显示为红色。当在框中键入变量名时,文本将变为红色,
直到完全输入。Simply type in the equation box. Simulation Studio is monitoring what is
typed. If it does not recognize a variable name as either an input, an output, or a special
operator, then the variable name is displayed in red. As a variable name is typed into the
box, the text will be red until completely entered.
6) 关闭“公式”窗口并链接到其他组件以连接输入和输出。在这一点上,方程组分和其他
组分一样。Close the Equation window and make links to other components to connect
the inputs and outputs. The equation component is just as any other component at this
point.
图 2.6.6-2 显 示 了 输 入 窗 口 的 方 程 式 的 完 成 情 况 。 Figure 2.6.6-2 demonstrates the
completion of an equation entered into the window.
请注意,用户可以指定插件路径来管理其方程(插件 2)如何使用插件。Note that user can
specify a plug-in path to manage its equation with a plug-in (see Appendix 2 How to use
a plug-in).

2–77
Translated by CQU Team Lu

图 2.6.6‐2:公式窗口中的完整公式。Figure 2.6.6‐2: Complete Equation in Equation


window

2.8. 主窗口。Main Window


主窗口是用户在进入 Simulation Studio 程序时首先看到的内容。与其他 MS Windows 程序
一样,它由一系列下拉菜单、几个工具栏和一个或多个活动窗口组成。启动时,主窗口是
空的。通常,在用户创建新项目或打开现有项目后,程序集面板将显示在主窗口中。此外,
可以通过 Studio Studio 的主窗口访问仿真工作室和其他 TrnSyS 工具的所有其他必要特征。
其中一些功能将启动单独的程序,这些程序将在自己的窗口中打开。在 Simulation Studio
主窗口中,屏幕顶部有几个下拉菜单,如图 2.8.1-1 所示。根据当前发生的操作,这些窗口
要么可用,要么显示为“灰色”。这里描述菜单和子菜单。The Main window is what users
first see when entering the Simulation Studio program. As with other MS Windows
programs, it consists of a series of pull-down menus, several toolbars and one or more
active windows. On start-up, the main window is empty. Normally, the Assembly Panel will
be shown in the main window after the user creates a new project or opens an existing
project. Additionally, all other necessary features of Simulation Studio and other
TRNSYS tools can be accessed through the main window of Simulation Studio. Several
of these features will launch separate programs which will open in their own windows. In
the main Simulation Studio window, there are several drop-down menus across the top of
the screen as shown in Figure 2.8.1-1. Depending on the current operation occurring,
these windows are either usable or "grayed-out". The menus and submenus are described
here.

2.8.1. 文件菜单。The file menu


“文件”菜单是菜单栏左侧的第一个菜单选项。“文件”菜单提供了打开、保存和打印
Simulation Studio 组件、项目 和文本文件的选项 。此菜单 还包含用 于导入 Simulation
2–78
Translated by CQU Team Lu

Studio 2 组件和库的项,以及用于将形式输出为 HTML 或用于从形式生成 Fortran 代码的菜


单项。最后,trnsys 的重要配置和设置选项也在文件菜单中。文件菜单命令如图 2.8.1-1 所
示,如下所述。The File menu is the first menu option on the left of the Menu Bar. The
File Menu offers choices for opening, saving, and printing Simulation Studio
components, projects and text files. This menu also contains items for Importing
Simulation Studio 2 components and libraries as well as menu items for Exporting
Proformas as HTML or for Generating Fortran code from the Proformas. Finally, the
important configuration and setup options for TRNSYS are also within the File Menu. The
File menu commands are shown in Figure 2.8.1-1 and explained below.

图 2.8.1-1:文件菜单。Figure 2.8.1-1: The File Menu

2.8.1.1. 文件/新的。File/New
new 命令从 Simulation Studio 中的模板创建新的空项目、组件或预配置的项目。带有选项
列表的向导对话框(见图 2.8.1-2)允许选择要创建的对象类型:空 Trnsys 项目、新组件、
太阳能热水系统、简化建筑项目、多区域建筑项目和耦合 Mathis 项目。根据创建的新项的
类型,会发生不同的事件。The New command creates a new empty project, component, or
a pre-configured project from a template in Simulation Studio. A wizard dialog box with a
list of options (see Figure 2.8.1-2) allows choosing the type of object to create: Empty
TRNSYS Project, New Component, Solar Hot Water System, Simplified Building
Project, Multizone Building Project and Coupled MATHIS project. Depending on what
kind of new item is created, different events occur.

2–79
Translated by CQU Team Lu

图 2.8.1-2:向导对话框。Figure 2.8.1-2: Wizard dialog box

如果选择 file/new/empty project 并单击 create 按钮,则会向名为“project x”的用户显示


一个空 trnsys 程序集面板,其中 x 是 myprojects 目录中的当前索引项目。*.tpf 是 trnsys
simulation studio 项目文件(trnsys 项目文件的缩写)的标准结尾。在这个窗口中,用户将
放置几个 Simulation Studio 图标,以便将它们连接在一起并生成模拟。If File/New/Empty
Project is selected and Create button clicked, a blank TRNSYS assembly panel is
presented to the user called "ProjectX", where X is the current index project in the
MyProjects directory. *.TPF is the standard ending for a TRNSYS Simulation Studio
Project File (abbreviated from TRNSYS Project File). Into this window, a user would
place several Simulation Studio icons in order to connect them together and generate a
simulation.
如果选择了“文件/新建/新建组件”,并单击了“创建”按钮,则会创建一个空白组件形式
表。此形式表的标题为“组件 1”。在此形式表中,用户应键入有关组件的所有信息。有关
形式表的详细信息,请参阅本手册后面的讨论(第 2.3 节)。当用户完成了表单时,可以使
用 FrimWorm 窗口中的“保存”菜单项来保存。请注意,在保存组件的位置很重要,因为直
接访问菜单将根据模型在硬盘上的位置来定位模型。所有形式都应保存在下。
\\trnsys17\\studio\\proformas。关于直接访问菜单的讨论(第 2.2.3 节)对此作了进一步说
明。还要注意,组件的标准结尾是*.tmf(trnsys 模型文件的缩写)。用户必须遵循此约定。
If File/New/New Component is selected and Create button clicked, a blank
component Proforma is created. This Proforma is entitled "Component1". Into this
Proforma, the user should type all information about the component. See the discussion
later in this manual for details about the Proforma (section 2.3). When the user has
finished with the Proforma, it can be saved using the Save menu item within the
2–80
Translated by CQU Team Lu

Proforma window. Note that it is important where the component is saved as the Direct
Access menu will locate the model based on its location on the hard disk. All
Proformas should be saved under .\Trnsys17\Studio\Proformas. This is further
described in the discussion on the Direct Access Menu (section 2.2.3). Note also that
the standard ending for Components is *.tmf (short for TRNSYS Model File). It is
important that the user follow this convention.
如果选择“文件/新建/太阳能热水系统”或“文件/新建/建筑项目(简化)”,并单击“打开”
按钮,则将打开示例项目,显示如何描述此类项目。组件和连接可以在以后修改以适应用户
项目。If File/New/Solar Hot Water System OR File/New/Building Project (simplified) is
selected and Open button clicked, example project is opened showing how to describe this
kind of project. Components and connections can be modified later to adapt to user project.
如果选择了“文件/新建/建筑项目(多区域)”,然后单击“下一步”按钮,则会启动一个
逐步向导,并允许为多区域建筑项目设置所有参数。所有这些参数都可以稍后修改。(参见
附录 3 如何使用向导)。If File/New/Building Project (Multizone) is selected and Next
button clicked, a step by step wizard is launched and allow to set all parameters for a
multizone building project. All these parameters could be modified later. (see Appendix 3
How to use the Wizard).
如果选择了“文件/新建/三维建筑项目(多区域)”,然后单击“下一步”按钮,系统将提
示用户输入.idf 文件。IDF 文件可以使用谷歌 SkTekUp 免费的开放式 Studio 插件的修改版
本创建。(详见 56 型手册)。If File/New/3D Building Project (Multizone) is selected
and Next button clicked, the user is prompted for a .idf file to import. IDF files can be
created using a modified version of the Open Studio pluging for Google SktechUp ™
available free of charge. (See the type56 manual for details).
如果选择“文件/新建/新建耦合 Mathis”并单击“下一步”按钮,将启动“逐步向导”,并
将创建耦合的多区域建筑和 Mathis 气流模拟项目。助手将帮助您设置多区域建筑项目,包
括建筑说明和气流网络。If File/New/New Coupled MATHIS is selected and Next button
clicked, a step by step wizard is launched and a coupled Multizone building and MATHIS
air flow simulation project will be created. The assistant will help you set up a multizone
building project, including the building description AND an the air flow network.

2.8.1.2. 文件/打开。File/Open
open 命令打开 Simulation Studio 中的现有项目或组件文件。根据打开的项目类型,会发生
不同的事件。The Open command opens either an existing Project or Component file in
Simulation Studio. Depending on what kind of item is opened, different events occur.
如果选择文件\/打开,Simulation Studio 将显示打开对话框,如图 2.8.1-3 所示。Type 框的
文件将默认列出*.tpf 文件、PrimoRMA 文件(*.tMf)、COMIS 项目文件(*.cf)以及所有文
件(*.*)也可以显示。If File/Open is selected, Simulation Studio displays the Open
dialog box shown in Figure 2.8.1-3. The Files of Type box will default to listing the *.tpf
files, Proforma files (*.tmf), COMIS Project Files (*.cpf) and all files (*.*) can also be
displayed.

2–81
Translated by CQU Team Lu

图 2.8.1‐3:打开对话框窗口。Figure 2.8.1‐3: The Open dialog window


2.8.1.3. 文件/关闭。File/Close
close 命令关闭活动的 trnsys 项目。几个 TrnSIS 项目,由他们的组装板代表,可以同时打
开。close 命令使用活动窗口关闭项目。如果您的项目尚未保存,Simulation Studio 将在关
闭文件之前询问您是否要保存该文件。The Close command closes the active TRNSYS
project. Several TRNSYS projects, represented by their Assembly Panels, can be open
simultaneously. The Close command closes the project with the active window. If your
project has not been saved, Simulation Studio will ask you if you want to save the file
before it is closed.

2.8.1.4. 文件/保存。File/Save
save 命令将活动项目保存到磁盘。例如,如果将名为 test.tpf 的程序集面板项目作为活动窗
口发出 save 命令,则将覆盖文件 test.tpf。请注意,键盘快捷键 ctrl-s 也将保存项目。。
The Save command saves the active project to disk. If, for example, the Save command is
issued with a Assembly panel project named TEST.TPF as the active window, the file
TEST.TPF will be overwritten. Note that the keyboard shortcut CTRL-S will also save the
project.

2.8.1.5. 文件/保存为。File/Save As
save as 命令显示 saveas 对话框(参见图 2.8.1-4)。“将文件另存为”输入框用于输入所
需的文件名,以便将项目保存在“文件”列表框的文件掩码下。文件名掩码是文件名的一
部分,可以标识当前目录中的一个或多个文件。例如,项目名 mask*.tpf 将显示当前目录中
扩展名为.tpf 的所有文件。掩码是确定以前保存的文件名的有用工具。The Save As
command displays the Save As dialog box (see Figure 2.8.1-4). The Save File As input
box is used to enter the desired file name to save the project under or the file-mask for the
Files list box. A file-name mask is a portion of the file name that may identify one or more
2–82
Translated by CQU Team Lu

files in the current directory. For example, the project-name mask *.tpf would display
all files in the current directory with a .tpf extension. The mask is a useful tool for
determining the names of the files that have been previously saved.

图 2.8.1‐4:文件另存为对话框。Figure 2.8.1‐4: Save File As dialog box


2.8.1.6. 文件/全部保存。File/Save All
在 Simulation Studio 中同时打开多个组件形式表和一个项目是常见的。save all 命令保存当
前打开的所有项目和形式。It is common to have several component Proformas and a
project open simultaneously in Simulation Studio. The Save All command saves all the
currently opened projects and Proformas.

2.8.1.7. 文件/导入 trnsys 输入文件…。File/Import TRNSYS Input


File...
import trnsys input file 命令允许用户将现有的 trnsys 输入文件带入 simulation studio。这个
输入文件(甲板)可以用任何文本编辑器或其他 TrnSyx 工具(TrnDIT 等)创建。通常,
Simulation Studio 将为输入文件创建一个新的程序集窗口可视化项目。对于输入文件中的
每个组件,Simulation Studio 将选择适当的形式,将形式图标放置在新的部件面板上,创
建与其他组件的链接,并根据输入文件中的值填写参数和初始值。如果输入文件中的组件
与当前 trnsys 17 组件中的任何一个都不匹配,simulation studio 将使用输入文件中的有限
信息生成通用形式表。TRNSYS17 的几个标准组件已经更改。因此,Studio Studio 可以使
用 TrnSyS 15 中的标准组件的通用形式表。用户可以使用编辑\/替换菜单用 trnsys 17 版本
的 组 件 替 换 通 用 组 件 。 导 入 过 程 可 以 用 文 件
\\\\TrnSys17\\Studio\\exe\\MealMyFiffel.CONF 来 配 置 。 The Import TRNSYS Input
2–83
Translated by CQU Team Lu

File command allows the user to bring an existing TRNSYS input file into Simulation
Studio. This Input File (Deck) can be created with any text editor or other TRNSYS
tools (TRNEdit, etc.). Generally, Simulation Studio will create a new assembly window
visual project for the input file. For each component in the input file, Simulation Studio
will select the appropriate Proforma, place the Proforma icon on a new assembly panel,
create the links with the other components, and fill in the parameters and initial values
based on the values in the input file. If the component in the input file does not match
any of the current TRNSYS 17 components, Simulation Studio will generate a generic
Proforma using the limited information in the input file. Several standard components have
been changed for TRNSYS 17. Therefore, Simulation Studio may use a generic
Proforma for what was a standard component in TRNSYS 15. The user could replace
the generic components with the TRNSYS 17 version of the component using the
Edit/Replace menu. The import process can be configured with the
file .\Trnsys17\Studio\Exe\ModelConfFile.conf.
文件“modelconffile.conf”包含映射规则,这些规则确定要导入的输入文件中的单元类型
组合的每个实例使用哪个 Simulation Studio 形式。若要为输入文件读取功能添加其他组件,
每 个 组 件 的 形 式 需 要 已 存 在 于 Simulation Studio 数 据 目 录 中 。 然 后 , 用 户 需 要 在
“modelconffile.conf”文件中添加其他条目,以便 Simulation Studio 在其正在处理的
Trnsys 输入文件中遇到该类型号时知道使用新的形式表。The file "ModelConfFile.conf"
contains the mapping rules that determine which Simulation Studio Proforma is used for
each instance of a UNIT - TYPE combination in the input file that is being imported. To
add additional components for the input-file-reading capability, the Proforma for each
component needs to already exist in the Simulation Studio data directory. Then, the
user needs to add additional entries in the "ModelConfFile.conf" file so that Simulation
Studio will know to use the new Proformas when it encounters that Type number in the
TRNSYS input file that it is processing.

2.8.1.8. 文件/导入 IISIBAT 2 模型…。File/Import IISiBat 2 Model...


import iisibat2 model 命令允许用户将一个旧的 iisibat2 形式表带入 simulation studio。显示
一 个 打 开 的 对 话 框 , 允 许 用 户 用 扩 展 名 ( *.Objo ) 选 择 任 何 文 件 , 用 于 iSISBAT2
PrimoRMA 文件。然后,这些文件将以 Simulation Studio 形式格式显示。重要的是要检查
新的形式表,以确保它被正确处理。不能将这些旧的形式文件与编译期间作为临时产品生
成的对象文件(也称为.obj)混淆。The Import IISiBat2 Model command allows the user
to bring an old IISiBat 2 Proforma into Simulation Studio. An Open dialog box is
displayed and the user is allowed to select any file with the extension (*.OBJ) that was
used for IISiBat2 Proforma files. These files are then displayed in the Simulation Studio
Proforma format. It is important to check the new Proforma to make sure it is processed
properly. One must not confuse these old Proforma files with object files (also
called .obj) produced as a temporary product during compilation.

2.8.1.9. 文件/导入 IISIBAT2 库…。File/Import IISiBat2 Library...


import iisibat2 library 命令允许用户将旧的 iisibat2 库带入 simulation studio。这在本质上与
“import iisibat2 模型”类似,但同时导入许多形式表并创建目录结构,就像 iisibat2 中存
在的库结构一样。显示一个打开的对话框,允许用户用扩展名(*.Objt)选择任何文件,用
于 iSISBAT2 库(和 PrimRMA)文件。然后,这些文件将以 Simulation Studio 形式格式显
示 。 重 要 的 是 要 检 查 新 的 形 式 , 以 确 保 它 是 正 确 处 理 。The Import IISiBat2 Library
2–84
Translated by CQU Team Lu

command allows the user to bring an old IISiBat2 Library into Simulation Studio. This is
similar in nature to "Import IISiBat2 Model" but imports many Proformas at once and
creates the directory structure as the library structure existed in IISiBat2. An Open dialog
box is displayed and the user is allowed to select any file with the extension (*.OBJ) that
was used for IISiBat2 Library (and Proforma) files. These files are then displayed in
the Simulation Studio Proforma format. It is important to check the new Proformas to
make sure it is processed properly.

2.8.1.10. 文件/导入 nbdm。File/Import NBDM


import nbdm 命令允许根据 cstb 定义的 nbdm(中性建筑数据模型)导入现有的 xml 文件。
它将为类型 56(多区域建筑)创建一个建筑描述,以及包含此建筑的模板项目。关于
NBDM 的更多信息可以在 HTTP:\/NBDM.ORG 中找到。The Import NBDM command
allows to import an existing XML file according to the NBDM (Neutral Building Data
Model) defined by CSTB. It will create a building description for type56 (multi zone building)
as well as a template project containing this building. More information about NBDM
can be found at http://nbdm.org

2.8.1.11. 文件/导出 nbdm。File/Export NBDM


export nbdm 命令允许将 type56 的现有建筑说明导出为 nbdm 格式。仅当当前项目包含具
有有效输入文件的类型 56 时,此菜单项才处于活动状态。b17)在其“外部文件”选项卡
中。The Export NBDM command allows exporting an existing building description for
type56 to the NBDM format. This menu item is only active if the current project contains a
type 56 with a valid input file (*.bui,*. B17) in its ‘External file’ tab.

2.8.1.12. 文件/报告。File/Report
report 命令允许用户生成汇总所有项目属性(参数、连接、使用的组件…)的报告。将显示
一个对话框来选择目标文件名,并在默认编辑器中编辑该文件。只有当项目是当前活动窗
口时,此命令才可见。The Report command allows the user to generate a report that
summarizes all projects properties (parameters, connections, components used...). A
dialog is displayed to choose the target file name, and the file is edited in the default
editor. This command is only visible if a project is the current Active Window.

2.8.1.13. 文件/打印。File/Print
print 命令使用文件\/打印设置中提供的信息打印当前活动程序集窗口的内容。当没有装配面
板时,将删除“打印”菜单项。打印机输出可以指向打印机或打印设置中确定的文件(见
图 2.8.1-5)。The Print command prints the contents of the current active Assembly
window using the information provided in File/Print Setup. The Print menu item is
removed when no Assembly panel is present. The printer output may be directed to the
printer or to a file as decided in the Print Setup (see Figure 2.8.1-5).

2–85
Translated by CQU Team Lu

图 2.8.1-5:打印对话框。Figure 2.8.1-5: Print dialog box

2.8.1.14. 文件/打印预览。File/Print Preview


打 印 命 令 预 览 允 许 在 实 际 打 印 页 面 之 前 将 其 显 示 为 在 纸 张 上 显 示 的 页 面 。 The Print
command preview allows to display a page as it would appear on paper before actually
printing it.

2.8.1.15. 文件/打印机设置。File/Printer Setup


此命令将 Simulation Studio 配置为使用用户的打印机设备进行操作。打印机设置是标准的
Windows 打印机设置框。通过从“名称”旁边的下拉菜单中选择新打印机,可以将打印机
设备更改为其他打印机。可以通过单击“属性”按钮来对打印机设置进行其他更改。This
command configures Simulation Studio to operate with the user’s printer device. The
Printer Setup is the standard Windows Printer setup box. The printer device may be
changed to another printer by selecting a new printer from the pull-down menu next to
Name. Additional changes to the printer setup can be made by clicking on the Properties
button.

2.8.1.16. 文件/导出为 HTML。File/Export as HTML


export as html 命令以适合在 Internet 上使用或导入 Microsoft Word 的 HTML 格式输出当前
形式。形式表的所有字段都包含在基于表的大型文档中。除了创建文件外,Simulation
Studio 还会启动用户的 Web 浏览器以打开该文件。此功能旨在允许用户轻松创建其组件的
打印文档,这些文档首先在 Simulation Studio 中记录。只有当组件形式是当前活动窗口时,
此命令才可见。The Export as HTML command outputs the current Proforma in HTML
format suitable for use on the Internet or for importing into Microsoft Word. All fields of
the Proforma are included in a large table-based document. In addition to creating the file,
Simulation Studio initiates the user's web browser to open the file. This feature is
intended to allow users to easily create printed documentation for their components
which are first documented in Simulation Studio. This command is only visible if a
component Proforma is the current Active Window.
2–86
Translated by CQU Team Lu

2.8.1.17. 文件/导出为…。File/Export as...


输出为…命令为当前形式化窗口创建 trnsys 类型的框架。换句话说,用户可以将所有的参
数、输入和输出信息输入到一个空白的形式表中,并保存它。当导出为…选择 command,
simulation studio 生成一个文件,其中包含 trnsys 类型的所有基本语法,包括 call 语句、参
数和输入的读入等。此时,唯一缺少的代码是将输入与输出关联起来的实际表达式。此功
能旨在使用户能够更轻松地为其组件创建程序代码,这些代码首先在 Simulation Studio 形
式表中详细说明。只有当组件形式是当前活动窗口时,此命令才可见。请注意,子菜单
FORTRAN\/C++允许用户在 FORTRAN 或 C++中生成代码。The Export as... command
creates a skeleton of a TRNSYS type for the current Proforma window. In other words,
a user could enter all the parameter, input, and output information into a blank Proforma,
and save it. When the Export as... command is selected, Simulation Studio generates
a file which contains all the basic syntax for a TRNSYS type including the Call statement,
the reading in of parameters and inputs, etc. At this point, the only missing code is the
actual equations which relate the inputs to the outputs. This feature is intended to allow
users to more easily create program code for their components which are first detailed in
a Simulation Studio Proforma. This command is only visible if a component Proforma is
the current Active Window. Note that the sub menu Fortran/C++ allow the user to generate
the code either in Fortran or in C++.

2.8.1.18. 文件/设置。File/Settings
此命令允许用户更改 Simulation Studio 和 Trnsys 配置。以下设置菜单选项卡可用:。This
command allows the user to change the Simulation Studio and TRNSYS configuration. The
following setup menu tabs are available:

2.8.1.18.1. 文件/设置/控制卡。FILE/SETTINGS/CONTROL CARDS


此窗口允许用户设置控制卡窗口的默认值,如默认数据组文件名、默认模拟时间等(见图
2.8.1-6)。在控制卡窗口中设置的每个值都可以设置默认值。使用“装配\/控制卡…”菜单
更改当前项目的设置。This window allows the user to set the default values for the Control
Cards window such as default deck filename, default simulation times, etc (see Figure
2.8.1-6). Every value set in the Control Cards window can have its default value set here.
Use the Assembly/Control Cards… menu to change the settings for the current project.

2–87
Translated by CQU Team Lu

图 2.8.1‐6:控制卡设置页签。Figure 2.8.1‐6: Control Cards Settings Tab

图 2.8.1-7:项目设置页签。Figure 2.8.1-7: Project Settings Tab

2.8.1.18.2. 文件/设置/项目。FILE/SETTINGS/PROJECT
此选项卡上的设置设置了链接(包括内部连接和不包括内部连接)的线条颜色以及选定项
目(链接或组件图标)时的颜色。此屏幕还允许用户包括其他标准层。这些图层将在当前
部件面板和将来的项目中可用。有关在 Simulation Studio 中使用层组织组件图标查看的详
2–88
Translated by CQU Team Lu

细信息,请参见“部件”面板上的章节。若要添加新层,请在“层:”框的文本框中键入
所需的名称,然后选择“添加”将其包含在层的主列表中。项目桌面的维度可以在左下角
的项目大小框中指定。应增加空间以容纳其他组件。The settings on this tab set the line
colors for links (both with and without internal connections) and the color for when an
item (link or component icon) is selected. This screen also allows the user to include
additional standard layers. These layers are then available in the current Assembly
panel as well as future projects. See the chapter on the Assembly Panel to learn more
about using Layers within Simulation Studio to organize the viewing of component icons.
To add a new Layer, type the desired name in the text box in the Layers: box, then
select "Add" to include it in the main list of layers. The dimension of the project desktop
can be specified in the Project size box in the lower left corner. It should be increased to
add room for additional components.
直接访问工具箱中图标的大小可以设置在右下角的直接访问栏的图标大小。您可能必须重
新启动 Simulation Studio 才能在 Direct Access 工具箱中激活新的图标大小。The size of
the icons in the Direct Access Toolbox can be set in the Icon size of Direct Access bar in
the lower right corner. You may have to restart Simulation Studio for the new icons sizes
to be active in the Direct Access Toolbox.
可 以 使 用 右 下 角 的 复 选 框 来 启 用 / 禁 用 项 目 或 连 接 对 话 框 。 Autoscroll can be
enabled/disabled for project or connection dialog using the check box at the bottom
right

2.8.1.18.3. 文件/设置/目录。FILE/SETTINGS/DIRECTORIES
目录选项卡允许用户选择目录和文件名,以便在 Simulation Studio 中启动和配置各种工具
(参见图 2.8.1-8)。例如,您可以通过“编辑器”项更改路径和文件名,从而选择与记事
本不同的编辑器。除了指定“记事本.exe”的编辑器之外,如果路径不是以驱动器名或“\\”
开头,则所有路径都与 TrnSysAccess 目录相对应。The Directories tab allows the user
to select directories and file names for launching and configuring various tools within
Simulation Studio (see Figure 2.8.1-8). For example, you can select a different editor than
Notepad by changing the path and filename by the “editor” entry. Except for the
editor where “ Notepad.exe ” can be specified, all path are relative to the Trnsys
installation directory if the path does not start with a drive name or a “\”.

2–89
Translated by CQU Team Lu

图 2.8.1‐8:目录设置页签。Figure 2.8.1‐8: Directories Settings Tab


trnsys 应用程序:用于运行模拟的 trnsys 模拟器(trnexe.exe),TRNSYS Application:The
TRNSYS simulator used to run simulations (TrnExe.exe),
例如.for example.
文本编辑器:在整个系统中使用的文本编辑器;如果这一行是左的。Text Editor: The text
editor used throughout the system; if this line is left
空白,将使用 MS Windows 记事本。用户可以在这里自由指定任何文本编辑器,甚至文字
处理器。blank, the MS Windows Notepad will be used. Users are free to specify any text
editor here or even a word processor.
trnedit 应用程序:trnedit 前端程序的程序文件。TRNEDIT Application: The program
file of the TRNEDIT front end program.
trnbuild 应用程序:生成版本的程序文件。TRNBUILD Application: The program file for
the building edition.
Fortran 环境:用于 Fortran 开发工具的程序文件。FORTRAN Environment: The program
file for the Fortran Development tool used and
由用户单独提供。provided separately by the user.
C++环境:用于 C++开发工具的程序文件。C++ Environment: The program file for the C++
Development tool used and
由用户单独提供。provided separately by the user.
基本图标文件夹:组件图标所在的目录;这个。Base Icon Folder: The directory in which
the component icons are located; this
允许用户在不同的组件图标集之间切换,如 din 标准图标。allows users to switch between
different sets of component icons such as the DIN standard icons
基本库文件夹:存储组件模型的目录;以及。Base Library Folder: The directory in which
the component models are stored; the
2–90
Translated by CQU Team Lu

直接访问树将使用此目录来构造其结构。direct access tree will use this directory to


construct its structure.
默认项目文件夹:默认存储新项目的目录;Default project Folder: The directory in which
new projects are stored by default;
项目可以保存在硬盘上的任何地方。projects can be saved anywhere on the hard disc.
2.8.1.18.4. 文件/设置/编译器+其他。FILE /SETTINGS /COMPILER
+OTHERS
此选项允许用户指定在选择 Simulation Studio 菜单命令 tools\/rebuild trnsys 和 tools\/execute user
命令时将运行的正确命令行语句。 This option allows users to specify the proper command
line statements that will be run when the Simulation Studio menu commands
Tools/Rebuild TRNSYS, and Tools/Execute User Command are chosen.
完整的命令行语句,包括路径名和文件扩展名,应该在这些字段中输入,如图 2.8.1-9 所示。
rebuild trnsys 命令执行名为“linker command”框中的命令行。它是用来重建 trnsys dll
(trndll.dll)的命令。有关编译 Fortran 例程和重新生成 Trnsys dll 的详细信息,请参阅“第
8 卷-程序员指南”。“用户命令”字段旨在作为从 Simulation Studio 执行任何所需程序或
批 处 理 文 件 的 便 捷 方 式 。 如 果 需 要 , 重 建 TrnSym 命 令 也 可 以 用 于 此 目 的 。 The full
command line statements, including path names and file extensions, should be entered in
these fields as shown in Figure 2.8.1-9. The Rebuild TRNSYS command executes the
command line in the box titled "Linker Command". It is intended to be the command
which will rebuild the TRNSYS DLL (TRNDll.dll). For more information on compiling
Fortran routines and rebuilding the TRNSYS DLL, refer to “Volume 8 – Programmers
Guide”. The User Command field is intended as a convenient way to execute any
desired program or batch file from Simulation Studio. If desired, the Rebuild TRNSYS
command can be used for this purpose as well.
现代集成开发环境(ide)如 intel visual fortran 或 microsoft visual studio 提供了创建、编
译和调试程序代码的高级功能。大多数用户倾向于直接在各自的开发环境中工作,确保编
译产品(dll)是在相应的 trnsys 目录中创建的(trndll.dll 的目录是.trnsys17\\exe,用户定
义组件的目录是.trnsys17\\userlib)。有关更多信息,请参阅“第 8 卷-程序员指南”。
Modern Integrated development environments (IDEs) such as Intel Visual Fortran or
Microsoft Visual Studio offer advanced functionalities to create program code, compile and
debug it. Most users prefere to work within their respective development environment
directly, making sure that the compile products (DLLs) are created in the appropriate
Trnsys directories (.\Trnsys17\Exe for TrnDll.dll, subdirectories of .\Trnsys17\Userlib for
user-defined components). Please refer to “Volume 8 – Programmers Guide” for
more information.
此选项卡还允许定义用户界面某些方面的行为:This tab also allows to define the behavior
of certain aspects of the user interface:
- 创建链接时打开连接:如果选中此复选框,则在项目窗口中创建新链接时将自动打
开连接窗口。Open connections when creating link: if this checkbox is checked, the
connection window will automatically be opened when a new link is created in the project
window
- 最大化连接窗口:如果选中此复选框,连接窗口将以全屏模式打开。Maximize
connection window: if this checkbox is checked, the connection windows will open in full
screen mode
2–91
Translated by CQU Team Lu

- 显示启动屏幕:如果选中此复选框,则每次启动软件时都会显示启动动画。Show
startup screen : if this checkbox is checked, the startup animation is shown each time the
software is started

图 2.8.1‐9:安装编译器信息框。Figure 2.8.1‐9: The Setup Compiler Information Box


2.2.1.19。文件/出口。2.8.1.19. File/Exit
exit 命令退出 Simulation Studio 程序并将用户返回到 MS Windows。如果项目在未保存的
情 况 下 被 修 改 , Simulation Studio 将 显 示 在 退 出 之 前 保 存 文 件 的 提 示 。 。 The Exit
command exits the Simulation Studio program and returns the user to MS Windows. If a
project has been modified without being saved, a prompt to save the file before exiting
will be displayed by Simulation Studio.

2.8.2. 编辑菜单&&&。The edit menu&&&


“编辑”菜单提供了用于将文本剪切、复制和粘贴到活动窗口中以及将文本粘贴到部件面
板中的图标中的命令。下面是对编辑菜单命令及其功能的描述,如图 2.8.2-1 所示。The
Edit menu provides commands for cutting, copying and pasting text into and out of active
windows and icons within the Assembly panel. The following is a description of the Edit
menu commands and their function as shown in Figure 2.8.2-1.

2–92
Translated by CQU Team Lu

图 2.8.2‐1:编辑菜单。Figure 2.8.2‐1: The Edit Menu

2.8.2.1. 编辑/撤消 ctrl+z。Edit/Undo CTRL+Z


撤消将反转在组装面板中执行的最后几个操作。在组件形式化中工作时,“撤消”按钮不处
于活动状 态。Undo will reverse the last several actions which was performed in the
Assembly Panel. The Undo Button is not active while working in a Component Proforma.

2.8.2.2. 编辑/重做 ctrl+y。Edit/Redo CTRL+Y


当用户使用“撤消”命令时,可以使用“重做”菜单项对“未完成”的操作进行“重做”。
When the user uses the "Undo" command, actions that have been "Undone" can then be
"Redone" using the "Redo" menu item.

2.8.2.3. 编辑/剪切 CTRL+X。Edit/Cut CTRL+X


剪切将从活动窗口中删除选定的文本或图标,并将其放置在存储位置(剪贴板)中,从该位
置可以使用编辑\/粘贴命令检索或恢复。文本或图标可以通过“拖动”鼠标(即在将其移动
到新位置时按住鼠标按钮)来选择(突出显示),从而在要选择的项目周围形成一个矩形。
Cut will remove selected text or an icon from the active window and place it in a storage
location (the clipboard) from which it can be retrieved or restored with the Edit/Paste
command. Text or icons may be selected (highlighted) by 'dragging' the mouse (i.e.,
holding the mouse button down while moving it to the new location) to form a rectangle
around items to be selected.

2.8.2.4. 编辑/复制 CTRL+C。Edit/Copy CTRL+C


“复制”命令使选定的文本或图标保持不变,但会将文本或图标的精确副本放入剪贴板。
若要将复制的文本或图标放置到任何其他窗口中,请激活该窗口并选择“编辑/粘贴”命令。
2–93
Translated by CQU Team Lu

The Copy command leaves the selected text or icon intact but places an exact copy of
the text or icon into the clipboard. To place the copied text or icon into any other window,
make that window active and choose the Edit/Paste command.

2.8.2.5. 编辑/粘贴 ctrl+v。Edit/Paste CTRL+V


“粘贴”命令将以前从剪贴板中选择的文本或图标插入到当前光标位置的活动窗口中。The
Paste command inserts the previously selected text or icon from the clipboard into the
active window at the current cursor position.

2.8.2.6. 编辑/删除。Edit/Delete DEL


delete 命令从窗口中删除选定的文本或图标,但不将其放入剪贴板。使用“删除”功能,无
法粘贴选定的文本或图标,因为如果选择了“剪切”或“复制”命令,则可能会粘贴这些
文本或图标。应小心,因为删除的项目无法检索。delete 命令也适用于“links”,即链接之
间 的 可 见 连 接 。 The Delete command removes the selected text or icon from the
window but does not put it into the clipboard. With the Delete feature, the selected text
or icons cannot be pasted as it could have if the Cut or Copy commands had been
chosen. Care should be taken, as the deleted items are not retrievable. The Delete
command also works on "Links", the visible connection between links.

2.8.2.7. 编辑/替换。Edit/Replace
replace 命令允许用户将部件面板上的当前零部件替换为其他零部件。用户应选择装配面板
上已存在的零部件。然后,选择“编辑/替换”将弹出一个对话框。从该对话框中,用户应
选择另一个组件。此新组件将替换现有组件。这种方法的优点是现有的链接不会被破坏,
用户不需要在组件之间重新连接那么多的链接。The Replace command allows the user
to replace a current component on the Assembly panel with another component. The
user should select a component already existing on the Assembly Panel. Then, select
Edit/Replace which will bring up a dialog. From this dialog, the user should select
another component. This new component will replace the existing component. The
advantage of this method is that existing links will not be broken and the user does not
need to re-connect as many links between components.

2.8.2.8. 编辑/更新项目。Edit/Update project


使用“更新项目”命令,用户可以使用可在访问树工具栏中访问的最新版本的组件替换部
件面板上的所有当前组件。此方法的优点是,用户只需对当前项目中的所有组件执行一次
此操作,并且不会断开现有链接,并且用户不需要在组件之间重新连接尽可能多的链接。
只有当组件的当前版本与用于创建项目的版本兼容(否则链接可能丢失)时,才可以执行
此操作。因此,用户应该在更新后检查项目。The Update project command allows the
user to replace all the current components on the Assembly panel with the latest version
of the components accessible in the Access Tree toolbar. The advantage of this method
are that the user only has to do this operation once for all of the components in the
current project, as well as existing links will not be broken and the user does not need
to re-connect as many links between components. This is only possible if the current
version of the components is compatible with the version used to create the project
(otherwise links may be lost). Therefore, the user should check the project after the update.

2–94
Translated by CQU Team Lu

2.8.2.9. 编辑/属性…。Edit/Properties...
属性…命令打开当前选定组件的“组件属性”窗口。此属性窗口如下所示,允许您将组件
图标的各个方面从文本属性修改为图标的位置和大小。The Properties... command opens
up the "Component Properties" window for the currently selected component. This
property window is shown below and allows you to modify every aspect of the
component icon from the text properties to the position and size of the icon.

图 2.8.2‐2:组件属性对话框。Figure 2.8.2‐2: Component Properties Dialog Box


2.8.3. 视图菜单。The view menu
“视图”菜单包含允许用户调整哪些工具栏、部件面板中的哪些图层以及是否应显示状态
栏的命令。以下部分描述了视图菜单命令,如图 2.8.3-1 所示。The View menu contains
commands to allow the user to adjust which toolbars, which layers in the Assembly
panel and if the status bar should be shown. The following section describes the View
menu commands as shown in Figure 2.8.3-1.

2–95
Translated by CQU Team Lu

图 2.8.3‐1:视图菜单。Figure 2.8.3‐1: View Menu


2.8.3.1. 视图/页面边界。View/Page Bounds
“页面边界”命令将显示或隐藏打印的页面边界。边界尺寸取自打印设置信息。页面边界
对于在打印装配面板之前排列组件非常重要。The Page Bounds command will display or
hide printed page boundaries. The boundary sizes are taken from the Print Setup
information. Page Bounds are important for arranging components before printing the
Assembly panel.

2.8.3.2. 视图/网格。View/Grid
Simulation Studio 有一个内置的网格,用于在部件面板中排列组件图标和链接。此命令打开
和关闭网格的可见显示。如果菜单项旁边有复选标记,则网格将打开。Simulation Studio
has a built-in grid for arranging component icons and links within the Assembly panel.
This command turns on and off the visible display of the grid. The grid is on if there is a
checkmark next to the menu item.

2.8.3.3. 查看/捕捉到网格。View/Snap to Grid


此命令打开和关闭将零部件和链接放置到栅格点的强制。如果捕捉到网格,则组件和链接只
能被放置或移动到网格上的点上。如果关闭,组件和链接可以放置在装配面板上的任何地方。
This command turns on and off the enforcement of the placement of components and
links onto the grid points. If the Snap to Grid is on, then components and links can only be
placed or moved to points on the grid. If off, components and links can be placed
anywhere on the Assembly panel.

2.8.3.4. 视图/网格属性…。View/Grid Properties...


此命令打开一个对话框,允许用户修改所有网格属性,包括网格间距和其他网格菜单项“显
2–96
Translated by CQU Team Lu

示网格”和“对齐网格”。This command opens a dialog box that allows the user to


modify all the grid properties including the grid spacing and the other grid menu items
"Show Grid" and "Snap to Grid".

2.8.3.5. 视图/缩放正常。View/Zoom Normal


组装面板可以放大或缩放。“正常缩放”菜单项将部件面板中项目的大小调整为默认大小。
The Assembly panel can be magnified, or zoomed. The Zoom Normal menu item adjusts
the size of the items in the Assembly panel to the default size.

2.8.3.6. 查看/缩放百分比。View/Zoom Percent 


缩放百分比菜单打开一个子菜单,其中有几个默认的缩放百分比值,包括 50%、75%、100%
和 200%。The Zoom Percent menu opens up a submenu with several default percentage
zoom values including 50%, 75%, 100%, and 200%.

2.8.3.7. 查看/缩放自定义。View/Zoom Custom


缩放自定义菜单打开一个小对话框,允许用户插入所需的精确放大百分比。The Zoom
Custom menu opens up a small dialog box that allows the user to insert the precise
desired magnification percentage.

2.8.3.8. 查看/缩放以适应。View/Zoom to Fit


“缩放到适合”菜单放大或缩小部件面板项,直到它们都适合可见窗口,同时保持当前比
例。The Zoom To Fit menu magnifies or shrinks the Assembly panel items until they all
fit within the visible window while maintaining the current proportions.

2.8.3.9. 查看\显示层。View/Show Layers 


此命令允许用户选择当前显示的组件层。每个组件属于一个或多个层,并且仅在显示其中一
个层时才显示。要使用此菜单项,请从子菜单中选择“图层”。如果图层的名称有复选标记,
则显示该图层。可以同时关闭或打开所有图层。在有关装配面板的章节中有更多关于图层的
讨论。This command allows the user to select which component layers are currently
displayed. Each component belongs to one or several layer(s) and is only displayed if
one of these layers is being displayed. To use this menu item, select layers from the
submenu. If the layer has a checkmark by the name, then it is being displayed. It is
possible to turn off or on all the layers at once. There is more discussion about layers
in the section concerning the Assembly Panel.

2.8.3.10. 视图/工具栏。View/Toolbars
工具栏命令将显示或隐藏与不同窗口相关联的工具栏,并可以快速访问下拉菜单上可用的
相同命令。选择的值将被保存以供下次使用 Simulation Studio。The Toolbars command
will display or hide toolbars which are associated with different windows and can access
quickly the same commands as are available on the pull down menu. The values chosen
will be saved for the next use of Simulation Studio.

2.8.3.11. 视图/状态栏。View/Status Bar


此命令控制窗口底部的状态栏是否显示。This command controls if the status bar at the
2–97
Translated by CQU Team Lu

bottom of the window is shown or not shown.

2.8.4. 直接访问菜单。Direct Access Menu


直接访问菜单允许用户快速轻松地检索 Trnsys 组件模型并将其放置在装配面板上。若要使
用此工具,用户必须单击“直接访问”菜单“插入模型”。出现一个对话框,显示现有的
组件文件夹,如图 2.8.4-1 所示。The Direct Access menu allows users to quickly and
easily retrieve TRNSYS component models and place them on the Assembly panel. To
use this tool, a user must click on the Direct Access menu\Insert Model. A dialog
appears showing the existing component folder, which is similar to Figure 2.8.4-1.

图 2.8.4‐1:直接访问工具。Figure 2.8.4‐1: Direct Access Tool


选择模型后,对话框将消失,光标将变为加号(+)。将光标移动到“装配面板”窗口中应
放置零部件模型的位置,然后单击。组件模型将出现在装配面板上。After selecting a
model, the dialog will disappear and the cursor will change to a plus sign (+). Move the
cursor to the point on the Assembly Panel window where the component model should
be placed and click. The component model will appear on the Assembly Panel.
直接访问菜单\\刷新树刷新主窗口右侧的直接访问树。每次将新组件添加到库目录时,用户
都应使用此菜单。单击此菜单后,树将显示新组件。The Direct Access Menu\Refresh
Tree refreshes the Direct Access Tree on the right of the main window. User should
use this menu each time a new component is added to the library directory. Once this
menu is clicked, the tree will display the new component.

2.8.5. 装配菜单。Assembly Menu


程序集主菜单提供对在程序集面板及其对话框窗口中使用的命令的访问。一般来说,这包
括使用组件、生成和分解宏以及访问通用控制卡(见图 2.8.5-1)。The Assembly main
2–98
Translated by CQU Team Lu

menu provides access to commands used within the Assembly Panel and its dialog
windows. In general, this includes working with components, making and exploding
macros and accessing the general control cards (see Figure 2.8.5-1).

图 2.8.5‐1:装配菜单。Figure 2.8.5‐1: Assembly Menu


2.8.5.1. 装配/插入新公式。Assembly/Insert New Equation
由于公式是如此普遍使用,并不是一个真正的组成部分,公式被添加到装配面板使用他们自
己的菜单项。菜单项会在部件面板上放置一个公式图标。然后用户可以双击这个图标来创建
新的方程式。一旦创建了新的方程,其他组件就可以链接到方程组的输入和输出。有关向模
拟中添加公式的详细信息,请参见本手册中的“公式”部分。Because equations are so
commonly used and are not really a component, equations are added to the assembly
panel using their own menu item. The menu item places an equation icon on the
assembly panel. The user can then double-click on this icon to create new equations.
Once new equations are create, other components can be linked to the inputs and
outputs of the equation component. See the Equation section in this manual for more
information about adding Equations to the simulation.

2.8.5.2. 装配/链接模式。Assembly/ Link Mode


此命令用于在两个组件之间创建输出到输入连接的过程中。用户可以点击这个工具,将光标
切换到链接模式。然后,当用户单击一个组件,然后单击第二个组件时,在这两个组件之间
创建一个链接。用户也可以使用鼠标右键菜单项“开始链接”来创建链接,点击组件面板中
的 现 有 组 件 。 This command is used in the process of creating output to input
connections between two components. The user can click on this tool which will switch
the cursor to Link Mode. Then, when the user clicks on a component and then on a
second component, a link is created between these two components. The user can also
create links using the right mouse menu item “Start Link” when clicking on an existing
2–99
Translated by CQU Team Lu

component in the assembly panel.

2.8.5.3. 程序集/添加删除跟踪。Assembly/Add-Remove Trace


此命令将 trnsys 跟踪功能添加到当前选定的所有组件。此外,图标附近会出现一个小脚符号,
表示此组件的跟踪已打开。要关闭组件的跟踪:选择组件并单击此命令将关闭跟踪功能。跟
踪设置包含在“控制卡”窗口中。This command adds the TRNSYS Trace feature to all
currently selected components. In addition, a small feet symbol appears near the icon to
show that Trace is turned on for this component. To turn off the trace for a component:
Select the component and click this command which will toggle off the Trace feature.
Settings for Trace are contained in the Control Cards window.

2.8.5.4. 装配/开锁。Assembly/Lock-Unlock
“装配\/锁定解锁”菜单命令允许项目的创建者锁定“装配”面板中的某些零部件。无法删
除或修改这些锁定的组件。当整个组件被锁定时,所有内部参数和输入都被锁定。这意味
着 , 如 果 trnedit 命 令 被 写 入 trnsys 输 入 文 件 , 则 不 会 包 含 在 此 组 件 中 。 The
Assembly/Lock-Unlock menu command allows the creator of a project to lock certain
components in the assembly panel. These locked components cannot be erased nor
modified. When the entire component is locked, then all parameters and inputs
internally are locked. This means that, if TRNEDIT commands are being written to the
TRNSYS input file, they will not be included for this component.

2.8.5.5. 程序集/形式…。Assembly/ Proforma...


proforma 命令打开包含组件的常规 proforma 的窗口。通用形式表包含有关模型的信息,并
允许用户访问组件的源代码。有关更多信息,请参阅形式表手册部分。The Proforma
command opens up the window that contains the general Proforma for the component.
The general Proforma contains information about the model and allows the user to
access the source code of the component. See the manual section on Proformas for more
information.

2.8.5.6. 程序集/变量…。Assembly/ Variables...


variables 命令打开包含组件的参数、输入、输出、派生、特殊卡、外部文件和注释的窗口。
用户将首先选择感兴趣的组件,然后单击此菜单命令打开窗口。The Variables command
opens up the window that contains the parameters, inputs, outputs, derivatives, Special
Cards, External Files and comments for a component. The user will first select the
component of interest and then click on this menu command to open the window.

2.8.5.7. 汇编/打开宏。Assembly/ Open Macro


此命令允许用户访问已包含在宏组件中的多个组件。为此,用户应选择宏组件。然后,单击
此菜单命令或双击宏模型。宏将在一个新的装配面板中打开,以便组件可以被修改。This
command allows the user to access several components that are already contained in
a macro component. To do this, the user should select a macro component. Then, click
on this menu command or double-click on the macro model. The macro will open in a new
assembly panel so that the components can be modified.

2.8.5.8. 汇编/关闭宏。Assembly/ Close Macro


2–100
Translated by CQU Team Lu

此命令关闭当前显示宏组件内容的部件面板。This command closes the assembly panel


that is currently displaying the contents of a macro component.

2.8.5.9. 汇编/创建宏。Assembly/ Create Macro


此命令允许用户将多个组件收集到宏组件中。为此,用户应在按住 shift 键的同时单击每个
组件来选择几个组件。然后,单击此菜单命令。选定的组件将被压缩为一个宏项,并突出显
示 名 称 , 供 用 户 输 入 名 称 文 本 。 This command allows the user to collect several
components into a macro component. To do this, the user should select several
components by clicking on each component while holding the SHIFT key down. Then,
click on this menu command. The selected components will be compressed into a single
Macro item with the name highlighted for the user to enter the text of the name.

2.8.5.10. 汇编/分解宏。Assembly/Explode Macro


此命令用此宏中包含的组件替换现有宏。用户应首先在“装配”面板上选择宏,然后单击此
命令。This command replaces an existing macro with the components contained inside
this macro. The user should first select a macro on the Assembly panel and then click on
this command.

2.8.5.11. 程序集/保存宏…。Assembly/Save Macro...


此命令保存宏组件,以便可以在将来的项目中使用。通常,最好将此宏组件保存在基本库文
件夹目录树中,以便宏模型在直接访问工具中可用。。This command saves a macro
component so that it can be used in future projects. It is generally a good idea to save
this macro component within the Base Library Folder directory tree so that the macro
model is available within the Direct Access tool.

2.8.5.12. 装配/输出管理器。Assembly/Output Manager


此命令打开“输出管理器”对话框(见图 2.8.5-2),允许用户管理到文件和绘图仪的所有
输出。在左侧,所有项目组件都显示在树中。在右侧,将显示所有项目打印机和绘图仪。
This command opens the Output Manager dialog (see Figure 2.8.5-2), which allows the
user to manage all outputs to files and plotters. On the left, all project components are
displayed in a tree. On the right, all project printer and plotter are displayed.
单击组件节点将显示其输出变量,并在打印机或绘图仪上显示其输入变量。。Clicking on a
component node will display its output variables and on a printer or plotter its input
variables.
显示的属性和可用按钮将根据选择的输出组件类型进行更新。。Displayed properties and
available buttons are updated depending on which type of output component is selected.
2.8.5.12.1. 连接按钮。CONNECT BUTTON
选择有效的输出和输入后,单击对话框中间的此按钮( )将在两个组件之间添加一个新
的连接(因此将更新装配面板)。Just after selecting a valid output and input, clicking on
this button ( ) in the middle of the dialog will add a new connection between the two
components (the assembly panel will be updated in consequence).
2.8.5.12.2. 删除连接按钮。REMOVE CONNECTION BUTTON

2–101
Translated by CQU Team Lu

选择有效的输出和输入连接变量后,单击此按钮( )可删除现有连接。。Removing an
existing connection is available by clicking on this button ( ) after selecting a valid output
and input connected variables.
2.8.5.12.3. 添加绘图仪\/打印机按钮。ADD PLOTTER /PRINTER BUTTON

打印机和绘图仪可以通过点击添加打印机( )或添加绘图仪按钮( )来添加。。


Printers and plotters can be added by clicking the Add Printer ( ) or Add Plotter button

( ).

2.8.5.12.4. 打 印 机 和 绘 图 仪 属 性 。 PRINTERS AND PLOTTERS


PROPERTIES
打印机和绘图仪的属性可以在对话框的右边进行修改:Properties of printers and plotters
can be modified on the right of the dialog:
 绘 图 仪 属 性 : 单 位 名 称 、 图 形 标 题 、 左 轴 属 性 、 右 轴 属 性 和 绘 图 数 。 plotter
properties: unit name, graph title, left axis properties, right axis properties and number of
plots.
 打印机属性:单位名称、文件名、打印间隔和输入变量数。printer properties: unit
name, file name, print interval and number of input variables.
2.8.5.12.5. 添加变量按钮。ADD VARIABLE BUTTON

左或右轴变量可以通过添加左变量( )和添加右变量按钮( )来添加。通过单击


“添加打印机变量”按钮,可以向打印机添加变量。Left or right axis variables can be
added using the Add Left Variable ( ) and Add Right Variable button ( ). Adding a
( ).
variable to the printer is allowed by clicking on the Add Printer Variable button

2–102
Translated by CQU Team Lu

图 2.8.5‐2:输出管理器对话框。Figure 2.8.5‐2: Output manager dialog


2.8.5.13. 装配/控制卡…。Assembly/Control Cards...
“控制卡”命令打开“控制卡”窗口(见图 2.8.5-3),其中包含模拟的开始和停止时间、
公差值和组件排序方法等项。有关控制卡的更多信息,请参阅第 8.1 章中的文件\/设置说
明。。The Control Cards command opens up the Control Cards window (see Figure
2.8.5-3) which contains such items as the start and stop time of the simulation, the
tolerance values, and the method for ordering the components. See the description of
File/Settings… in chapter 8.1 for more information concerning the control cards.

2–103
Translated by CQU Team Lu

图 2.8.5‐3:控制卡窗口。Figure 2.8.5‐3: Control Cards Window


2.8.5.14. 程序集/图表图像…。Assembly/Diagram Image...
此命令允许用户修改与活动项目文件关联的图标。图标位图将在 Microsoft Paint 中打开,就
像 打 开 组 件 图 标 一 样 。 This command allows the user to modify the icon which is
associated with the active project file. The icon bitmap will be opened in Microsoft Paint
just as a component icon would be opened.

2.8.5.15. 程序集/添加文本…。Assembly/Add Text...


此命令将文本添加到部件面板中,允许用户对项目进行注释。这对于查看和打印项目非常有
用。要使用此选项,请单击“添加文本”命令,然后单击“部件”面板。这将添加一个用户
可以键入文本的框。此文本字符串将添加到当前显示的每个层。This command adds text to
the Assembly panel allowing the user to make comments to the project. This is useful for
viewing and when printing projects. To use this option, click the Add Text command and
then click on the Assembly Panel. This adds a box into which the user can type text.
This text string will be added to every layer that is currently being displayed.
2.8.5.16. 在电子表格中组装/打开。Assembly/Open in Spreadsheet
此命令允许用户自动将 25 或 65 型输出文件的输出直接加载到扩展程序中,以便于图形查看。
只需选择与输出文件关联的图标,然后单击此命令。传播程序将启动并打开此文件。This
command allows the user to automatically load the output of a Type 25 or Type 65 output
file directly into the Spread program for easy graphical viewing. Simply select the icon
which is associated with an output file and then click on this command. The Spread
program will start up and open this file.
2–104
Translated by CQU Team Lu

2.8.5.17. 组装/发送到层。Assembly/Send To Layer 


一个组件可以同时属于多个层。此命令允许用户将组件移动到当前所在的新层。若要使用此
菜单项,请选择一个或多个应添加到另一层的组件。然后,单击此菜单项并从旁边显示的子
菜单中选择图层名。组件将添加一个新层,链接将相应地移动或拉伸。注意,可以在文件/
设置菜单中定义附加的层。在有关装配面板的章节中有更多关于图层的讨论。A component
can belong to several layers at the same time. This command allows the user to move
components to a new layer than it currently resides on. To use this menu item, select
one or more components which should be added another layer. Then, click this menu
item and select a layer name from the submenu which appears on the side. The
components will be added a new layer and links will be moved or stretched accordingly.
Note that additional layers can be defined in the File/Settings menu. There is more
discussion about layers in the section concerning the Assembly Panel.

2.8.5.18. 程序集/连接…。Assembly/Connections...
此命令将打开当前选定的链接,就像双击它一样。This command opens the currently
selected link as if it had been double-clicked.

2.8.5.19. 程序集/长变量名。Assembly/Long Variable Names


此命令修改变量名在宏中的显示方式。若要更改此设置,请在当前部件面板中打开宏模型的
某个变量选项卡。然后,选中\/取消选中此菜单项以修改变量名的视图。This command
modifies the way that Variable names are displayed in Macros. To change this, open one
of the Variable tabs for a Macro model in the current assembly panel. Then,
check/uncheck this menu item to modify the view of the variable names.

2.8.6. “计算”菜单。Calculate Menu


calculate 菜单提供运行 trnsys 模拟的选项。如图 2.8.6-1 所示,计算菜单命令在本节中进行
了说明。The Calculate menu offers choices for running the TRNSYS simulation. The
Calculate menu commands, as shown in Figure 2.8.6-1, are described in this section.

2–105
Translated by CQU Team Lu

图 2.8.6‐1:计算菜单。Figure 2.8.6‐1: The Calculate Menu


2.8.6.1. 计算/创建输入文件。Calculate/Create Input File
create input file 命令 创 建 trnsys 输 入 文 件 , 但 不 启 动 模 拟 。The Create Input File
command creates the TRNSYS input file but does not start the simulation.
除非装配面板在前面,否则将禁用“创建输入文件”命令。The Create input file command
is disabled unless the Assembly panel is in the front.

2.8.6.2. 计算/运行模拟。Calculate/Run Simulation


run simulation 命令使用文件\/设置菜单中存储的设置调用 trnsys 仿真程序。除非部件面板
是活动窗口,否则“运行仿真”命令将被禁用。也可以使用 f8 键执行此命令。计算完成后,
trnsys 会告诉用户计算已经完成,并询问用户是否要退出程序。单击“是”将用户返回到
Simulation Studio 程序,在该程序中可以查看输出并打印结果等。The Run Simulation
command calls the TRNSYS simulation program with the settings that have been stored
in the File/Settings menu. The Run Simulation command is disabled unless the
Assembly Panel is the active Window. This command may also be executed using the
F8 key. Upon completion of the calculations, TRNSYS will tell the user the calculations
are complete and ask if he would like to exit the program. Clicking “Yes” will return
the user to the Simulation Studio program where the output may be viewed and results
plotted, etc.
2.8.6.3. 参数研究。Parametric Study
此命令打开“参数化研究”窗口。This command opens the Parametric Study window.

2–106
Translated by CQU Team Lu

图 2.8.6‐2:参数化研究窗口。Figure 2.8.6‐2: The Parametric Study Window


2.8.6.4. 计算/打开。Calculate/Open 
此命令允许用户轻松访问与当前项目关联的文本文件。This command allows the user to
easily access text files associated with the current project.
计算/打开/输入文件。Calculate/Open/Input File

input file 命令在 editor1 中打开 trnsys 输入文件。输入文件的文件名也显示在菜单中。显示


的输入文件将是从激活的部件面板项目生成的文件。The Input File command opens the
TRNSYS input file in the editor1. The file name of the Input file is shown in the menu
as well. The input file shown will be the one which is generated from the active
Assembly panel project.
计算/打开/列出文件。Calculate/Open/List File

list file 命令在编辑器 1 中打开 trnsys 列表文件。列表文件的文件名也显示在菜单中。显示


的 列 表 文 件 将 是 通 过 在 激 活 的 部 件 面 板 项 目 中 运 行 仿 真 生成 的 文 件 。 。 The List File
command opens the TRNSYS list file in the editor1. The file name of the List file is shown
in the menu as well. The list file shown will be the one which is generated by running the
simulation in the active Assembly panel project.
计算/打开/外部文件。Calculate/Open/External Files

external files 命令用于打开与当前 trnsys 项目关联的任何其他文件。Simulation Studio 搜


索项目中的组件,查看它们是否有任何关联文件(如数据文件或输出文件)。这些文件的
列表 显示 在外 部文 件的 子菜 单中 。用 户可 以选 择将 在编 辑器 中打 开的 这些 文件 。The
External files command is used to open any of the other files associated with the current
TRNSYS project. Simulation Studio searches the components in the project to see if they
have any associated files (such as data files or output files). A list of these files is shown in
the submenu to External Files. The user can select these files which will be opened in the
2–107
Translated by CQU Team Lu

editor.
1 默认情况下,文本编辑器是 Microsoft 记事本。用户可以将此更改为他们所选择的编辑器,
例如 Win Meunt。要执行此操作,请单击“文件\/设置\/目录”菜单项并更改“编辑器”的路
径和文件名。1 The text editor is, by default, Microsoft Notepad. The user can change this to
the editor of their choice, such as WinCommander. To do this, click on
File/Settings/Directories menu item and change the path and file name for “editor”.

2.8.7. 工具菜单。Tools menu


“工具”菜单提供各种 trnsys 实用程序的选项。如图 2.8.7-1 所示,工具菜单命令在本节中
进行了说明。The Tools menu provides choices for various TRNSYS utility programs. The
Tools menu commands, as shown in Figure 2.8.7-1, are described in this section.

图 2.8.7‐1:工具菜单。Figure 2.8.7‐1: The Tools Menu


2.8.7.1. 工具/文本编辑器。Tools/Text Editor
该命令启动用户指定的文本编辑程序,可用于编辑输出文件等。This command initiates a
user-designated text editing program which can be used to edit output files, etc.

2.8.7.2. 工具/单元字典。Tools/Unit Dictionary


此命令允许用户查看和修改单元字典中的项。单位字典包含所有不同的维度(如长度)和单
位(如米)。用户可以创建新的维度或新单位或改变现有的维度和单位。本手册后面将详细
介绍单元字典。This command allows the user to view and modify items in the Unit
Dictionary. The Unit Dictionary contains all the different dimensions (such as length)
and units (such as meters). The user can create new dimensions or new units or change
existing dimensions and units. The Unit Dictionary is described in detail later in this manual.

2–108
Translated by CQU Team Lu

2.8.7.3. 工具/TrnBuild。Tools/TRNBuild
此命令启动 trnbuild 程序,用于类型 56(多区域建筑模型)。有关程序的详细信息,请参阅
trnbuild 手册。为便于使用,在调用此程序之前,应将“文件\/设置\/目录”菜单中的 trnbuild
目录更改为 building\\trnbuild.exe。This command initiates the TRNBuild program for use
with Type 56, the multi-zone building model. Refer to the TRNBuild manual for details
about the program. For ease of use, the TRNBuild directory in the File/Setup/Directories
menu should be changed to Building\TRNBuild.exe before calling this program.

2.8.7.4. 工具/试验。Tools/TRNEdit
此命令调用 trnedit 程序,这是一个实用程序,用于以修改后的外观显示 trnsys 输入文件。
trnedit 用于与非 trnsys 用户共享 trnsys 仿真,以允许他们进行有限的仿真。请参阅 trnedit
手册了解更多详细信息。This command calls the TRNEdit program, a utility program for
displaying TRNSYS input files with a modified look. TRNEdit is used for sharing
TRNSYS simulations with non-TRNSYS users to allow them to do limited simulations.
Please see the TRNEdit manual for more details.

2.8.7.5. 工具/Fortran 环境。Tools/Fortran Environment


这个命 令 调用 FORTRAN 编译器程 序 ,它可以 是任何 FORTRAN 编译器 程 序。例如
Compaq Visual Fortran 6 。 默 认 值 为 “ \\Program Files\\Microsoft Visual
Studio\\Common\\msdev98\\bin\\dfdev.exe”,这是 Compaq Visual Fortran 的默认位置。
This command calls the Fortran Compiler program which can be any Fortran compiler
program. Examples would be Compaq Visual Fortran 6. The default value is
"\Program Files\Microsoft Visual Studio\Common\MSDEV98\BIN\DFDEV.EXE"" which is
the default location for the Compaq Visual Fortran.

2.8.7.6. 工具\/C++环境。Tools/C++ Environment


这个命令调用 C++编译器程序,它可以是任何 C++编译器程序。例如 visual studio 7.0。默
认值为“\\Program Files\\Microsoft Visual Studio \\Common \\msdev98 \\bin \\ dfdev.exe”,
这是 Visual Studio 7.0 的默认位置。This command calls the C++ Compiler program
which can be any C++ compiler program. Examples would be Visual Studio 7.0. The
default value is "\Program Files\Microsoft Visual
Studio\Common\MSDEV98\BIN\DFDEV.EXE"" which is the default location for the Visual
Studio 7.0.

2.8.7.7. 工具/重建 trnsys。Tools/Rebuild TRNSYS


此命令允许用户创建新的 trnsys dll。rebuild trnsys 命令执行命令行语句,该语句在文件/设
置/编译器设置中作为 rebuild 命令输入。This command allows the user to create a new
TRNSYS DLL. The Rebuild TRNSYS command executes the command line statement
which has been entered as a Rebuild command in the File/Settings/Compiler setting.

2.8.7.8. 工具/执行用户命令。Tools/Execute User Command


此命令允许用户从程序中执行任何合法的命令行语句。所需的命令应输入文件\/设置\/编译器
输 入 框 , 包 括 路 径 名 和 文 件 扩 展 名 。 This command allows the user to execute any
2–109
Translated by CQU Team Lu

legitimate command line statement from the program. The desired command should be
entered into the File/Settings/Compiler input box including path names and file extensions.

2.8.8. 窗口菜单。Windows menu


“窗口”菜单包含用于操作和打开 Simulation Studio 中现有的各种窗口的命令。下一节介
绍 Windows 菜单命令,如图 2.8.8-1 所示。The Windows menu contains commands for
manipulating and opening various windows existing in Simulation Studio. The following
section describes the Windows menu commands as shown in Figure 2.8.8-1.

图 2.8.8‐1:windows 菜单。Figure 2.8.8‐1: Windows menu


2.8.8.1. 窗口/层叠。Windows/Cascade
级联选项将堆叠所有打开的文件,以便用户可以看到每个文件的标题栏。The Cascade
option will stack all open files so that a user can see the title bar of each file.

2.8.8.2. 窗口/瓦片。Windows/Tile
tile 命令将以每个文件占用窗口环境一部分的格式显示所有打开的文件。The Tile command
will display all open files in a format where every file takes up a portion of the window
environment.

2.8.8.3. 窗口/排列图标。Windows/Arrange Icons


在 Simulation Studio 中最小化窗口时,它们将出现在屏幕底部。此命令按良好的顺序排列
最小化的窗口图标。When windows are minimized in Simulation Studio, they appear
across the bottom of the screen. This command arranges the minimized window icons in
a nice order.

2–110
Translated by CQU Team Lu

2.8.8.4. 窗口/关闭所有窗口。Windows/Close All Windows


此命令关闭主窗口中所有打开的窗口。如果有未保存的文件,Simulation Studio 将在关闭之
前询问是否应保存这些文件。This command closes all open windows within the main
window. If there are unsaved files, Simulation Studio will ask if they should be saved
before they are closed.

2.8.8.5. 窗口/最近使用的文件列表。Windows/List of Recent Files


此菜单底部包含最近活动窗口的列表。这些窗口中的任何一个都可以用这个菜单重新打开。。
A list of recently active windows is contained at the bottom of this menu. Any of these
windows can be reopened with this menu.

2.8.9. 帮助菜单。Help Menu


“帮助”菜单提供对特殊帮助窗口中的联机帮助以及更新系统的访问。帮助系统提供有关
Simulation Studio 和 Trnsys 程序的许多方面的信息。以下部分描述了帮助菜单中的命令,
如图 2.8.9-1 所示。The Help menu provides access to on-line help in a special help
window as well as the update system. The help system provides information on many
aspects of the Simulation Studio and TRNSYS programs. The following section describes
the commands in the Help menu as shown in Figure 2.8.9-1.

2.8.9.1. ?/帮助。?/Help
图 2.8.9-1:帮助菜单。Figure 2.8.9-1: The Help Menu
此命令显示 trnsys simulation studio 的 pdf 文档的索引。PDF 文档将在 Acrobat Reader 应
用程序中单独打开。您可以通过单击内容表导航到文档中。要在帮助主题中前后移动,请单
击底部的可用按钮。此文件包含包中的所有其他帮助文件。每个文件都可以从此索引文件访

2–111
Translated by CQU Team Lu

问。This command shows the index of the PDF documentation of TRNSYS Simulation
Studio. The PDF document will open separately in your Acrobat Reader application. You
can navigate in the document by clicking in the Table of content. To move forward or
backward through the help topics, click on the available buttons at the bottom. This
file contains all other help files from the package. Each file is accessible from this
index file.

2.8.9.2. ?/检查更新。?/Check for updates


此命令将根据可供下载的最新版本检查当前安装的软件版本。如果有新版本,建议您从
Internet 下载。This command will check the currently installed version of the software
against the latest version available for download. If a newer version is available, it
proposes you to download it from the Internet.
安装后第二次启动 Simulation Studio 时,更新系统会询问您是否要自动检查更新。如果选
择此选项,则无需使用此菜单,因为检查将每天自动完成一次。When starting simulation
Studio for the second time after installation, the update system ask you if you would like
to check for updates automatically. If you choose this option, it is not necessary to use
this menu, as the check will be done automatically once a day.

2.8.9.3. 关于…。About...
此命令显示 Simulation Studio 的“关于”屏幕(图 2.8.9-2)。这包含有关 Simulation
Studio 的信息、版本号以及此 Simulation Studio 副本的注册用户。只有此屏幕上显示的人
员或组才允许使用 Simulation Studio。其他用户正在使用 Simulation Studio 的盗版。This
command shows the About screen for Simulation Studio (Figure 2.8.9-2). This contains
information about Simulation Studio, the version number and who the registered user is
for this copy of Simulation Studio. Only the person or group indicated on this screen is
allowed to use Simulation Studio. Any other users are using a pirated copy of Simulation
Studio.

2–112
Translated by CQU Team Lu

图 2.8.9‐2:Simulation Studio 关 于 窗 口 。 Figure 2.8.9‐2: Simulation Studio About


Window
这结束了关于主菜单的部分。以下各节详细介绍了 Simulation Studio 程序的各个方面。This
ends the section about the main menus. Following are individual sections giving more
detail on various aspects of the Simulation Studio program.

2.9. 单位字典。Unit dictionary


单元字典窗口(如图 2.89-1 所示)是用户可以获取和指定仿真工作室程序的单元和维度信
息的地方。通过单击 Simulation Studio 主窗口中的“工具\/单元字典”菜单项可以访问单元
字典。UnitDictionary 窗口由一个“Dimensions”列表框和位于窗口右侧的几个按钮组成。
“尺寸”列表框包含当前包含在单位字典中的尺寸和基本单位。“尺寸”列表框包含当前
嵌入在单位字典程序中的尺寸的名称以及它们的默认国际单位。为了使对单元字典所做的
任 何 更 改 生 效 , 不 必 重 新 启 动 Simulation Studio 程 序 。 The Unit Dictionary window
(shown in Figure 2.8.9-1) is where users can obtain and specify unit and dimension
information for the Simulation Studio program. The Unit Dictionary is accessed by clicking
on Tools/Unit Dictionary menu item in the Main Simulation Studio window. The Unit
Dictionary window is composed of a "Dimensions" list box, and a few buttons located
on the right side of the window. The "Dimensions" list box contains the dimensions and
base units that are currently contained in the unit dictionary. The "Dimensions" list box
contains the names of the dimensions currently embedded in the Unit Dictionary
program as well as their default SI unit. The Simulation Studio program will NOT have to
be restarted in order for any changes made to the unit dictionary to take effect.
2–113
Translated by CQU Team Lu

用户字典的菜单将启动单元字典程序中包含的各种应用程序。下面是单元字典函数的详细
描述。The menus of the User Dictionary will launch various applications contained in
the unit dictionary program. A detailed description of the unit dictionary functions follows.

图 2.8.9-1:单位字典窗口。Figure 2.8.9-1: Unit Dictionary Window

2–114
Translated by CQU Team Lu

图 2.8.9‐2:维度属性窗口。Figure 2.8.9‐2: Dimension properties Window


通过选择其中一个维度并单击“编辑”,将显示“维度定义”窗口。此窗口允许用户修改维
度名称、修改维度符号、以基本单位描述维度、添加\/修改\/删除此维度的等效单位以及描
述维度。选择一个等效的单位,然后单击“编辑…”按钮,将弹出“单位定义”窗口,该窗
口将在下一节中介绍。“单位定义”窗口允许用户修改单位名称、修改单位符号、提供用于
将单位转换为默认国际单位的乘法和加法因子以及描述单位。By selecting one of the
dimensions and clicking edit, the Dimension Definition window will appear. This window
allows the user to modify the name of the dimension, to modify the symbol of the
dimension, to describe the dimension in base units, to add /modify /delete equivalent
units for this dimension, and to describe the dimension. Selecting one of the equivalent
units and clicking the Edit… button will bring up the Unit Definition window which is
described in the next section. The Unit Definition window allows the user to modify the
name of the unit, to modify the symbol of the unit, to supply multiplication and addition
factors used to convert the unit to the default SI unit, and to describe the unit.

2–115
Translated by CQU Team Lu

图 2.8.9-3:单元定义窗口。Figure 2.8.9-3: Unit Definition Window

2.9.1. 创建新维度。Creating a New Dimension


主单元字典窗口中的 Add 按钮打开 Dimensions 窗口(图 2.8.9-2)。然后用户可以按自己
的意愿编辑这个新的维度,当用户点击 OK 按钮离开窗口时,它将自动添加到主窗口。The
Add button in the main Unit Dictionary window opens the Dimensions window (Figure
2.8.9-2). The user can then edit this new dimension as they wish and it will be
automatically added to the main window when the user clicks the OK button to leave the
window.

2.9.2. 创建新单元。Creating a New Unit


“尺寸”窗口中的“添加”按钮打开“单位”窗口(图 2.8.9-3)。用户可以根据需要编辑
这个新单元,当用户单击 OK 按钮离开窗口时,它将自动添加到维度定义窗口中。The
button Add in the Dimensions window opens the Units window (Figure 2.8.9-3). The user
can then edit this new unit as they wish and it will be automatically added to the
Dimension definition window when the user clicks the OK button to leave the window.

2.9.3. 删除尺寸或单位。To Delete a dimension or Unit


用户很容易删除单位字典中的维度或单位。要删除单位或维度,请单击要删除的单位或维度
的名称以将其选中。然后,单击列表框旁边的“删除”按钮。将出现一个确认消息,提示用
户是删除单位还是维度(是)还是取消操作(否)。无法删除基本单位或尺寸。对于
Simulation Studio,基本单位和尺寸假定为:It is easy for the user to delete a dimension
or unit in the unit dictionary. To delete a unit or dimension, click once on the name of the
unit or dimension to be erased to select it. Then, click the Delete button which is next to
the list box. A confirmation will appear prompting the user whether to delete the unit or
dimension (Yes) or to cancel the operation (No). It is not possible to delete the base units
or dimensions. For Simulation Studio purposes, the base units and dimensions are
assumed to be:
2–116
Translated by CQU Team Lu

 温度 K。Temperature K
 质量公斤。Mass kg
 原子量摩尔。Atomic Weight mol
 长度 m。Length m
 时间 S。Time s
 照明 CD。Illumination cd
 电流 A。Electric Current A
如果用户可以删除任何基本单位和\/或维度,则将不再可能使用某些现有单位和维度,或向
单位字典程序添加单位和维度。因此,这是不允许的。If a user could delete any of the
base units and/or dimensions, it would no longer be possible to use some of the existing
units and dimensions, or add units and dimensions to the unit dictionary program.
Therefore, this is not allowed.

2.9.4. 单位字典示例。Unit Dictionary Example


假设压力之前没有添加到单位字典中,并且用户希望创建一个需要以千帕(kpa)为单位的
压力规范的模型。将压力尺寸和千帕单位添加到单位字典中所需的步骤如下所述。Suppose
Pressure had not been previously added to the unit dictionary and a user wished to
create a model that required the specification of the pressure in kiloPascals (kPa). The
steps required to add the pressure dimension and the kPa unit to the unit dictionary are
described below.
1) 单击 Simulation Studio 主窗口中的“工具/单元字典”菜单项,启动单元字典应用程
序。Launch the Unit Dictionary application by clicking on the Tools/Unit Dictionary
menu item in the main Simulation Studio window.
2) 用鼠标单击“单位词典”窗口中的“添加”按钮。将打开一个空白尺寸窗口。Click
with the mouse on the Add button in the Unit Dictionary window. A blank Dimension
window will open up.
3) 例如,填写名称“压力”和新尺寸的说明;“压力是单位面积上的力的量度”。Fill
in the name, "Pressure", and a description of the new dimension; "Pressure is a measure
of the force per unit area", for example.
4) 填写压力单位的标准国际单位制符号。在这种情况下,压力的标准单位是帕斯卡,
通常表示为“帕”。注:千帕(kpa)不是标准国际单位制压力单位的可接受选择,因为
kpa 是 pa 的直接倍数。Fill in the standard SI symbol for the unit of pressure. In this case,
the standard unit for pressure is the Pascal which is commonly shown as "Pa". Note:
kiloPascals (kPa) would not be an acceptable choice for the standard SI pressure unit
since kPa is a direct multiple of Pa.
5) 将帕斯卡转换为基本单位:Convert Pascals to base units:

6) 帕斯卡=牛顿\/平方米。Pascal = Newton/square meter

=千克米\/平方秒平方米。= kilogram.meter/square second.square meter

=千克\/平方秒\/米。= kilogram/square second/meter.

2–117
Translated by CQU Team Lu

7) 在这种情况下,将在“以基本单位”输入框中添加以下文本:“kg\/m\/s\/s”。In
this case the following text would be added to the "In base units" input box: "kg/m/s/s"
8) 程序将自动将文本格式化为所需的格式。请确保使用正确的基本单位符号,否则程
序将不接受新尺寸。The program will automatically format the text into the desired form.
Make sure to use the correct symbols for the base units or the program will not accept the
new dimension.
9) 注意:在此阶段,新维度已添加到单位字典中。接下来的步骤将详细说明如何将新
单元(在本例中为 kpa)添加到单元字典中。Note: At this stage, the new dimension has
been added to the unit dictionary. The next steps will detail how to add a new unit, in this
case kPa, to the unit dictionary.
10) 通过选择“尺寸”窗口中的“添加工具”按钮添加新单位。Add a new unit by
selecting the Add tool button in the Dimension window.
11) “Unit Definition”窗口的显示类似于图 2.8.9-3。The Unit Definition window will
appear similar to Figure 2.8.9-3.
12) 填写此单位的符号“kpa”,并填写新单位的说明:“kpa=千帕斯卡=1000 帕斯卡;
国际单位制中的压力单位”,例如。Fill in the symbol for this unit, "kPa", and a description
of the new unit; "kPa = kiloPascal = 1000 Pascals; a unit of pressure in the SI unit system",
for example.
13) 填写 将 基 本 压 力 单 位 ( 帕 斯 卡 ) 转 换 为 千 帕 斯 卡所 需 的 转 换 系 数 :Fill in the
conversion coefficients required to convert the base units of pressure (Pascals) to
kiloPascals:
14) #帕*1 千帕\/1000 帕=千帕。# Pa * 1 kPa/1000 Pa = # kPa
15) 在这种情况下,“0.001”将被输入到乘法字段,而“0.0”将被输入到加法字段。In
this case, "0.001" would be input to the multiplication field and "0.0" would be input to
the addition field.
16) 单击“确定”退出“单位”窗口,然后单击“确定”退出“尺寸”窗口。新的维度
和单元现在保存到 Simulation Studio 程序中,可以在组件模型中使用。Click OK to exit the
Unit window and then OK to exit the Dimension window. The new dimension and unit are
now saved to the Simulation Studio program and may be used in the component
models.

2.10. 搜索工具栏。The search toolbar


查看/工具栏/搜索菜单允许显示或隐藏搜索工具栏。该工具栏可用于搜索包含给定搜索项的
TrnSyS 组件的本地硬盘和\/或因特网。搜索项与搜索选项一起在工具栏的“搜索选项”选
项卡中指定。用户单击“搜索”或单击“返回”后,“输出”选项卡将变为活动状态,结
果将在可用时显示。双击一行可以打开相应的形式表。The View/ToolBar/Search menu
allows displaying or hiding the search toolbar. This toolbar can be used to search the local
hard disc and/or the Internet for trnsys components containing a given search term. The
search term is specified in the “Search options” tab of the tool bar, together with
search options. Once the user clicks “Search” or hits return, the “ Output ” tab
becomes active and results are displayed as they become available. It is possible to
double-click on a line to open the corresponding Proforma.

2–118
Translated by CQU Team Lu

如果选择了“搜索 Internet”选项,则会在 Web 浏览器中显示其他结果。If the option


“Search the Internet” is selected, additional results are displayed in a web browser.

图 2.9.4-1:搜索工具栏。Figure 2.9.4-1: The search toolbar

每次启动模拟时,“输出”选项卡也会显示一个简短的报告。The output tab also displays


a short report each time a simulation is stared.

2.11. 命令行参数。Command line arguments


可 以 在 命 令 行 模 式 下 使 用 studio , 例 如 实 现 批 处 理 文 件 。 当 启 动 Studio.exe ( 位 于
TrnSys17\\Studio\\exe)时,可以给出以下命令行参数:It is possible to use Studio in
command line mode, e.g. to implement batch files. When starting Studio.exe (located in
Trnsys17\Studio\Exe), the following command line arguments can be given:
/创建甲板文件。/d create deck file

/R 运行模拟。/r run simulation


/Q 退出。/q quit

例如,要打开“开始.tpf”项目,创建甲板文件,运行模拟,然后退出 Studio,可以使用以
下命令行:For example, to open the ‘Begin.tpf’ project, create the deck file, run the
simulation and then quit Studio, the following command line can be used:
\Trnsys17\Studio\Exe\Studio.exe /d /r /q \trnsys17\Examples\Begin\begin.tpf

2.12. Appendix 1: -
Right Click Menus List

2.12.1. Right-Click On Component Icons in the Assembly Panel

2–119
Translated by CQU Team Lu

2.12.2. Right-Click On Macros in Assembly Panel Window

2–120
Translated by CQU Team Lu

2.12.3. Right-Click On Blank Spot in Assembly Panel Window

2–121
Translated by CQU Team Lu

2.12.4. 右键单击“部件面板”窗口中的链接。 Right-Click On Links in


Assembly Panel Window

附录 2:如何使用插件。Appendix 2: How to use the


plug‐in
Simulation Studio 插件技术允许您将自己的用户友好应用程序添加到 Simulation Studio 以
编辑组件的属性。只需创建应用程序并在 Simulation Studio 中写入可执行文件的名称。然
后启动应用程序,而不是旧的经典对话框。它可以应用于现有的类型以及用户定义的类型。
The Simulation Studio plug-in technology allows you to add your own user friendly
application to Simulation Studio to edit the component’s properties. Just create your
application and write in Simulation Studio the name of your executable file. Then your
application is launched instead of the old classical dialog box. It can be applied to
existing types as well as user-defined types.

2.12.5. 插件技术。The plug-in technology


编写包含要使用任何编程语言显示的对话框的可执行文件。可执行文件的安装目录独立于
Simulation Studio 安装目录,可执行文件的名称独立于类型名称。Write an executable
2–122
Translated by CQU Team Lu

containing the dialog you want to be displayed using any programming language. The
installation directory of the executable is independent of the Simulation Studio installation
directory and the name of the executable is independent of the type name.
我们选择了 EXE 文件格式而不是 DLL,因为对用户来说,使用 EXE 文件更灵活。他不必
与特定的 api 匹配,也不必调用具有数千个参数的方法。此外,EXE 文件可以很容易地编
写任何编程语言(例如,C++、Java 或 VB),但是在这些语言(如 Java)中编写 DLL 将
变得更加困难。We have chosen an EXE file format instead of a DLL, because using an
EXE file is more flexible for the user. He doesn't have to match with a specific API and to
call a method with thousands of parameters. Moreover, an EXE file can be easily written
any programming language (C++, java or VB for example), but it will be much more
difficult to write a DLL in some of these languages (such as JAVA).
此可执行文件将从交换文件中读取值以进行初始化,并将修改后的值写入同一个交换文件。
This executable will read values from an exchange file in order to be initialized, and write
modified values to the same exchange file.
Exchange 文件名将自动生成,并且对于每种类型的实例都是唯一的。它将作为参数传递给
可执行文件。因此,用户只需签入其 exe 的 main 方法以获取 argv[1]参数,该参数将包含
包 含 整 个 路 径 的 exchange 文 件 的 名 称 。 因 此 , 同 时 编 辑 两 个 单 元 没 有 问 题 , 因 为
exchange 文件名将不同。The exchange file name will be automatically generated and
unique for each instance of type. It will be passed as an argument to the executable. So,
the user will just have to check in the main method of his EXE for the argv[1] argument
which will contain the name of the exchange file including the whole path. Thus, there is
no problem for editing two units at the same time, because exchange files names will be
different.

2.12.6. 模拟工作室设置。Simulation Studio settings


单击菜单中的“文件/设置”。出现以下对话框:Click “File/Settings” in the menu. The
following dialog appears:

2–123
Translated by CQU Team Lu

图 2.12.6-1:插件控制卡。Figure 2.12.6-1: Plug-in control card

最后一个名为“automatically launch plug-in”的选项默认设置为“false”。如果希望在双


击组件时自动启动插件,请将此选项设置为“true”。在所有情况下,如果插件名称无效,
则默认打开旧对话框。One of the last options called “Automatically launch plug-in” is
set to “false” by default. If you want your plug-in to be automatically launched when
you double click on a component, set this option to “true”. In all cases, if the plug-in
name is not valid, the old dialog is opened by default.
还可以为每个项目设置此选项。然后,当项目打开时,单击“装配\/控制卡…”。您可以更
改与以前相同的选项,除了每个项目的值(TRUE 或 FALSE)可以不同,并与项目一起保
存。This option can also be set for each project. Then, when a project is opened, click on
“Assembly/Control Cards…”. You can change the same option as before, except
that the value (true or false) can be different for each project and saved with the project.

2.12.7. 如何将插件连接到 Simulation Studio。How to connect


your plug-in to Simulation Studio
要允许 Simulation Studio 在双击组件时启动插件,必须指定插件可执行文件的名称。To
allow Simulation Studio to launch your plug-in when you double click on a component,
you have to specify the name of the plug-in executable file.
您可以在形式表本身或组件属性中指定名称。如果在形式表中指定名称,则基于此形式表的
每个组件都将知道名称。Either you specify the name in the Proforma itself or in the
component properties. If you specify the name in the Proforma, each component based on
this Proforma will know the name.
2–124
Translated by CQU Team Lu

2.12.7.1. 在形式表中指定插件路径名。Specify the plug-in path name in


the Proforma.
打开形式表。“说明”选项卡中会出现一个编辑框。Open the Proforma. An edit box
appears in the “Description” tab.

只需在“插件路径”编辑框中键入插件的名称(包括整个路径)。如果路径以“.”开头,
Simulation Studio 将在 trnsys17 的安装目录中查找插件并自动完成名称。Just type the
name of your plug-in including the whole path in the edit box “Plug-in path”. If the path
starts with “.”, Simulation Studio will look for the plug-in in the installation directory of
Trnsys17 and complete automatically the name.
然后,当您将基于此形式化的组件添加到项目中时,它将知道要启动的插件应用程序的名称。
Then, when you will add a component based on this Proforma to your project, it will know
the name of the plug-in application to launch.
2.12.7.2. 在组件属性中指定插件路径名。Specify the plug-in path name in
the component properties.
打 开 组 件 属 性 。 一 个 新 的 编 辑 框 出 现 在 “ 评 论 ” 选 项 卡 中 。 Open the component
properties.A new edit box appears in the “Comment” tab.

2–125
Translated by CQU Team Lu

只需在编辑框“插件路径”中键入插件的名称(包括整个路径)。Just type the name of


your plug-in including the whole path in the edit box «Plug-in path».

2.12.8. 如何启动插件。How to launch the plug-in


有两种可能性:Two possibilities are available:

2.12.8.1. 如果选项“ automatically launch plug-in ”设置为“ false ”。 If the


option “Automatically launch plug-in” is set to “false”
双击组件时,将启动旧对话框。如果在 PrimRMA 中没有指定插件名称,旧对话框看起来像
往常一样。如果在 PrimRMA 中指定了一个插件名称,对话框看起来如下(见图 2.128-1),
在选项卡“参数”、“输入”、“输出”和“派生”中有一个新的按钮,以及“注释”选项
卡中的插件的名称(参见图 2.8:3):When you double click on a component, the old
dialog is launched. If no plug-in name was specified in the Proforma, the old dialog looks
as usual. If a plug-in name was specified in the Proforma, the dialog looks as following
(see Figure 2.12.8-1), with a new button in tabs “Parameter”, “Input”, “Output”
and “Derivative”, and the name of the plug-in in the “Comment” tab (see Figure
2.8.9-3):

2–126
Translated by CQU Team Lu

Figure 2.12.8-1: Plug-in launch button

图 2.12.8-2:插件路径。Figure 2.12.8-2: Plug-in path

如果插件名称无效,即此名称指定的文件在硬盘上不存在,则不会显示该按钮。The button
doesn’t appear if the plug-in name is not valid, i.e. the file specified by this name doesn’
t exist on the hard drive.
因此,如果修改插件名称,则每次转到另一个选项卡时,都会选中该文件名,并根据文件名
2–127
Translated by CQU Team Lu

的有效性显示或消失按钮。So if you modify the plug-in name, each time you go to


another tab, the file name is checked and the button appears or disappears depending
on the file name validity.
现在,要么照常工作,然后关闭对话框,要么单击启动插件的 new 按钮,将包含所有组件值
的文件的名称作为参数(exchange 文件)。启动插件时,旧对话框将关闭。Now, either
you work as usual and then you close the dialog, or you click on the new button
which launches the plug-in, taking the name of the file containing all the component
values as a parameter (the exchange file). When the plug-in is launched, the old dialog is
closed.
在 本 例 中 , “functioneditor.exe ” 启 动 , 打 开 带 有 “type14h ” 组 件 值 的 文 件 ( 参 见 图
2.12.8-3)。In this example, “FunctionEditor.exe” is launched opening the file with
the values of the “type14h” component (see Figure 2.12.8-3).

图 2.12.8‐3:函数编辑器作为插件示例。Figure 2.12.8‐3: FunctionEditor as a plug‐in


example
插件窗口可以被图标化、最大化和调整大小。如果你双击一个已经打开了插件窗口的组件,
即使它被图标化或隐藏,它也会显示在所有打开的窗口前面。The plug-in window can be
iconified, maximized and resized. If you double click on a component which has its plug-
in window already open, it is displayed in front of all opened windows even if it was
iconified or hidden.
插件窗口总是显示在 Simulation Studio 的顶部,就像“旧”对话框一样。The plug-in
window is always visible on top of Simulation Studio, just like the ‘old‘ dialogs.
现在,关闭插件时,Simulation Studio 将从 Exchange 文件中读取值,同时考虑插件修改的
2–128
Translated by CQU Team Lu

新值(注意:关闭插件时将删除 Exchange 文件)。Now, when you close the plug-in, the


values are read back by Simulation Studio from the exchange file, taking into account the
new values modified by the plug-in (note: the exchange file is erased when the plug-in is
closed).

2.12.8.2. 如果选项“ automatically launch plug-in ”设置为“ true ”。 If


the option “Automatically launch plug-in” is set to “true”
该行为与以前完全相同,除了如果在 PrimRMA 中指定插件名称、组件创建或组件属性,旧
对话框不打开,并且在双击组件后直接启动插件。The behavior is quite the same as before,
except that if a plug-in name was specified in the Proforma, the component creation or in
the component properties, the old dialog is not opened and the plug-in is directly launched
after double clicking on the component.

2.12.9. 带公式的插件。Plug-in with Equations


若要指定公式的插件路径,请打开“公式属性”。它如下所示,带有一个名为“插件路径”
的编辑框。可以键入插件路径,例如可以使用“记事本.exe”。当插件路径名有效时,即文
件存在于硬盘上,会出现一个新按钮(见图 2.12.9-1)。To specify the plug-in path for an
equation, open the equation properties. It looks as following, with an edit box called
“Plug-in path”. You can type the plug-in path, for example “notepad.exe” can be
used. When the plug-in path name is valid, i.e. the file exists on the hard drive, a new
button appears (see Figure 2.12.9-1).

2–129
Translated by CQU Team Lu

图 2.12.9‐1:方程式插件路径。Figure 2.12.9‐1: Equation plug‐in path


然后,单击按钮启动插件。如果使用记事本作为插件,则如图 2.12.9-2 所示:交换文件已在
记事本中作为简单文本文件打开。方程式可以在记事本中修改。Then, click on the button
to launch the plug-in. If notepad is used as a plug-in, it looks like the Figure 2.12.9-2:
the exchange file has been opened as a simple text file in notepad. Equations can be
modified in the notepad.

2–130
Translated by CQU Team Lu

图 2.12.9‐2:记事本作为公式插件。Figure 2.12.9‐2: Notepad as equation plug‐in


如果 Simulation Studio 的“自动启动插件”选项为“true”,则双击公式时,插件将直接启
动,而不是旧对话框。If the option “Automatically launch plug-in” of Simulation Studio
is “true”, the plug-in is directly launched instead of the old dialog when you double click
on an equation.

2.12.10. 交换文件。The exchange file


exchange 文件是作为参数传递给插件的文件,允许插件读取组件的值。关闭插件时,
Simulation Studio 将读取并删除此文件。如果插件与组件或公式关联,则文件的内容略有
不同。The exchange file is the file passed as a parameter to the plug-in, allowing the
plug-in to read the values of the component. This file is read back and erased by
Simulation Studio when the plug-in is closed. The content of the file is a little bit different if
the plug-in is associated to a component or to an equation.

2.12.11. 组件的交换文件。The exchange file for component

2–131
Translated by CQU Team Lu

! File generated by Simulation Studio 4


! Copyright CSTB 2003
TypeNumber UnitNumber TypeName ! [TypeNumber UnitNumber TypeName]
INPUTS
Number_Of_Cycles ! [Number of cycles] Number_of_cycle_1_repetition
First_Var_Cycle_1 Last_Var_Cycle_1 ! [CycleRepetition FirstVar LastVar]
Number_of_cycle_2_repetition First_Var_Cycle_2 Last_Var_Cycle_2 !
[CycleRepetition FirstVar LastVar]

Number_of_cycle_n_repetition First_Var_Cycle_n Last_Var_Cycle_n !
[CycleRepetition FirstVar LastVar]
Number_Of_Inputs ! [Number of variables]
Input_1 ! Name_1 | Unit_1 | Min_1 | Max_1 | ConnectionState
Input_2 ! Name_2 | Unit_2 | Min_2 | Max_2 | ConnectionState

Input_n ! Name_n | Unit_n | Min_n | Max_n | ConnectionState

(Idem for PARAMETERS and DERIVATIVES)

EXTERNAL_FILES
Number_Of_FileName
File_Name_1 ! Question_1
File_Name_2 ! Question_2

File_Name_n ! Question_n
SPECIAL_CARDS
Number_Of_Cards
Card_1 ! Question_1
Card_2 ! Question_2

Card_n ! Question_n
COMMENT
Number_Of_Comment_Line
Comment_Line_1
Comment_Line_2
...
Comment_Line_n

在“输入 1!name_1 unit_u 1 min_u 1 max_u 1 connectionState”,input_1 和 unit_1 的值


是 转 换 为 形 式 默 认 值 的 值 。 In line “ Input_1 ! Name_1 | Unit_1 | Min_1 | Max_1 |
ConnectionState”, the value of Input_1 and Unit_1 are the values converted to the
Proforma default value.
例如,如果输入是形式表中以°C 表示的温度,类型中以 K 表示的温度,则它将在交换文件
中转换为°C。For example, if an input is a temperature given in °C in the Proforma and
given in K in the type, it will be converted to °C in the exchange file.
这种转换对于输入、输出、参数和导数都是一样的。This conversion is the same for Inputs,
Outputs, Parameters and Derivatives.
对于循环,我们不关心“循环次数”是对问题的回答还是参数值。如果循环由一个问题控制,
则用户可以在其可执行文件中使用问题名称而不必在 Exchange 文件中读取它。For cycles,
we don’t care if the “Number_of_cycle_n_repetition” is an answer to a question or a
2–132
Translated by CQU Team Lu

parameter value. If the cycle is controlled by a question, it is well known by the user who
can use the question name in his executable without reading it in the exchange file.
“!“这意味着 Simulation Studio 在关闭插件对话框后将回读 Exchange 文件时,不会考
虑行尾之前读取的值。The “!” means that the values read after until the end of the line
won’t be taken into account by Simulation Studio when the exchange file will be read
back after closing the plug-in dialog.
对于收集器,Exchange 文件可能如下所示:For a Collector, the exchange file could look
like:
! File generated by Trnsys Simulation Studio
! Copyright CSTB 2004
1 5 Collectors ! [TypeNumber UnitNumber TypeName]

INPUTS
0 ! [Number of cycles]
9 ! [Number of variables]
20 ! Inlet temperature|C|-Inf|+Inf|Connected
100 ! Inlet flowrate|kg/hr|0.0|+Inf|Connected
10 ! Ambient temperature|C|-Inf|+Inf|Connected
0 ! Incident radiation|kJ/hr.m^2|0.0|+Inf|Connected
0 ! Total horizontal radiation|kJ/hr.m^2|0.0|+Inf|Connected
0 ! Horizontal diffuse radiation|kJ/hr.m^2|0.0|+Inf|Connected
! Ground reflectance|-|0.0|1.0|NotConnected
45 ! Incidence angle|degrees|-360|+360|Connected
0 ! Collector slope|degrees|-360|+360|Connected

PARAMETERS
! [Number of cycles]
! [Number of variables]
! Number in series|-|1|+Inf
! Collector area|m^2|0.0|+Inf
! Fluid specific heat|kJ/kg.K|0.0|+Inf
! Efficiency mode|-|1|3
! Tested flow rate|kg/hr.m^2|0.0|+Inf
! Intercept efficiency|-|0.0|1.0
! Efficiency slope|kJ/hr.m^2.K|-Inf|+Inf
! Efficiency curvature|kJ/hr.m^2.K^2|-Inf|+Inf
! Optical mode 2|-|2|2
! 1st-order IAM|-|0.0|1.0
d d IAM

0 ! [Number of cycles]
0 ! [Number of variables]

2–133
Translated by CQU Team Lu

SPECIAL_CARD
S 0
COMMEN
TS 0

方程式的交换文件。The exchange file for an equation


! File generated by IISiBat 4
! Copyright CSTB 2003

UnitNumber EquationName ! [UnitNumber TypeName]

INPUTS
Number_Of_Inputs
| Name_1 ! ConnectionState
| Name_2 ! ConnectionState

| Name_n ! ConnectionState
OUTPUTS
Number_Of_Outputs
Output_1 | Name_1 ! ConnectionState
Output_2 | Name_2 ! ConnectionState

Output_n | Name_n ! ConnectionState

以后的一切!可以跳过,仿真工作室将在下次将文件传递到 EXE 时添加它。Everything


after ‘!’ can be skipped, Simulation Studio will add it back next time the file is passed
to the EXE.
对于公式,交换文件可能如下所示:For an Equation, the exchange file could look like:
! File generated by IISiBat 4
! Copyright CSTB 2003

16 Efficiencies! [UnitNumber TypeName]

INPUTS
8
|IColl_d!Connected
|QuColl_d!Connected
|QDHW_d!Connected
|QAux_d!Connected
|IColl!Connected
|QuColl!Connected
|QDHW!Connected
|QAux!Connected
OUTPUT
S 4
QuColl_d / (5*IColl_d+1e-6)|EtaColl_d!Connected
1 - ( QAux_d / (QDHW_d + 1e-6) )|FSol_d!Connected
QuColl / (5*IColl+1e-6)|EtaColl!Connected
1 - ( QAux / (QDHW+ 1e-6) )|FSol!Connected

2.13. 附录 3:如何使用向导。 Appendix 3: How


2–134
Translated by CQU Team Lu

to use the Wizard


2.13.1. 描述。Description
在主窗口中单击“文件\\新建”或“新建”( )按钮后,将启动向导。然后显示如图
2.13.1-1 所示的对话框:。The wizard is launched after clicking in the main window on
File\New or on the New ( ) button. The dialog as shown in Figure 2.13.1-1 is then
displayed:
图 2.13.1-1:向导对话框。Figure 2.13.1-1: The wizard dialog

首先,必须在左侧的列表中选择一个项目(新组件、空项目、太阳能热水系统、建筑项目
(多区域)、建筑项目(简化),…)。First of all, an item must be selected in the list
on the left (New Component, Empty Project, Solar hot water system, Building project
(multizone), Building Project (simplified), …).

2.13.2. 多片区分步建设工程。 Multizone Building project step


by step
2.13.2.1. 步 骤 1/10 : 选 择 项 目 类 型 。 Step 1/10: Selecting the
project type

图 2.13.2-1:选择项目类型。Figure 2.13.2-1: Selecting the project type

在列表中选择正确的项目(即建筑项目(多区域))后,单击“下一步”按钮( )将转到下一步。
Once the right item is selected in the list (i.e. Building Project (multizone)), clicking on the
Next button ( ) will go to next step.

本说明的其余部分将显示“建筑项目(多区域)”向导,因为它是最复杂的向导。The rest
2–135
Translated by CQU Team Lu

of this explanation shows the Building project (multizone) wizard, because it is the most
complex one.

2.13.2.2. 步骤 2/10:绘制平面图。Step 2/10: Drawing the floor plan

图 2.13.2-2:绘制平面图。Figure 2.13.2-2: Drawing the floor plan

要向建筑添加分区,请单击左侧网格。每个黑色方块代表一个区域。同时,向导将自动计
算添加区域之间的邻接并在右侧显示列表。To add a zone to the building, click on the left
grid. Each black square represents a zone. At the same time, the wizard will
automatically compute the adjacencies between added zones and display the list on the
right.
绘制平面图后,单击“下一步”按钮将转到下一步。Once the floor plan is drawn, clicking
on the next button will go to next step.

2.13.2.3. 步骤 3/10:设置区域属性。Step 3/10: Setting zone properties

2–136
Translated by CQU Team Lu

图 2.13.2-3:区域特性。Figure 2.13.2-3: Zone properties


在右边的网格中选择一个区域将显示其属性。显示的属性包括:名称、高度、宽度、深度和
体积。用户必须设置这些属性,但根据高度、宽度和深度自动计算的体积除外。Selecting a
zone in the grid on the right will display its properties. Displayed properties are: name,
height, width, depth and volume. The user must set these properties, except the Volume
which is automatically computed depending on the height, width and depth.
请注意,所有单元格的高度都相同。如果宽度被修改,则对同一列中的所有单元格进行修改。
如果修改了深度,则会为同一行中的所有单元格修改深度。以后在 trnbuild 中必须适应更复
杂的几何结构。Note that height is the same for all cells. If the width is modified, it is
modified for all cells in the same column. If the depth is modified, it is modified for all cells
in the same row. More complex geometries must be adapted in TRNBuild later.
定义完所有分区属性后,单击“下一步”按钮将转到下一步。Once all zone properties are
defined, clicking on the next button will go to next step.
2.13.2.4. 步骤 4/10:设置窗口、方向和位置。Step 4/10: Setting windows,
orientation and location

2–137
Translated by CQU Team Lu

图 2.13.2‐4:窗口、位置和方向。Figure 2.13.2‐4: Windows, location and orientations


在左上角,可以将外壁窗户的分数设置成每个方向的百分比(北境、欧美地区、东和
South ) 。 On the top left, fraction of windows in external walls can be set as a
percentage for each orientation (North, West, East and South).
在右上角,建筑物的旋转以度为单位。该角度对于北向东旋转为正,对于北向西旋转为负。
On the top right, the building rotation is asked in degrees. The angle is positive for North
to east rotation and negative for North to West.
在底部编辑框中,必须设置天气数据文件路径。浏览按钮可用于选择文件。On the bottom
edit box, the weather data file path must be set. The Browse button can be used to select
a file.
定义完所有值后,单击“下一步”按钮将转到下一步。Once all values are defined, clicking
on the next button will go to next step.

2.13.2.5. 步骤 5/10:渗透和通风。Step 5/10: Infiltration and ventilation

2–138
Translated by CQU Team Lu

图 2.13.2-5:渗透和通风。Figure 2.13.2-5: Infiltration and ventilation

在左上方,所有区域的渗透必须设置为 1/h 内的泄漏。On the top left, infiltration for all


zones must be set as a leakage in 1/h.
通过检查相应的复选框可以增加机械和自然通风。根据所选内容,将显示更多或更少的框,
并且必须进行设置。激活这些选项将创建更复杂的模拟项目,并根据需要添加组件。
Mechanical and natural ventilation can be added by checking the corresponding check
boxes. Depending on the selection, more or less boxes are displayed and must be set.
Activating these options will create more complex simulation projects, adding components
as required.
对于机械通风,速率必须设置为 1\/h。需要两个值,一个用于建筑物被占用的时段,另一个
用于建筑物被占用的时段。定义了这些周期的默认日程安排,稍后可以在 TRNBuild 进行修
改。For the mechanical ventilation, the rate must be set in 1/h. Two values are asked, one
for periods where the building is occupied and another for periods where the building is
unoccupied. A default schedule defining these periods is applied and can be adapted in
TRNBuild later.
另 外 , 还 要 求 送 风 湿 度 百 分 比 和 送 风 温 度 摄 氏 度 。 Also the humidity of supply air in
percentage and the supply temperature in degree C are asked.
最后,在底部定义了自然通风特性。在左边,在 1/h 内给出自然通风速率,在右边,可以
定义附加的依赖于温度的依赖通风。如果选中此选项,则在达到“通风开始”中定义的温度
时,将立即模拟附加通风。另一方面,如果温度低于“通风停止”中定义的值,则此附加通
风将停止。Finally, at the bottom, natural ventilation properties are defined. On the left, the
natural ventilation rate is given, in 1/h. On the right, additional dependant temperature
2–139
Translated by CQU Team Lu

dependant ventilation can be defined. If this option is checked, additional ventilation will
be simulated as soon as the temperature defined in ‘ventilation start’ is reached. On
the other hand, this additional ventilation will stop if the temperature drops below the
value defined under ‘Ventilation stop’.
定义完所有值后,单击“下一步”按钮将转到下一步。Once all values are defined, clicking
on the next button will go to next step.

2.13.2.6. 步骤 6/10:加热和冷却。Step 6/10: Heating and Cooling

图 2.13.2-6:加热和冷却。Figure 2.13.2-6: Heating and cooling

在此步骤中,可以定义内置到 TrnBuw 中的加热和冷却设备的特性。尽管此处定义的设置适


用于所有分区,但定义了单独的加热和冷却类型。In this step, the characteristics of the
heating and cooling equipment built into TRNBuild can be defined. Although the settings
defined here apply to all zones, separate heating and cooling types are defined.
这允许用户在稍后的 trnbuild 中轻松地分别调整每个区域的加热和冷却特性。This allows
the user to easily adapt the heating and cooling characteristics of each zone separately in
TRNBuild later.
冷却设定点温度可由用户(°C)定义,或根据环境温度定义。在第二种情况下,开始冷却
的温度将“遵循”使用公式 t_cool=(t_ambient+49)\/3 的环境温度,但不超过 27 度,也
不低于 25 度。下面是一个例子。这个公式可以在模拟工作室的装配面板中修改。The
cooling set point temperature can be defined by the user (in °C) or defined as depending
on the ambient temperature. In this second case, temperature at which cooling is to start
will ‘follow’ the ambient temperature using the formula T_Cool = (T_Ambient + 49) /3,
2–140
Translated by CQU Team Lu

but not exceed 27 degrees nor fall below 25 degrees. An example is shown below. This
formula can be adapted in the Simulation Studio’s Assembly Panel later.

2.13.2.7. 步骤 7/10:增益和照明。Step 7/10: Gains and lighting

图 2.13.2-7:增益和照明。Figure 2.13.2-7: Gains and lighting

在这个步骤中,可以定义由于乘员和照明引起的内部增益。In this step, internal gains due


to occupants and lighting can be defined.
自动定义了一种基于水平太阳总辐射的简单照明控制策略。这种控制策略稍后可以在仿真程
序的组装面板中加以改进。A simple lighting control strategy based on the total horizontal
solar radiation is automatically defined. This control strategy can be later on refined in the
Simulation Studio’s Assembly panel.

2–141
Translated by CQU Team Lu

单击“下一步”按钮将转到下一步。Clicking on the next button will go to next step.

2.13.2.8. 步骤 8/10:固定阴影。Step 8/10: Fixed shading

图 2.13.2-8:固定阴影。Figure 2.13.2-8: Fixed shading

此步骤允许为建筑的四个主要方向中的每个方向定义固定的着色元素(悬挑和翼墙)。This
step allows to define fixed shading elements (overhangs and wing walls) for each of the
four main orientations of the building.
用户必须单击要修改固定阴影的方向(北、东、南或西)。然后,通过检查“活动”复选
框,可以为选定的方向激活固定阴影。根据窗口下部的复选框的状态,给定的方向可以没
有固定的阴影、悬垂、翼墙或两者。接收器尺寸(窗口高度和宽度)应用于此方向上的所
有着色元素。The user must click on the orientation (North, East, South or West) for which
he wished to modify the fixed shading. Then, fixed shading can be activated for the
selected orientation by checking the ‘Active’ checkbox. A given orientation can have no
fixed shading, an overhang, a wing wall or both, depending on the status of the
checkboxes in the lower part of the window. The receiver dimensions (window height and
width) apply to all shading elements in this orientation.
一旦定义了所有的方向,用户就可以通过依次选择所有方向来“遍历”设置,以检查设置是
否正确。Once all orientations are defined, the user can ‘walk through’ the settings by
successively selecting all orientations again, to check that the settings are correct.
单击“下一步”按钮将转到下一步。Clicking on the next button will go to next step.

2–142
Translated by CQU Team Lu

2.13.2.9. 步骤 9/10:移动阴影。Step 9/10: Movable shading

图 2.13.2-9:活动阴影。Figure 2.13.2-9: Movable shading

此步骤允许为建筑的四个主要方向中的每个方向定义固定的着色元素(例如商店或百叶窗)。
This step allows to define fixed shading elements (such as stores or blinds) for each of the
four main orientations of the building.
用户必须单击要修改可移动阴影的方向(北、东、南或西)。然后,通过检查“活动”复
选框,可以为选定的方向激活可移动阴影。给定方向的可移动阴影由元素将打开或关闭的
总辐射阈值以及“最大阴影”设置(定义元素关闭时的特征)表征。The user must click on
the orientation (North, East, South or West) for which he wished to modify the movable
shading. Then, movable shading can be activated for the selected orientation by checking
the ‘Active’ checkbox. Moveable shading for a given orientation is characterized by the
total radiation thresholds for which the element will be opened or closed, as well as the
‘Maximum shading’ settings, which define the element’s characteristics in case it is
closed.
一旦定义了所有的方向,用户就可以通过依次选择所有方向来“遍历”设置,以检查设置是
否正确。Once all orientations are defined, the user can ‘walk through’ the settings by
successively selecting all orientations again, to check that the settings are correct.
单击“下一步”按钮将转到下一步。Clicking on the next button will go to next step.

2.13.2.10. 步骤 10/10:描述摘要。Step 10/10: Description summary

2–143
Translated by CQU Team Lu

图 2.13.2-10:描述摘要。Figure 2.13.2-10: Description summary

出现此对话框后,将输入创建项目所需的所有参数。当用户按下“创建项目!'按钮,模拟
工作室将。Once this dialog appears, all necessary parameters for the creation of the
project have been entered. When the user pushes the ‘Create project!’ button, the
Simulation Studio will
1. 创建多区域建筑说明(存储在.bui 文件中)。create a multi zone
building description (stored in a .BUI file)
2. 打开 trnbuild 程序将此 bui 文件转换为仿真所需的内部文件(.bld
和.trn 文件),然后关闭 trnbuild。open the TRNBuild program to translate this BUI file to
the internal files necessary for simulation (.BLD and .TRN files), and close TRNBuild
3. 创建一个仿真项目(存储在.tmf 文件中)并在 Simulation Studio 中
打开它。create a simulation project (stored in a .TMF file) and open it in the Simulation
Studio.
用户现在应该检查项目是否正确运行(按 f8)。从这一点来看,模拟项目(模拟演播室)
和建筑物描述(在 TRNBuild 中,使用模拟工作室中的“编辑建筑物”右鼠标菜单)都可以
被修改、适应和扩展,以满足用户的需要。The user should now check that the project
runs correctly (by hitting F8). From this point, both the simulation project (in the Simulation
Studio) and the building description (in TRNBuild, using the ‘Edit building’ right-mouse-
menu in the Simulation Studio) can be modified, adapted and extended to fit the user’s
needs.
2.13.2.11. 调整模板文件。Adapting the template files
2–144
Translated by CQU Team Lu

向导使用模板组和.b17 文件创建模拟项目。用户可以根据自己的需要调整这些模板。它们
位于。The wizard uses template deck and .b17 files to create simulation projects. The
user may adapt these templates to his needs. They are located in
\Trnsys17\Studio\Templates\MultizoneBuilding
文件 MultizoneWizard.dck 引导了多区域建筑项目的创建,而 MultizoneWizard.b17 用于创
建 建 筑 描 述 文 件 。 The file MultizoneWizard.dck pilots the creation of the multizone
building project, while MultizoneWizard.b17 is used to create the building description file.
修改这些模板时应格外小心,因为这样的更改可能会导致生成错误的项目。Care should be
taken when these templates are modified, as such changes can provoke the generation
of incorrect projects.
模板文件包含变量,该变量将由向导根据用户输入由适当的命令替换。 例如,
$$ VERSION 将替换为所使用的 TRNSYS 版本。 在修改模板之前,我们建议用户通过生
成一 些示 例项 目并 将它 们与 模板 进行 比较 ,首先研 究现 有模 板及 其包 含的 变量 。The
template files contain variables which will be replaced by the appropriate commands by
the wizard, based on user input. For example, $$VERSION will be replaced by the
TRNSYS version used. Before modifying the templates, we advice users to study the
existing templates and the variables they contain first, by generating some example
projects and comparing them to the templates.
保留模板原始版本的副本也是一个好主意。It is also a good idea to keep a copy of the
original version of the templates.

2–145

You might also like