• No results found

PDS Equipment Eden Interface

N/A
N/A
Protected

Academic year: 2021

Share "PDS Equipment Eden Interface"

Copied!
217
0
0

Loading.... (view fulltext now)

Full text

(1)

Plant Design System (PDS)

Equipment Eden Interface

Version 2011 (V12)

June 2011

(2)

Copyright © 1984-2011 Intergraph Corporation. All Rights Reserved.

Including software, file formats, and audiovisual displays; may be used pursuant to applicable software license agreement; contains confidential and proprietary information of Intergraph and/or third parties which is protected by copyright law, trade secret law, and international treaty, and may not be provided or otherwise made available without proper authorization from Intergraph Corporation.

U.S. Government Restricted Rights Legend

Use, duplication, or disclosure by the government is subject to restrictions as set forth below. For civilian agencies: This was developed at private expense and is "restricted computer software" submitted with restricted rights in accordance with subparagraphs (a) through (d) of the Commercial Computer Software - Restricted Rights clause at 52.227-19 of the Federal Acquisition Regulations ("FAR") and its successors, and is unpublished and all rights are reserved under the copyright laws of the United States. For units of the Department of Defense ("DoD"): This is "commercial computer software" as defined at DFARS 252.227-7014 and the rights of the Government are as specified at DFARS 227.7202-3.

Unpublished - rights reserved under the copyright laws of the United States. Intergraph Corporation

P.O. Box 240000 Huntsville, AL 35813

Terms of Use

Use of this software product is subject to the End User License Agreement ("EULA") delivered with this software product unless the licensee has a valid signed license for this software product with Intergraph Corporation. If the licensee has a valid signed license for this software product with Intergraph Corporation, the valid signed license shall take precedence and govern the use of this software product. Subject to the terms contained within the applicable license agreement, Intergraph Corporation gives licensee permission to print a reasonable number of copies of the documentation as defined in the applicable license agreement and delivered with the software product for licensee's internal, non-commercial use. The documentation may not be printed for resale or redistribution.

Warranties and Liabilities

All warranties given by Intergraph Corporation about equipment or software are set forth in the EULA provided with the software or applicable license for the software product signed by Intergraph Corporation, and nothing stated in, or implied by, this document or its contents shall be considered or deemed a modification or amendment of such warranties. Intergraph believes the information in this publication is accurate as of its publication date.

The information and the software discussed in this document are subject to change without notice and are subject to applicable technical product descriptions. Intergraph Corporation is not responsible for any error that may appear in this document. The software discussed in this document is furnished under a license and may be used or copied only in accordance with the terms of this license. No responsibility is assumed by Intergraph for the use or reliability of software on equipment that is not supplied by Intergraph or its affiliated companies. THE USER OF THE SOFTWARE IS EXPECTED TO MAKE THE FINAL EVALUATION AS TO THE USEFULNESS OF THE SOFTWARE IN HIS OWN ENVIRONMENT.

Intergraph is not responsible for the accuracy of delivered data including, but not limited to, catalog, reference and symbol data. Users should verify for themselves that the data is accurate and suitable for their project work.

Trademarks

Intergraph, the Intergraph logo, PDS, SmartPlant, FrameWorks, I-Convert, I-Export, I-Sketch, SmartMarine, IntelliShip, INtools, ISOGEN, MARIAN, SmartSketch, SPOOLGEN, SupportManager, and SupportModeler are trademarks or registered trademarks of Intergraph Corporation or its subsidiaries in the United States and other countries. Microsoft and Windows are registered trademarks of Microsoft Corporation. Oracle, JD Edwards, PeopleSoft, and Retek are registered trademarks of Oracle Corporation and/or its affiliates. MicroStation is a registered trademark of Bentley Systems Inc, all rights reserved. Other brands and product names are trademarks of their respective owners.

(3)

Plant Design System (PDS) Equipment Eden Interface

3

Contents

Preface PDS ... 9

What's New in Equipment Eden Interface ... 11

The Eden Basics ... 13

Equipment Symbol Processor ... 13

Tutorial Definition Table ... 17

Forms Interface ... 22

Eden Language Structure ... 23

Beginning Statements ... 23

Ending Statements ... 24

Begin... 24

Begin EQP Category ... 25

Variables ... 26

Local Variables ... 27

Global Variables Common to Piping, Equipment, and Pipe Support Modeling ... 28

Global Variables Common to Equipment and Pipe Support Modeling ... 29

Global Variables (EQP Specific) ... 30

Subscripted Global Variables ... 30

Common Keywords ... 31 TYPE Statement ... 32 DESCRIPTION Statement ... 32 Comments ... 33 Operators ... 33 Arithmetic Operators ... 33 Relational Operators ... 34 Logical Operators ... 34 Expressions ... 34 Replacement Statements ... 35 Call Statement ... 35 Do While Statement ... 36 Indexed Do Statement ... 36

If - then - else Statement ... 37

Functions ... 37

Primitives ... 38

Convert NPD to Subunits ... 40

Define Active Orientation ... 40

Draw Cone ... 41

Draw Cylinder ... 42

Draw Eccentric Cone ... 43

Draw Projected Rectangle ... 44

Draw Projected Triangle ... 45

Draw Semi-Ellipsoid ... 46

Draw Sphere ... 47

Draw Torus ... 47

(4)

4

Plant Design System (PDS) Equipment Eden Interface

Convert Unit ... 48

Define Active Point ... 49

Define Datum Point ... 49

Define Library ... 50

Define Nozzle ... 51

Define Orientation By Points ... 52

Define Placepoint ... 53

Define Point ... 54

Display Message ... 55

Display Tutorial ... 55

Draw Arc ... 57

Draw Complex Surface... 58

Draw Con Prism ... 60

Draw Curve ... 61

Draw Ecc Prism ... 61

Draw Ecc Transitional Element ... 62

Draw Ellipse ... 63

Draw Line ... 64

Draw Line String ... 64

Draw Proj Hexagon ... 65

Draw Proj Octagon ... 66

Draw Proj Shape ... 67

Draw Rectangular Torus... 68

Draw Revolved Shape ... 69

Draw Shape ... 70

Draw Transitional Element ... 71

Get Arc Points ... 71

Get Arc Size ... 72

Get Date ... 73

Get EQP Category ... 73

Get Line Size ... 74

Get Point ... 74

Move Along Arc ... 76

Move Along Axis ... 77

Move Along Line ... 77

Move By Distance ... 78 Move Data ... 79 Move To Placepoint ... 79 Place COG ... 80 Position Cursor ... 81 Put Field ... 81 Read Table ... 82

Retrieve Nozzle Parameters ... 83

Rotate Orientation ... 84

Start Complex Shape ... 84

Stop Complex Shape... 85

Store Orientation ... 86

Store Nozzle Parameters ... 86

User Function ... 87

Creating a New Equipment Component ... 97

Setup for Equipment ... 97

(5)

Plant Design System (PDS) Equipment Eden Interface

5

Extracting Sample Modules ... 99

Editing Modules... 100

Compiling New Modules ... 100

Revising Modules ... 101

Basic Use of Forms ... 101

Input Fields ... 102

System-Defined Field Numbers ... 102

Application Commands ... 103

User-Defined Application Commands ... 103

System-Defined Application Commands ... 103

Additional Features of the Form Interface ... 104

Defining Symbols ... 107

Eden Debugger ... 111

Invoking the Debugger ... 111

Exiting the Debugger ... 111

Concurrent Display ... 112

Debugger Commands ... 112

Switch Modes (ON and OF) ... 112

Set Line Break (B) ... 113

Call Tutorial (C) ... 113

Deposit Global (DG) ... 114

Deposit Local (DL) ... 114

Examine Local Variables (EL) ... 114

Examine Global Variables (EG) ... 115

Examine Symbol Name (ES) ... 116

Examine Source File Segments (TYPE) ... 116

Move to Specific Source Line or Continue (Go) ... 117

Step through Source Code (S) ... 117

Step into User Function (SI) ... 117

