Professional Documents
Culture Documents
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
校对历史。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)
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
版权。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.
马克坎波拉。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
目录 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
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
Translated by CQU Team Lu
图表。Table of figures
图 2.1.3-1:激活自动更新 2–12。Figure 2.1.3-1: Activation of automatic updates 2–12
2–11
Translated by CQU Team Lu
2–12
Translated by CQU Team Lu
2–14
Translated by CQU Team Lu
Simulation Studio and TRNSYS packages please refer to the document entitled
"Getting Started".
如果用户单击“不检查”,软件将不会自动检查更新。如果用户单击“自动检查”,软件将
尝试连接到 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
2–17
Translated by CQU Team Lu
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.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.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.
最 后 修 改 : 这 是 最 新 修 订 版 的 日 期 。 此 值 自 动 设 置 , 但 可 以 更 改 。 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
2–25
Translated by CQU Team Lu
2–26
Translated by CQU Team Lu
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
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.
此输入框确定最小值和最大值是否包含在允许的变量范围内。括号可以像“[,] ],],],
[,],[ [和] ]。如果左括号是“[”,则最小值包含在范围内,而如果左括号是“%”,则最
小值不包含在允许的范围内。如果右括号是“%”,则最大值包含在范围内,而如果右括号
是“[”,则最大值不包含在允许的范围内。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–32
Translated by CQU Team Lu
2–33
Translated by CQU Team Lu
在图 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–36
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).
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.
Update.
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.
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.
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). .
旦选择了多个项,可以通过单击鼠标左键单击其中的一个组件并将其拖动到一个新位置来
移 动 这 些 项 。 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–44
Translated by CQU Team Lu
单击此菜单时,将显示一个对话框,其中包含所有可用组件(如直接访问工具中的组件)。
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.
选择组件后,关闭对话框,光标将变为加号(+)。将光标移动到“装配面板”窗口中应放
置零部件模型的位置,然后单击。组件模型将出现在装配面板中。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.
个或多个组件,然后单击“装配/发送到层”菜单项。将显示一个子菜单,其中包含所有定义
的图层。单击其中一个选项,组件将移动到此层。同一层上的组件之间的链接是可见的。如
果显示了来自两个层的组件,则会显示到其他层上组件的链接。可以在不同层上的组件之间
建立链接。当然,通过点击菜单“查看/显示层”菜单上的“所有层”(这是默认设置)始终
可以看到所有组件(和所有链接)。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–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.
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–50
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–52
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.
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–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–59
Translated by CQU Team Lu
2–60
Translated by CQU Team Lu
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
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
在许多组件中,都有要填写的特殊卡、要指定的周期或要指定的外部文件和注释。下面讨论
这些主题。有关特殊卡、循环和外部文件的详细信息可在本手册的“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.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.
在某些情况下,循环的“大小”(包含在循环中的变量数)也可以由另一个参数的值确定。
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’.
用户可能希望浏览硬盘上的正确文件。浏览窗口可以通过按文件名( )旁边的
“浏览”按钮打开。。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.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–70
Translated by CQU Team Lu
单击链接按钮( )将在两个组件之间添加新行(即新连接)。默认情况下,在找到的第
一个兼容变量之间创建连接(即,这两个变量具有相同的维度和单位)。一旦添加了连接,
就可以通过在相应的组合框中选择其他变量(输入或输出变量)来修改。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–72
Translated by CQU Team Lu
2–73
Translated by CQU Team Lu
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
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.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
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.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.
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.
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.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.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–87
Translated by CQU Team Lu
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
- 显示启动屏幕:如果选中此复选框,则每次启动软件时都会显示启动动画。Show
startup screen : if this checkbox is checked, the startup animation is shown each time the
software is started
2–92
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.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–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–95
Translated by CQU Team Lu
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.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.
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.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–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
( ).
2–102
Translated by CQU Team Lu
2–103
Translated by CQU Team Lu
2.8.5.18. 程序集/连接…。Assembly/Connections...
此命令将打开当前选定的链接,就像双击它一样。This command opens the currently
selected link as if it had been double-clicked.
2–105
Translated by CQU Team Lu
2–106
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–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.
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.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–110
Translated by CQU Team Lu
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.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
用户字典的菜单将启动单元字典程序中包含的各种应用程序。下面是单元字典函数的详细
描述。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–114
Translated by CQU Team Lu
2–115
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–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–118
Translated by CQU Team Lu
例如,要打开“开始.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–119
Translated by CQU Team Lu
2–120
Translated by CQU Team Lu
2–121
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–123
Translated by CQU Team Lu
只需在“插件路径”编辑框中键入插件的名称(包括整个路径)。如果路径以“.”开头,
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
2–126
Translated by CQU Team Lu
如果插件名称无效,即此名称指定的文件在硬盘上不存在,则不会显示该按钮。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
2–129
Translated by CQU Team Lu
2–130
Translated by CQU Team Lu
2–131
Translated by CQU Team Lu
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
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
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
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
首先,必须在左侧的列表中选择一个项目(新组件、空项目、太阳能热水系统、建筑项目
(多区域)、建筑项目(简化),…)。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), …).
在列表中选择正确的项目(即建筑项目(多区域))后,单击“下一步”按钮( )将转到下一步。
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.
要向建筑添加分区,请单击左侧网格。每个黑色方块代表一个区域。同时,向导将自动计
算添加区域之间的邻接并在右侧显示列表。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–136
Translated by CQU Team Lu
2–137
Translated by CQU Team Lu
2–138
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.
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–141
Translated by CQU Team Lu
此步骤允许为建筑的四个主要方向中的每个方向定义固定的着色元素(悬挑和翼墙)。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
此步骤允许为建筑的四个主要方向中的每个方向定义固定的着色元素(例如商店或百叶窗)。
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–143
Translated by CQU Team Lu
出现此对话框后,将输入创建项目所需的所有参数。当用户按下“创建项目!'按钮,模拟
工作室将。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