Switch the Prompt Terminal (P) ... 118

Appendix: Codelist (CL330)... 119

Appendix: Equipment Data Definition ... 125

Equipment Group Database Table ... 126

Equipment Nozzle Database Table ... 126

Appendix: EQP Eden Program Examples ... 129

Example 1 (Use of loops) ... 129

Example 2 (Use of arrays and loops) ... 130

Example 3 (Placing nozzles) ... 130

Example 4 (Use of character string variables) ... 131

Example 5 (Graphic selection commands) ... 131

Example 6 ... 132

Example 7 ... 132

Example 8 ... 133

Example 9 ... 133

(6)

6

Plant Design System (PDS) Equipment Eden Interface

Appendix: Delivered Parametrics ... 139

Circular Platform (A001) ... 141

Miscellaneous Platform (A003) ... 143

Holes for Platforms (A015) ... 145

Holes for Miscellaneous Platforms (A016) ... 147

Thru Ladder A (A021) ... 149

Thru Ladder Details (A029) ... 150

Side Ladder A (A031) ... 152

Side Ladder Details (A039) ... 153

Stairs A (A041) ... 154

Handrail A (A051)... 156

Davit A (A061) ... 157

Davit B (A063) ... 159

Define (E200) ... 160

Define Weights (E201) ... 161

Complex Vertical Cylindrical Equipment, Skirt (E205) ... 163

Simple Vertical Cylindrical Equipment, Skirt (E210) ... 165

Simple Vertical Cylindrical Equipment, Legs (E215) ... 167

Spherical Equipment (E230) ... 169

Complex Horizontal Cylindrical Equipment (E240) ... 170

Simple Horizontal Cylindrical Equipment (E245) ... 172

Horizontal Shell and Tube Exchanger (E305) ... 174

Kettle Exchanger (E307) ... 176

Vertical Shell and Tube Exchanger (E310) ... 178

Exchanger Ends (E319) ... 180

Double Pipe Exchanger (E320) ... 181

Plate Exchanger (E325) ... 183

Air Cooler (E330) ... 185

Induced Draft Air Cooler Bay (E332) ... 186

Forced Draft Air Cooler Bay (E334) ... 188

Horizontal Rotating Equipment and Driver (E405) ... 189

Vertical Rotating Equipment and Driver (E410) ... 191

E1 Ends (E905) ... 193

E2 Ends (E906) ... 194

E3 Ends (E907) ... 195

Complex Vertical Cylindrical Equipment (N205) ... 196

Simple Vertical Cylindrical Equipment (N210) ... 197

Simple Vertical Cylindrical Equipment (N215) ... 197

Spherical Equipment (N230) ... 198

Complex Horizontal Cylindrical Equipment (N240)... 198

Simple Horizontal Cylindrical Equipment (N245) ... 199

Horizontal Shell and Tube Exchanger (N305) ... 199

Kettle Exchanger (N307) ... 200

Vertical Shell and Tube Exchanger (N310) ... 200

Double Pipe Exchanger (N320) ... 201

Plate Exchanger (N325) ... 201

Air Cooler (N330) ... 202

Horizontal Rotating Equipment and Driver (N405) ... 202

Vertical Rotating Equipment and Driver (N410) ... 203

Gear Cover (U850) ... 203

Round Torus Miter (U860) ... 204

Rectangular Torus Miter (U861) ... 206

(7)

Plant Design System (PDS) Equipment Eden Interface

7

Flat Oval Torus Miter (U863) ... 208

Flat Oval Prism (U870) ... 209

Flat Oval Torus (U880) ... 210

Rectangular 90 Cone Torus with Offset (U881) ... 212

User Projected Shape (USRPRJ) ... 213

Index ... 215

(8)
(9)

Plant Design System (PDS) Equipment Eden Interface

9

This document provides command reference information and procedural instructions for the Plant Design System (PDS) Equipment Eden Interface task.

List of PDS Documentation

 DPDS3-PB-200003 - DesignReview Integrator (PD_Review) Reference Guide  DPDS3-PB-200004 - Drawing Manager (PD_Draw) User's Guide

 DPDS3-PB-200005 - EE Raceway Modeling Reference Guide

 DPDS3-PB-200006 - Interference Checker/Manager (PD_Clash) User's Guide  DPDS3-PB-200010 - PDS 3D Theory User's Guide

 DPDS3-PB-200013 - PDS EDEN Interface Reference Guide Volume I : Piping  DPDS3-PB-200015 - PDS Equipment Modeling (PD_EQP) User's Guide  DPDS3-PB-200017 - PDS ISOGEN Reference Guide, Vol. 1

 DPDS3-PB-200022 - PDS Piping Component Data Reference Guide  DPDS3-PB-200023 - PDS Project Setup Technical Reference

 DPDS3-PB-200025 - PDS Stress Analysis Interface (PD_Stress) User's Guide  DPDS3-PB-200026 - Pipe Supports Modeler Reference Guide

 DPDS3-PB-200028 - Piping Design Graphics (PD_Design) Reference Guide  DPDS3-PB-200030 - Project Administrator (PD_Project) Reference Guide  DPDS3-PB-200033 - Project Engineer HVAC (PE-HVAC) Reference Guide  DPDS3-PB-200034 - Reference Data Manager (PD_Data) Reference Guide  DPDS3-PB-200035 - Report Manager (PD_Report) User's Guide

 DPDS3-PB-200041 - PDS EDEN Interface Reference Guide Volume 2 : Equipment  DPDS3-PB-200042 - PDS EDEN Interface Reference Guide Volume 3 : Pipe Supports  DPDS3-PE-200016 - PDS Express Project Creation Quick Start Guide

 DPDS3-PE-200052 - PDS Ortho Draw User's Guide

 DPDS3-PE-200029 - Piping Model Builder (PD_Model) Reference Guide  DPDS3-PE-200031 - Project Engineer HVAC Getting Started Guide  DPDS3-PE-200032 - Project Engineer HVAC Overview

 DPDS3-PE-200045 - PDS Label Library Merger Utility  DPDS3-PE-200047 - PDS Reference Data Auditing Tool  DPDS3-PE-200048 - Pipe Supports Explorer Utility  DPDS3-PE-200050 - Batch Services Quick Start Guide  DPDS3-PE-200051 - Batch Services User's Guide

(10)
(11)

Plant Design System (PDS) Equipment Eden Interface

11

The following changes have been made to the Equipment Eden Interface:

Version 2011 (V12)

 No changes were made for this release.

(12)
(13)

Plant Design System (PDS) Equipment Eden Interface

13

S

E C T I O N

1

Eden is a high-level symbol definition language modeled on the FORTRAN programming

language that allows you to design your own symbols for equipment, piping, instrumentation, and specialty items.

The Eden language syntax is not case sensitive. You can write code with whatever case

conventions make it easiest for you to read. While you do not need a programming background to write Eden programs, any programming experience is highly recommended.

Most of the symbol definition functions are built into Eden's command structure. This high-level command structure makes it easier to share code among several different symbol definitions. Eden is flexible enough to allow you to design codes specific to your company's needs, yet offers predefined subroutines, called primitives, which carry out functions often repeated within symbol definitions.

For example, the following primitive draws a cone with a length of X units, a diameter at the active point (first end) of Y units and a diameter at the opposite end of Z units:

Call Draw_Cone (X, Y, Z)

The output produced will look similar to the following graphic:

You can call up to five nested subroutines within a program.

Equipment Symbol Processor

The symbol processor is the Eden code that defines an equipment component. It calls all the subroutines or modules that activate forms, check input data, assign placement points, and place graphics.

The first line of an Eden module defines the module name. The following statement is used in the Eden modules to indicate a symbol processor module:

Symbol_Processor 'MODULE NAME'

The module name should be entered using UPPER CASE characters. For example: Symbol_Processor 'APUMP'

The following example symbol processor defines a horizontal pump:

(14)

14

Plant Design System (PDS) Equipment Eden Interface

SYMBOL_PROCESSOR 'E405' !

#TYPE =Pumps,All equip

#DESC =Hor Rot Equip & Driver !

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! E405 : Horizontal Rotating Equipment and Driver

! ! APPLICATION COMMAND ! 4075 - HELP (SPECIFIC) ! 4074 - HELP (GENERAL) ! 4073 - DEFINE ! 4072 - DEFINE CG

! 4051 - RETURN (from help menu) ! 4052 - UPDATE DATE

!

! SYSTEM DEFINED COMMAND USED ! 4001 - EXIT ! 4002 - ACCEPT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! INT2 accepted LOCATION pointzero [3] ! pointzero = POINT_0 Dimension [100] = 0.0 accepted = 0 tutname = 'E405' Cstring [29] = 'E405'

Call Get_Date( Cstring [38] ) !

Do While ( accepted .EQ. 0 ) Call Display_Tutorial ( tutname ) Call Put_Field( Cstring [29], 19 )

(15)

Plant Design System (PDS) Equipment Eden Interface

15

If( LAST_INP_TYPE .EQ. USER_KEYIN ) then

If( LAST_INP_NUM .GE. 2 .AND. LAST_INP_NUM .LE. 18 ) then Call User_Function ( 'E405_CHECK' )

accepted = Dimension [100] Else

accepted = 0 Endif

Else

If( LAST_INP_TYPE .EQ. APPLICATION_CMD ) then if( LAST_INP_NUM .eq. 4075)then

Call Display_Tutorial ( 'H405' ) accepted = 0

else

if( LAST_INP_NUM .eq. 4074)then Call Display_Tutorial ( 'H200A' ) accepted = 0

else

If( LAST_INP_NUM .eq. 4073)then Call User_Function ('E200') accepted = 0

Else

If( LAST_INP_NUM .eq. 4072)then Call User_Function ('E201') accepted = 0

Else

If( LAST_INP_NUM .eq. 4052 )then Call Get_Date( Cstring [1] ) accepted = 0 Else accepted =1 Endif Endif Endif Endif endif else accepted = 1 Endif Endif Enddo !

! define PLACE POINTS and DATUM POINTS

Call Define_Active_Orientation ( NORTH, UP ) Call Define_Placepoint ( PP1, POINT_0 ) Call Define_Datum_Point ( DP [1], POINT_0) offset = Dimension [4] + Dimension [11] Call Move_Along_Axis ( - offset, SECONDARY ) Call Define_Placepoint ( PP2, POINT_0 ) Call Define_Datum_Point ( DP [2], POINT_0) ! Draw base plate

(16)

16

Plant Design System (PDS) Equipment Eden Interface

base_length = Dimension [1]

base_width = Dimension [2] + Dimension [3] base_thickness = Dimension [4]

offset_base = 0.5 * Dimension [1] + Dimension [5] offset_norm_base = 0.5 * base_width - Dimension [3] Call Move_To_Placepoint (PP2)

Call Move_Along_Axis ( offset_base, PRIMARY ) Call Move_Along_Axis ( offset_norm_base, NORMAL ) Call Rotate_Orientation ( 90.0, NORMAL )

If( base_length .gt. 0.0 .and. base_width .gt. 0.0 .and. base_thickness .gt. 0.0 ) then

Call Draw_Proj_Rectangle ( base_length, base_width, base_thickness ) Else

Call Abort (0) Endif

! Draw driver

driver_length = Dimension [6] + Dimension [7] driver_width = Dimension [8] + Dimension [9]

driver_thickness = Dimension [10] + Dimension [11] vert_offset_driver = - Dimension [11]

horiz_offset_driver = 0.5 * driver_length - Dimension [6] norm_offset_driver = 0.5 * driver_width - Dimension [9] Call Move_To_Placepoint (PP1)

Call Move_Along_Axis ( vert_offset_driver, SECONDARY ) Call Move_Along_Axis ( horiz_offset_driver, PRIMARY ) Call Move_Along_Axis ( norm_offset_driver, NORMAL ) Call Rotate_Orientation ( 90.0, NORMAL )

If( driver_length .gt. 0.0 .and. driver_width .gt. 0.0 .and. driver_thickness .gt. 0.0 ) then

Call Draw_Proj_Rectangle ( driver_length, driver_width, driver_thickness )

Endif

! Draw shaft

Call Move_To_Placepoint (PP1)

Call Move_Along_Axis ( Dimension [7], PRIMARY )

If( Dimension [12] .gt. 0.0 .and. Dimension [13] .gt. 0.0 ) then Call Draw_Cylinder ( Dimension [12], Dimension [13] )

Endif

! Draw housing

house_length = Dimension [14]

house_width = Dimension [15] + Dimension [16] house_thickness = Dimension [17]

vert_offset_house = - Dimension [11]

horiz_offset_house = 0.5 * house_length + Dimension [12] + Dimension [7] norm_offset_house = 0.5 * house_width - Dimension [16]

Call Move_To_Placepoint (PP1)

Call Move_Along_Axis ( vert_offset_house, SECONDARY ) Call Move_Along_Axis ( horiz_offset_house, PRIMARY ) Call Move_Along_Axis ( norm_offset_house, NORMAL ) Call Rotate_Orientation ( 90.0, NORMAL )

If( house_length .gt. 0.0 .and. house_width .gt. 0.0 .and. house_thickness .gt. 0.0 ) then

Call Draw_Proj_Rectangle ( house_length, house_width, house_thickness ) Endif

(17)

Plant Design System (PDS) Equipment Eden Interface

17

! define CGs

Call Move_To_Placepoint ( PP1 )

Call Place_Cog (DRY, Dimension [71], Dimension [72], Dimension [73]) Call Place_Cog (OPERATING_1, Dimension [74], Dimension [75], Dimension [76])

Call Place_Cog (OPERATING_2, Dimension [77], Dimension [78], Dimension [79])

Call Move_To_Placepoint ( PP2 ) STOP

END

Tutorial Definition Table

You can create or modify tutorial definition tables using an ASCII editor. The first line in a tutorial definition table defines the tutorial name. This entry must begin in column 1.

Each input field in a tutorial must have a corresponding row in a tutorial definition table. Each row includes seven entries: field number, data type, global variable, nozzle number, input attribute, default string, and field name.

1. field number The tutorial field number defining the form (gadget number).

2. datatype The data type of the field. This entry is a number whose values include: 1 = 2 = 3 = 4 = 5 = 6 = 7 = 8 = 9 = linear dimension angular dimension integer (no units)

length for NOZ_LENGTH1 length for NOZ_LENGTH2 length for NOZ_RADIUS

equipment entity database attribute nozzle entity database attribute

field to receive values for CSTRING_x variables

3. number A table data entry which the system interprets differently for each data type:

For data types 1, 2, and 3, number is a value that can range from 1 to 100 defining the global variable DIMENSION_n, which holds the field’s input. For example, if number is set to 10 in the table, then any input into the field is placed by the software into DIMENSION_10. The symbol can then refer to DIMENSION_10 and use it in any of its calculations. For data types 4, 5, and 6, this field is ignored. For more information on the Equipment Modeling DDL, refer to

Appendix: Equipment Data Definition (on page 125).

For data types 7 and 8, number defines the attribute number in the appropriate database entity to which the field inserts input. These numbers provide the link to the database.

(18)

18

Plant Design System (PDS) Equipment Eden Interface

equip_group ( datatype = 7 ) 1 , equip_indx_no , integer 2 , equip_no , character(30) 3 , equip_descr_1 , character(40) 4 , equip_descr_2 , character(40) 5 , tutorial_no , character(6) 6 , equip_class , character(2) 7 , dry_weight , double 8 , oper_weight_1 , double 9 , oper_weight_2 , double 10 , insulation_thk , double

11 , construction_stat , short , standard note 130

12 , equipment_division , short , standard note 69

13 , approval_status , short , standard note 35 14 , insulation_purpose , short , standard note 220 equip_nozzle ( datatype = 8 ) 1 , nozzle_indx_no , integer 2 , nozzle_no , character(10) 3 , equip_indx_no , integer 4 , nominal_piping_dia , short 5 , rating , character(8)

6 , preparation , short , standard note 330

7 , piping_mater_class , character(16)

8 , unit_no , character(12)

9 , fluid_code , short , standard note 125

10 , unit_code , character(3)

11 , line_sequence_no , character(16)

12 , heat_tracing_reqmt , short , standard note 200 13 , heat_tracing_media , short , standard note 210 14 , insulation_purpose , short , standard note 220 15 , insulation_thk , double

16 , table_suffix , short , standard note 576

17 , service , character(20) 18 , schedule_thickness , character(8) 19 , nor_therm_growth_X , double 20 , nor_therm_growth_Y , double 21 , nor_therm_growth_Z , double 22 , alt_therm_growth_X , double 23 , alt_therm_growth_Y , double 24 , alt_therm_growth_Z , double

25 , construction_stat , short , standard note 130

For example, if the data type is 7 and number is 1, then any input to this field is put in the equipment entity, attribute number 1 (or equipment name) field of the record that is written to the database when the component is placed. Refer to the model database DDL for a complete description of each attribute in both the equipment and nozzle entities.

(19)

Plant Design System (PDS) Equipment Eden Interface

19

4. nozzle A number that identifies the nozzle with which a field will be

associated. This field is only needed for data types 4, 5, 6, and 8. Each nozzle in a parametric symbol must be assigned a unique umber. (Refer to the DEFINE_NOZZLE and the

RETRIEVE_NOZZLE_PARAMETERS primitives.) This number is the same as the RETRIEVE_NOZZLE_PARAMETERS primitive. Each nozzle in a parametric requires a set of fields for defining the nozzle size, rating, facing, tag, possibly length, and possibly other database attributes. The nozzle number allows the software to distinguish one nozzle tag input field or one nozzle size input field from another. 5. attributes An entry that describes the input field itself. The available values for

this item include:

1 - User input is optional. 2 - User input is required.

3 - User input is optional but causes return to the symbol. This type of field has also been called a terminated key-in field. Refer to the DISPLAY_TUTORIAL primitive for more information on how to handle these fields from the symbol.

4 - User input is required but causes return to the symbol. This is also a terminated key-in field.

Example:

A tutorial has a field for which the attribute entry in the tutorial definition table contains the number two. You are not allowed to select the ACCEPT field to exit from the tutorial until you have provided a valid input for the field.

6. default An entry allowing you to define a default for a particular tutorial input field. The entry can take on several forms. All of the expressions outlined below must be surrounded by single quotes in the tutorial definition table.

The default types include:

’"XXX-"’ A literal string used for defaulting character string input fields.

The double quote must be included as a delimiter. Example:

"101-C"

’Fxxx-’ Use the current value of tutorial field number xxx as the default for this field. Note that user-defined field numbers can range from 1 to 200. (System-defined fields range from 201 to 256 and may not appear in default

(20)

20

Plant Design System (PDS) Equipment Eden Interface

’Dxxx-’ Use the contents of DIMENSION_xxx as the default for this field. There is no practical limit on the number of tutorials that a symbol can activate. Therefore, any calculations that were made before the symbol definition activated the current tutorial can provide defaults for that tutorial. Example: D23

’Cxx-’ Use the contents of CSTRING_xx as the default for this field.

’xx.x-’ Decimal constant with or without a decimal point. All distances are assumed to be in English subunits (inches). If the default is a metric constant, then the constant should be given a suffix of M. Example: 125M ’expr-’ Combine any of the above three default types to form a valid arithmetic expression. Valid operators are +, -, *, /, and ˆ. Use parentheses to alter order of evaluation. An expression is not evaluated until all fields are defined. Example: (F1+F2)/2+30. This expression is not computed until both fields 1 and 2 are defined. Default expressions are currently limited to 20 characters in length. Example:

’’’101-C’’’ - default for an equipment item name field Example:

’F1/2+10’ - use the first input to field 1 divided by 2 plus 10 inches as the default.

7. name Defines an alphanumeric name for the field which will be used in future software releases for reporting and alphanumeric placement of parametrics. The field name can be a maximum of 10 characters in length.

The gadget numbers 1-10 (Column 1 - Field) in the tutorial definition table correspond to gadget numbers 951-960 on the form.

1 = 951 2 = 952 3 = 953 4 = 954 5 = 955 6 = 956 7 = 957 8 = 958 9 = 959 10 = 960

Gadget numbers 11, 12, 13 ... remain 11, 12, 13 ....

Example

The following example tutorial definition table displays a piece of equipment with 7 dimensional inputs (rows 1-7), 4 nozzles (rows 11-26), and 3 fields for equipment entity database attributes (rows 8-10).

(21)

Plant Design System (PDS) Equipment Eden Interface

21

EXCHNG 1, 1, 1, , 1, ’30’, ’DIA’ 2, 1, 2, , 1, ’’, ’NOZ1’ 3, 1, 3, , 1, ’F2’, ’NOZ2’ 4, 1, 4, , 1, ’’, ’NOZ3’ 5, 1, 5, , 1, ’’, ’SUPP1’ 6, 1, 6, , 1, ’’, ’SUPP2’ 7, 1, 7, , 1, ’’, ’PROJ’ 8, 7, 1, , 1, ’’, ’EQPNAM’ 9, 7, 2, , 1, ’’, ’DESCR’ 10, 7, 5, , 1, ’"C"’, ’CLASS’ 11, 8, 1, 20, 1, ’’, ’TAG1’ 12, 8, 3, 20, 1, ’’, ’SIZE1’ 13, 8, 4, 20, 1, ’’, ’RATING1’ 14, 8, 5, 20, 1, ’21’, ’FACING1’ 15, 8, 1, 19, 1, ’’, ’TAG2’ 16, 8, 3, 19, 1, ’F12’, ’SIZE2’ 17, 8, 4, 19, 1, ’F13’, ’RATING2’ 18, 8, 5, 19, 1, ’21’, ’FACING2’ 19, 8, 1, 18, 1, ’’, ’TAG3’ 20, 8, 3, 18, 1, ’’, ’SIZE3’ 21, 8, 4, 18, 1, ’’, ’RATING3’ 22, 8, 5, 18, 1, ’21’, ’FACING3’ 23, 8, 1, 17, 1, ’’, ’TAG4’ 24, 8, 3, 17, 1, ’F20’, ’SIZE4’ 25, 8, 4, 17, 1, ’F21’, ’RATING4’ 26, 8, 5, 17, 1, ’21’, ’FACING4’

 In the tutorial above, the default value for field 1 on the tutorial is 30 inches.

 Since the default value for field 3 is F2, your first input to field 2 is displayed in field 3 by the system.

 Since the second column is equal to 1 for fields 1 through 7, they are all linear dimension inputs. Your input into these fields is placed in variables DIMENSION_1 through

DIMENSION_7.

 Field 8 collects your equipment ID (equipment entity, attribute number 1). In general, it is easier to place the symbol if the equipment ID field is put directly on each tutorial.

 There is a set of four fields on the tutorial for each nozzle defined in the parametric (tag, size, rating, end prep). This is the minimum number of fields that can be present to allow complete definition of a nozzle. If you do not define the nozzle tag for a particular nozzle, then that nozzle will not be placed.

Nozzle tag numbers cannot be defaulted.

 Since there is no field on the tutorial that explicitly collects individual nozzle lengths, the symbol logic must calculate them.

 Each nozzle has a default end prep of 21 (nozzle entity, attribute number 5). This is a code-listed attribute in the database. The value 21 is the codelist value for a raised face. The default expression can also be entered as ’"RFFE"’, which is the codelist text for raised face end prep.

(22)

22

Plant Design System (PDS) Equipment Eden Interface

Forms Interface

Forms in equipment modeling serve to collect input via key-in fields or command buttons. They also provide feedback information to the user through message fields.

Input fields and application commands have unique identification numbers. These numbers are used with the tutorial definition table (TDF) to communicate to the software the use for each field or command. The data entered through the forms serves as the input that defines the values of the global variables used by the symbol processor. When a new equipment item is defined through Eden, a form has to be created to define the component's parameters. DBAccess is used to build forms.

(23)

Plant Design System (PDS) Equipment Eden Interface

23

S

E C T I O N

2

Eden is similar to the FORTRAN programming language. Therefore, the general rules for evaluating expressions in Eden are identical to those in FORTRAN.

You do not need to know FORTRAN to use the Eden language.

Eden definitions are usually simpler than FORTRAN programs. To use Eden, you must be able to visualize the symbol (in 3D) that you want to develop.

The Eden language structure incorporates:  Statements  Beginning  Ending  Variables  Local  Global  Keywords  Operators  Arithmetic  Relational  Logical  Expressions  Functions

 Primitives (or Subroutines)

Beginning Statements

Beginning statements define the types of modules being entered. Names within the single quotes must be all upper case.

SP - Symbol_Processor '6CHAR'

UF - User_Function_Definition '28CHAR'

Examples

Symbol_Processor 'A001'

User_Function_Definition 'A001_CHECK'

(24)

24

Plant Design System (PDS) Equipment Eden Interface

Ending Statements

Ending statements mark the end of the module in which the system has been processing. Ending statements in the symbol and subsymbol processor include:

Stop End

Ending statements in the user functions include: Return

End

Begin

The Begin primitive allows you to generate graphics for 2D shadow, envelopes, various light steel categories, and holes.

Syntax

Call Begin <category>

Options

category Keyword specifying the graphics category you want to place. Allowable category keywords for each class of graphics include:

Regular equipment graphics

EQUIPMENT This is executed at the beginning of symbol execution. It is needed if you have placed some other category and want to resume equipment graphics.

Interference envelope graphics

ENVELOPE_MAINTENANCE_HARD ENVELOPE_MAINTENANCE_SOFT ENVELOPE_ACCESS_HARD ENVELOPE_ACCESS_SOFT ENVELOPE_SAFETY_HARD ENVELOPE_SAFETY_SOFT ENVELOPE_CONSTRUCTION_HARD ENVELOPE_CONSTRUCTION_SOFT 2D footprint graphics SHADOW

Light steel graphics

LADDER PLATFORM HANDRAIL

MISCELLANEOUS

(25)

Plant Design System (PDS) Equipment Eden Interface

25

HOLE NOHOLE

The keywords HOLE and NOHOLE are different from other keywords in that they do not represent a separate category of graphics. You can include Begin(HOLE) within another Begin category. A Begin(HOLE) remains in effect across other Begin calls until a Begin(NOHOLE) is reached. Hole

graphics are given the level and symbology of holes.

Surface Type

SOLID SURFACE

The keywords SOLID and SURFACE set the active surface type of subsequent graphics. The default is SOLID. This results in capped surfaces. With the SURFACE keyword, you can place uncapped shapes such as open-ended cylinders.

Except for nozzles and placepoints, all graphics assume the level and symbology of the last executed Begin statement. Placepoints always belong to the equipment/parametric cell. If your symbol executes no EQUIPMENT category graphics, an otherwise empty parametric equipment cell is created for housing the placepoints.

A Begin statement can repeat itself any number of times. After execution, it becomes the active category for subsequent element placement calls. A (non-EQUIPMENT) Begin statement must be followed by at least one call to generate graphic elements; otherwise, that Begin statement will have no effect on symbol graphics.

Begin EQP Category

The Begin EQP Category primitive allows you to create graphics for various EQUIPMENT subcategories each having its own level and symbol.

Syntax

Begin_EQP_Category (subcategory)

Options

subcategory is a character string indicating the subcategory. There are presently 20 subcategories available. A valid subcategory must be one that has been defined via the Project Administrator Module. Alternatively, you can use one of the following:

’EQP_CATEGORY_1’, ’EQP_CATEGORY_2’, .. .. .. ’EQP_CATEGORY_20’

The argument is checked only when you place the symbol and not during compilation.

Restrictions

You can use this call only within the Begin (EQUIPMENT) call. Also, you cannot make this call when Draw Complex Surface or Start Complex Shape is in progress. By default, the Begin

(26)

26

Plant Design System (PDS) Equipment Eden Interface

(EQUIPMENT) and Begin EQP Category ('EQP_CATEGORY_1') calls are active when a symbol executes.

Example

 The following example is a valid code fragment: Call Begin (ENVELOPE_MAINTENANCE_HARD) .. ! place envelope graphics

..

Call Begin (EQUIPMENT) ! to set category next

Call Begin_EQP_Category ('PUMPS') ! 'PUMPS' must be a valid ! category for project

Call Draw_Complex_Surface (4, 0) .. ! pump graphics

..

Call Begin (HOLE) ! HOLE is allowed anywhere ..

..

Call Draw_Complex_Surface (-99, 0) ! end pump  The following example is not a valid code fragment:

Call Begin (LADDER)

Call Begin_EQP_Category ('PUMPS') ! Begin (EQUIPMENT) not active ..

..

 This example is not a valid code fragment: Call Draw_Complex_Surface (4, 0)

Call Begin_EQP_Category ('PUMPS') ! cannot change within surface

Variables

Variables in Eden can be either local or global. They can contain either numeric or alphanumeric data. Internally, numeric data is stored as REAL*8 (double precision). If a different data type is required in the context of an expression, then the conversion is performed at the time the expression is evaluated.

Variable names can be either upper or lower case. Symbols tend to be easier to read when you use all lower case for local symbols and all upper case for global symbols or vice versa.

Examples

 When converting a floating point number to an integer, the fractional part of the floating point number is truncated.

 A variable used in a logical expression evaluates to TRUE when the value of the variable is 1 and 0 when the logical value is FALSE.

 Variables that hold values representing distances are assumed to be in subunits. A variable containing the value 25 represents 25 inches in an English unit design file and 25 millimeters in a metric unit design file.

(27)

Plant Design System (PDS) Equipment Eden Interface

27

Local Variables

Local variables are user defined and declared in the symbol definition. You can refer to a local variable only when you are in the same module as the local variable.

Local variable names are formed using alphanumeric (a-z), numeric (1-9), and special (_ and $) characters. They must begin with an alphanumeric character and must be less than or equal to 31 characters in length.

The Eden compiler does not verify the spelling of local variables within call statements. It assumes a null value for the misspelled variable at component placement time.

The Eden language refers to constants as local variables. Both character strings and numeric constants are valid; however, character string constants must be surrounded by single quotes. In most cases, character strings and constants are case sensitive. Thus, a and A are interpreted differently.

Examples

diameter 13.25

shell_thickness 'A TEXT STRING' projection_1 radius [2]

25

Only in Pipe Support and Equipment Modeling can you declare local variable types. The variable types default to either CHARACTER or REAL depending on the context. To override this default, you can use a local variable type declaration statement anywhere before the variable(s) is (are) actually referenced. Variable types INT2, R8, and LOCATION are recognized by the compiler.

Example

In the following example, variables a, B, and C are declared as type short integers. They hold values ranging from -32767 to 32767.

Int2 a Int2 B, C

Example

In the example below, variable d is declared as a type REAL, capable of holding decimal fractional values. This is the usual default type for numeric variables. However, explicit typing to this category may be necessary to declare local arrays.

R8 d

As a recommendation, all declaration statements should be placed at the very beginning of the symbol code and not interspersed among statements to be executed during symbol placement. This improves program readability.

Also in Pipe Support and Equipment Modeling, referencing a variable using subscripts is extremely useful when coding repetitive statements such as the body of a loop. Prior to use, variables must appear in a type declaration in which its subscript or index range is also specified.

Example

In the example below, D is an array of 5 short integer variables stored contiguously. The individual elements are referenced as D[1], D[2], D[3], D[4], and D[5]. You can also use a variable or an arithmetic expression for indexing, such as D[i] where i is a value between 1 and 5, or D [i+1]

(28)

28

Plant Design System (PDS) Equipment Eden Interface

where i is a value between 0 and 4. INT2-typed variables are particularly useful in DO loops and array indexing where integral numbers are necessary and roundoffs must be avoided. They are also stored much more efficiently than REAL variables.

Int2 D[5], EF[6]

Example

Below, LENGTHS is an array of 10 REAL variables. They are referenced as LENGTHS [1] ... LENGTHS [10].

R8 LENGTHS [10]

Example

In the following example, PT is declared as a buffer with four locations. Location PT [12]

where

PT [1], PT [4], PT [7] PT [10] are x-coordinates PT [2], PT [5], PT [8] PT [11] are y-coordinates PT [3], PT [6], PT [9] PT [12] are z-coordinates

These variables provide alternate locations for the point values that you do not want to store in POINT_1 ... POINT_24... POINT [125]. You will also find them useful in accessing individual components of a location. (Refer to the REPLACEMENT STATEMENT section.)

Location PT [12]

An array-formatted variable may also be referenced without the index. In this case, the first element of the array is accessed. For example, PT and PT [1] are functionally the same in the above example.

Currently, only single expression subscripts (that is, single dimensioned arrays) are possible.

Global Variables Common to Piping, Equipment, and Pipe

Support Modeling

Global variables are system-defined names allowing you to refer to them at any subroutine level. More specifically, you can use them for passing values between subroutine levels or for

communicating input values to the symbol. The following list shows the global variables common to all Eden applications. Refer to the application-specific section for detailed information

concerning specific global variables.

Global variables are system-defined. You cannot declare global or subscripted global variables.

Input_n (Input_1 through Input_20) An array with up to 20 variables used to define the input parameters for table lookups. (Input_11 through Input_20 are specifically designed for user function arguments in equipment and pipe support modeling.)

Output_n (Output_1 through Output_20) An array with up to 20 variables where the results of the table lookup are stored. (Output_11 through Output_20 are specifically designed for user function return

(29)

Plant Design System (PDS) Equipment Eden Interface

29

Dimension_n (Dimension_1 through Dimension_100 for equipment and pipe supports, Dimension_1 through Dimension_20 for piping) General purpose variables used for communicating input to the symbol logic. You can also use these variables for passing values between subroutines or simply for local storage. (Dimension_20 is for angle; Dimension_1 through Dimension_19 is for linear piping.)

Pr_Rating_n Variable containing the current item pressure rating value. Nom_Pipe_D_n Variable containing the current item nominal pipe diameter. This

variable contains the nominal diameter in coded units. A special primitive is provided to help you convert from coded units to subunits.

Gen_Type_n Variable containing the current item end preparation generic type (BLT, MAL, FEM). This is a read-only variable.

Term_Type_n Variable containing the current item end preparation termination type (21, 22, and 23 will fall into Term_Type_1=20). This is a read-only variable.

Standard_Type Variable containing the current item standard type value. This is a read-only variable and is a function of TABLE_SUFFIX.

Global Variables Common to Equipment and Pipe Support

Modeling

The following list contains global variables common to Equipment and Pipe Support Modeling. For more information on global variables, refer to the System-defined Subroutines section and the

Eden User Interface section.

Point_n Point [n]

(Point_1 - Point_24) Names representing points that have been defined or saved for later use in a symbol definition. The n in [n] can be between 0 and 125.

Act_Lib Variable that contains an identifier for the active library of dimension tables. This is a read-only variable.

Cstring_n (Cstring_1 through Cstring_40) Names representing global character variables. Each name can contain a maximum of 50 characters.

Last_Inp_Type Last_Inp_Num

Refer to the Display_Tutorial primitive in the Eden Primitives section.

NPD_Unit_Type Contains the nominal piping diameter system of units defined for the model file. You can test this variable against the keywords ENGLISH and METRIC. This is a read-only variable.

(30)

30

Plant Design System (PDS) Equipment Eden Interface

Global Variables (EQP Specific)

The following list contains global variables specific to Equipment Modeling. For more information on global variables, refer to the System-defined Subroutines section and the Eden User Interface section.

PP_Location_n (PP_Location_1 - PP_Location_10) Names representing the point locations that have been defined as place points in the course of a symbol definition.

End_Prep Variable containing the current nozzle end preparation value. Noz_Length1 Variable containing the current nozzle length value. This variable

applies to type 2 and 3 nozzles only. For type 3, the length is from the end of the nozzle connected to the vessel to the centerline of the bend.

Noz_Length2 Variable containing the current second nozzle length value. This variable applies to type 3 nozzles only and measures the length from the face of the nozzle to the centerline of the bend. Noz_Radius Variable containing the current nozzle bend radius. Applies to

type 3 nozzles only.

Table_Suffix Variable containing the current nozzle table suffix value. PP_Primary_n (PP_Primary_1 through PP_Primary_10) Names representing

orientation of primary axes for place points defined during symbol placement.

PP_Secondary_n (PP_Secondary_1 through PP_Secondary_10) Names representing orientation of secondary axes for place points defined during symbol placement.

PP_Normal_n (PP_Normal_1 through PP_Normal_10) Names representing orientation of normal axes for place points defined during symbol placement.

Subscripted Global Variables

In Equipment and Pipe Support Modeling, a global variable can contain an index value as part of the variable name even though the index value is not a variable. This is known as subscripted global variables. For example, Dimension_10 and Point_3 are global variables whose index values are 10 and 3, respectively.

You can reference the same location using subscripted global variables, which contain an index either as a variable or as an expression. For example, Dimension [10] and Point [3] are

subscripted global variables whose index values are 10 and 3, respectively. They are equivalent to Dimension_10 and Point_3. Subscripted global variables are useful when using loops. Below is a list comparing the two methods of accessing global variables with indexes:

Subscripted Global Variable (variable index)

Global Variable with non-variable index

cstring [1] ... cstring [40] cstring_1 ... cstring_40

(31)

Plant Design System (PDS) Equipment Eden Interface

31

dp [1] ... dp [30] dp1 ... dp30

inputs [1] ... inputs [20] input_1 ... input_20 outputs [1] ... outputs [20] output_1 ... output_20

pp [1] ... pp [10] pp1 ... pp10

point [0] ... point [125]

(point [0] ... point [24] point_0 ... point_24)

pp_primary [1] ... pp_primary [10] pp_primary_1 ...pp_primary_10 pp_secondary [1] ... pp_secondary [10] pp_secondary_1 ...pp_secondary_10 pp_normal [1] ... pp_normal [10] pp_normal_1 ... pp_normal_10 pp_location [1] ... pp_location [10] pp_location_1 ...pp_location_10

A global variable referenced without a subscript causes the first element to be accessed. Thus, Point and Point [0], Dimension and Dimension_1 are functionally equivalent.

Common Keywords

Eden uses keywords for labeling specific values or groups of values. All keywords except TRUE and FALSE can appear as arguments in system-defined primitives (or subroutines). Keywords can be upper or lower case. For consistency, this reference guide displays keywords in upper case.

TRUE Logical true. Used in logical expressions.

FALSE Logical false. Used in logical expressions. MALE

FEMALE BOLTED

Keywords for generic end preparation.

PRIMARY SECONDARY NORMAL

Keywords used to identify or refer to individual refresh tee axes.

ENGLISH METRIC

Names used to define the units of a constant used in the symbol definition.

ACTIVE_POINT POINT_0

Name representing the location of the active point in the local coordinate system defined by the symbol. These names can be used interchangeably. EAST WEST NORTH SOUTH UP DOWN

Keywords used to define directions in the local coordinate system defined by the symbol definition.

PP1 - PP10 Names representing symbol place point locations and

orientations. A maximum of 10 place points can be defined for 1 symbol.

(32)

32

Plant Design System (PDS) Equipment Eden Interface

DP1 - DP30 Names representing equipment datum point locations and orientations.

SYMBOL_PROCESSO R

Module type of all equipment modeling Eden definitions. It is used in the first statement of a symbol definition.

ENG_COMM_LIB EQP_TABLES

Names representing the different libraries that can be made active in a symbol definition.

RETURN STOP

Terminates module execution normally. If it encounters either a RETURN or STOP in a user function, the system returns control to the calling module.

END Must be the last line in the symbol source code. If execution reaches the END statement, an implicit STOP is executed.

There are other keywords primarily used in specific subroutine calls. These keywords can be found in the subsections that describe their associated primitives. Keywords APPLICATION_CMD and USER_KEYIN are described under the DISPLAY_TUTORIAL primitive. Keywords such as PT_BORE and COG_TYPE are explained under the GET_POINT and PLACE_COG primitives, respectively.

TYPE Statement

TYPE statements allow you to assign up to 150 labels or types to a symbol. The syntax for the TYPE statement is:

#TYPE = Type 1, Type 2, Type 3, ... , Type n where

Type 1 ... Type n Labels representing types under which the symbol will be classified.

Using each type, you can later inquire on the symbol. (Refer to the PDS Equipment Modeling

(PD_EQP) Reference Guide for information on Parametric Help.)

A type label can be up to 28 characters long. The compiler automatically left justifies each type and converts it to upper case. You can enter any number of complete type labels that fit in a line. Multiple TYPE statements are allowed. A TYPE statement can appear anywhere in the source code; however, the # character must appear in column 1.

Example

The following TYPE statement appears in the code for a multi-diameter vertical vessel supported on skirt.

#TYPE = tower, vertical vessel, drum, reactor

DESCRIPTION Statement

The DESCRIPTION statement assigns a descriptive phrase of up to 40 characters to the symbol. This description appears next to the symbol name when you inquire on the symbol library from the PDS Equipment Task. (See the PDS Equipment Modeling (PD_EQP) Reference Guide for information on Parametric Help.)

The syntax for the DESCRIPTION statement is: #DESC = This is a description

(33)

Plant Design System (PDS) Equipment Eden Interface

33

A DESCRIPTION statement can appear anywhere in the symbol code. The description string is placed left justified by the compiler. When more than one DESCRIPTION statement appears, only the last statement is used. The # character must appear in column one.

Comments

When you place an exclamation point (!) anywhere in an Equipment Modeling source line, the remainder of that line is treated as a comment.

Example

Call define_placepoint (PP1, POINT_1) ! POINT_1 is used to

! define place point 1

Operators

Operators are used in conjunction with variables to form expressions. As in FORTRAN, operators can be any one of three types:

1. Arithmetic 2. Relational 3. Logical

Arithmetic Operators

Arithmetic operators are used to form arithmetic expressions. These operators follow the mathematical conventions. Valid arithmetic operators include:

+ addition - subtraction * multiplication / division ** exponentiation // concatenation using '_'

|| concatenation without using '_'

The first five operators (+, -, *, /, **) can only be used with numeric local and global variables. The concatenation operators (// , || ) can be used with both numeric and string variables.

The concatenation operator // is used primarily to form table names. It joins two variables together with an underbar (_) character. The result is a text string.

Example

'ABC' // 'DEF' produces

'ABC_DEF'

When using the concatenation operation, real numbers are converted to integers (that is, truncated), then converted to character strings and finally joined together with the underbar character. The concatenation operation is generally used to form messages and character field outputs.

(34)

34

Plant Design System (PDS) Equipment Eden Interface

Relational Operators

Relational operators are used to form relational expressions that test the value of an Eden expression or establish conditions under which a group of Eden statements can be executed. Valid relational operators include:

.EQ. equal to .NE. not equal to

.GE. greater than or equal to .GT. greater than

.LE. less than or equal to .LT. less than

Periods must appear before and after the expression.

Relational operators can be used on both numeric and character string variables. However, mixing the two types of operands for a given operation produces computing errors.

In character relational expressions, less than means precedes in the ASCII collating sequence, and greater than means follows in the ASCII collating sequence.

'ABCD' .LT. 'ACCD'

If two strings in a relational expression are not the same length, the shorter one is padded on the right with spaces until the lengths are equal.

'PQRSTU' .EQ. 'PQR ' 'PQRSTU' .EQ. 'PQR '

Logical Operators

Logical operators are used to combine relational expressions into more complex logical expressions. Valid logical operators include:

.OR. logical or .AND. logical and

Periods must appear before and after the expression.

Expressions

Expressions are variables, constants, and operators combined to make statements. The format of most Eden expressions is the same as in FORTRAN. Valid expressions include:

Replacement simple arithmetic replacement Call executes primitives or subroutines

Do while execute loop

Indexed Do execute loop

(35)

Plant Design System (PDS) Equipment Eden Interface

35

For every IF statement, there must be an ENDIF statement to end the expression. You can nest up to five If-then-else expressions within an Eden module.

For the Replacement, Do while, and If-then-else expressions, you can use parentheses to alter the precedence of calculation.

Replacement Statements

Replacement statements are used to set variables or perform calculations. The following list illustrates the various Replacement statements:

thickness = 25.

vessel_od = DIMENSION_1 test = test + 1

tutor_name = 'EXCH1'

table_name = 'BLT' // GEN_TYPE // PR_RATING // '5' dim_a = (dim_b + dim_c) * 2. + dim_d

In Equipment and Pipe Support Modeling, all three components of a point (or location variable) can be replaced by another point value with one assignment statement.

Example

In the following example, PT is declared as a buffer of three points. The second statement saves pt [4], pt [5], pt [6] into global location Point_5. In the third statement, the location value stored in point [2] is saved in a PT buffer, the x-coordinate being assigned to pt [7], y to pt [8], and so forth. Likewise, in the last statement, the POINT_3 components are replaced by those of Point_4 in one aggregate operation. Location pt [9] . . point [5] = pt [4] . . pt [7] = point_2 . . point_3 = point [4]

Call Statement

Call statements are used to execute system primitives. The syntax for the Call statement is: call "primitive" or "subroutine" (argument 1, argument 2, ...)

Example

Call Place_Cylinder_With_Capped_Ends (diameter, length) Call Define_Placepoint (PP1)

(36)

36

Plant Design System (PDS) Equipment Eden Interface

Do While Statement

The Do While statement is used to form indefinite loops. The condition of a Do While statement must equal a logical value (either true or false). The body of the Do While statement will be repeatedly executed as long as the logical expression remains true.

Example

The following Do While loop places four cylinders end to end. The pretested loop condition fails on the fifth try (if i equals 4), and control transfers to the message display routine.

i = 0

do while (i .LT. 4) i = i + 1

Call Draw_Cylinder_With_Capped_Ends (diam, leng) enddo

Call Display_Message ('Out of loop now')

Indexed Do Statement

The Indexed Do statement allows you to form loops that execute a specified number of times. This number is determined by an initial, a terminal, and an incremental parameter of a control variable. The syntax for the Indexed Do statement is:

do V = v1, v2, v3 . . . enddo where

V is a control variable (non-string type)

v1 v2 v3

are constants or variables that evaluate to the initial, terminal, and incremental parameters respectively. v3 is optional. If v3 is omitted, the system assumes that the incremental parameter is one.

V3 cannot be negative.

Example

In this example, I is set to 1. The body of the loop is then executed. I increments by 2 each time the cycle is complete, and the value 3 is checked against the terminator 20. The iteration continues as long as I is less than or equal to 20. When the iteration is greater than 20, the loop ends. do I = 1, 20, 2

. . . enddo

(37)

Plant Design System (PDS) Equipment Eden Interface

37

If - then - else Statement

If - then - else statements are used when a group of statements is to be conditionally executed. The Eden syntax is the same as FORTRAN syntax.

if (condition) then . . . else . . . endif

Example

if (DIMENSION_1 .gt. 24.) then thk = thk + .125 else thk = thk + .250 endif

An If statement of the form if (condition) is not valid. In Eden, all If statements must be of the form If (condition) then. The else statement is optional.

Functions

Eden provides several functions for performing common mathematical operations. These functions can be used within replacement statements.

The following functions must contain the parentheses. DSQRT () square root

DABS () absolute value

DSINR () sine of an angle in radians DCOSR () cosine of an angle in radians DTANR () tangent of angle in radians DSIND () sine of an angle in degrees DCOSD () cosine of an angle in degrees DTAND () tangent of an angle in degrees DASINR () arcsine returned in radians DACOSR () arccosine returned in radians DATANR () arctangent returned in radians DASIND () arcsine returned in degrees DACOSD () arccosine returned in degrees DATAND () arctangent returned in degrees

Example

The following list illustrates a few possible Eden functions: length = hypot * DSIND (30.)

(38)

38

Plant Design System (PDS) Equipment Eden Interface

side = DTANR (pi/2) + 32. hypot = DSQRT (a**2 + b**2) angle = DATAND (side1/side2)

Primitives

Primitives are system-defined routines that perform specific functions for symbol definition.

Convert NPD to Subunits (on page 40) Define Active Orientation (on page 40) Draw Cone (on page 41)

Draw Cylinder (on page 42) Draw Eccentric Cone (on page 43) Draw Projected Rectangle (on page 44) Draw Projected Triangle (on page 45) Draw Semi-Ellipsoid (on page 46) Draw Sphere (on page 47) Draw Torus (on page 47) Abort (on page 48) Convert Unit (on page 48) Define Active Point (on page 49) Define Datum Point (on page 49) Define Library (on page 50) Define Nozzle (on page 51)

Define Orientation By Points (on page 52) Define Placepoint (on page 53)

Define Point (on page 54) Display Message (on page 55) Display Tutorial (on page 55) Draw Arc (on page 57)

Draw Complex Surface (on page 58) Draw Con Prism (on page 60) Draw Curve (on page 61) Draw Ecc Prism (on page 61)

Draw Ecc Transitional Element (on page 62) Draw Ellipse (on page 63)

Draw Line (on page 64) Draw Line String (on page 64)

Draw Projected Hexagon (see "Draw Proj Hexagon" on page 65) Draw Projected Octagon (see "Draw Proj Octagon" on page 66) Draw Projected Shape (see "Draw Proj Shape" on page 67) Draw Rectangular Torus (on page 68)

Draw Revolved Shape (on page 69) Draw Shape (on page 70)

(39)

Plant Design System (PDS) Equipment Eden Interface

39

Draw Transitional Element (on page 71) Get Arc Points (on page 71)

Get Arc Size (on page 72) Get Date (on page 73)

Get Equipment Category (see "Get EQP Category" on page 73) Get Line Size (on page 74)

Get Point (on page 74) Move Along Arc (on page 76) Move Along Axis (on page 77) Move Along Line (on page 77) Move By Distance (on page 78) Move Data (on page 79)

Move To Placepoint (on page 79) Place COG (on page 80)

Position Cursor (on page 81) Put Field (on page 81) Read Table (on page 82)

Retrieve Nozzle Parameters (on page 83) Rotate Orientation (on page 84)

Start Complex Shape (on page 84) Stop Complex Shape (on page 85) Store Orientation (on page 86)

Store Nozzle Parameters (on page 86) User Function (on page 87)

User Function FLAT_OVAL_PRISM (on page 88) User Function FLAT_OVAL_TOR (on page 89) User Function FLAT_OVAL_SEG_TOR1 (on page 90) User Function FLAT_OVAL_SEG_TOR2 (on page 91) User Function ROUND_SEG_TOR1 (on page 92) User Function ROUND_SEG_TOR2 (on page 93) User Function RECT_SEG_TOR (on page 94) User Function RECT_FLAT_OVAL (on page 95) User Function ROUND_RECT (on page 96)

(40)

40

Plant Design System (PDS) Equipment Eden Interface

Convert NPD to Subunits

The Convert NPD to Subunits primitive converts the coded input value and returns its Real*8 equivalent. This primitive is often used for converting the nominal piping diameter that is stored in the database.

Metric files base the diameter in millimeters. Imperial files store the nominal piping diameter as NPD 1/32 + 5000. Thus,

1 inch NPD is 5000 + 32 * 1 = 5032 20 inch NPD is 5000 + 32 * 20 = 5640

For Eden symbols in Piping that use imperial and metric files, hard-coding the dimensions is not recommended. A dimension entered as 5 inches and placed in an Imperial file is interpreted as 5 inches. However, the same value placed in a Metric file is interpreted as 5 millimeters. Instead of hard coding, load the dimensions in a table to allow the piping software to convert the dimensions to the correct values.

This primitive does not perform unit conversions. If American standard pipe sizes are being used in a Metric file, this primitive will return the NPD in inches.

Syntax

Call Convert_NPD_To_Subunits (coded_input, npd)

Options

coded_input The nominal pipe diameter in internal or coded units. This variable must be the keyword Nom_Pipe_D_n.

npd The nominal piping diameter in subunits.

Examples

In this example, the Real*8 equivalence of the coded NPD in Nom_Pipe_D_1 is returned in Pipe_Dia_1.

Call Convert_NPD_To_Subunits (Nom_Pipe_D_1, pipe_dia_1)

All NPDs used internally in the software are in encoded form. Most table lookups based on NPDs require the input to be in encoded form. However, if a nozzle size is needed in a calculation, it must be converted from internal units to subunits.

Define Active Orientation

The Define Active Orientation primitive allows you to define the active orientation by specifying the directions of the primary and secondary axes. The orientation is defined in the local coordinate system by the symbol. This definition has no bearing on the design file coordinate system. In Piping, this primitive defines the current flow centerline and a direction that is normal to the flow centerline in terms of the connect point orientation (defined by the symbol's connect point geometry) in order to place graphic shapes.

(41)

Plant Design System (PDS) Equipment Eden Interface

41

Specific keywords are available for specifying either the primary axis or the secondary axis of the connect point's orientation.

Syntax

Call Define_Active_Orientation (primary, secondary)

Options

primary Variable that defines the flow centerline or primary direction. secondary Variable that defines the line perpendicular to the flow centerline or

secondary direction.

Valid keywords for the primary and secondary variables include:

EAST PP_PRIMARY_n WEST PP_SECONDARY_n NORTH PP_NORMAL_n SOUTH PRIMARY UP SECONDARY DOWN NORMAL

For the Equipment Modeling keywords, you must define n using the Define Placepoint primitive before using any of the PP keywords.

If the initial active orientation for a symbol definition has the primary pointing east and the secondary pointing north, the normal axis of the active orientation would be up. (Normal axis can be found using the right-hand rule.)

Example

In the following example, the primary orientation is set to point west, and the secondary orientation is set to point down:

Call Define_Active_Orientation (WEST,DOWN)

Draw Cone

The Draw Cone primitive places a cone where the first end is at the current active point and the second end is at a location computed by the system given the input length along the primary axis. You must define the diameters of each end of the cone with separate variables.

Syntax

References

Related documents

null hypothesis that there is no statistically significant relationship between the degree of effectiveness internal control systems in the private sector hospitals and the size of

They made of terms, and define norms for humans, or woody fibers that includes the term matches and transport protein electrophoresis the.. Why do i need, antibodies travel around

Sometimes even if you need successful sales, marketing association and sales volume can define the term sales team, the companies in the other information compared with the time..

Activities sponsored by an individual, group, organization or agency that provides an opportunity for students to participate in a program that is not currently available in

regVal = DDR_PHY_CTRL1_VALUE(emifPhyReadLatency, emifPhyFastDllLock, regVal = DDR_PHY_CTRL1_VALUE(emifPhyReadLatency, emifPhyFastDllLock,

Retirement is defined in immigration terms than immigrated to immigrate to leave home office on a term economic impact are termed?. primary

During this type requires a term, defined if you define the terms first defining one vector and defines a word vectors are usually in this is?. The suspend has lost velocity vector

The term constituency is commonly used to long to an electoral district found in British English but it can also due to salt body and eligible voters or taken the residents of