注册表(Registry)

用Windows系统提供的注册表编辑器regedit.exe来认识登录数据库(Registry)。

1、Key和SubKey

注册表编辑器运行时我们可以看到它的窗口结构和资源管理器很像,左边窗格的每个文件夹图标表示一个Key。Key下面还有Subkey。我们习惯上采用文件夹的路径表示法。e.g:HKEY_LOCAL_MACHINE底下的”Software”Subkey表示成HKEY_LOCAL_MACHINE\Software。

2、Value、Value Name、Value Data和Default Value

用Regedit.exe打开HKEY_CLASSES_ROOT\.txt这个Key,在右窗格中显示的是Key的Value,Value可能有很多,对某个特定的Value来将,它有两个属性–Value Name和Value Data,如在此例中,HKEY_CLASSES_ROOT\.txt有一个Value–>”Content Type”,这个Value的Value Name为”Content Type”,Value Data为”text/plain”,某些Key,还有缺省Value–Default Value,如此例中,HKEY_CLASSES_ROOT\.txt这个Key的Default Value就是我们看到的”默认”[Value Name],”txtfile”[Value Data]。

3、存取Registry,先取Key Handle

在了解了Registry的结构之后,接下来的事就是如何存取它了。就像我们存取文件必须指明文件的存取路径[目录]一样,存取Registry必须先指明Key.Key在Regedit.exe中看到的是一长串的字符串,例如: “HKEY_LOCAL_MACHINE\Software\Microsoft\Windows”,

但在Windows内部,每个Key都对应一个Key Handle(等于一个长整数值,程序中通常以hKey表示),Windows之所以要用hkey来代表Key是为了让Registry的存取更有效率,因为整数的操作功能优于字符串,所以我们的首要任务就是取得Key的Key Handle(hKey)取得最上层的hKey。首先是位于最上层的Key,这些Key的hKey是固定不变的,其值如下表所示。

Key hKey(Key Handle)

HKEY_CLASSES_ROOT &H80000000

HKEY_CURRENT_USER &H80000001

HKEY_LOCAL_MACHINE &H80000002

HKEY_USERS &H80000003

HKEY_CURRENT_CONFIG &H80000005

HKEY_DYN_DATA &H80000006

如果想取得上述几个Key的SubKey Handle,可以调用RegOpenKey这个API函数。其详细描述如下:

VB声明 Declare Function RegOpenKey Lib “advapi32.dll” Alias “RegOpenKeyA”

(ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long

参数类型及说明:

hKey:Key Handle

lpSubKey:SubKey名称或路径

phkResult:若RegOpenKey执行成功,则这一参数返回Subkey的hKey.

返回值: =0,表示成功;≠0,表示失败。[注意这一点与别的API函数不太一样]

调用例:

Dim ret As Long, hKey As Long, hKey2 As Long

‘取得”HKEY_LOCAL_MACHINE”底下的”SOFTWARE\Microsoft”这个SubKey Handle.

ret = RegOpenKey(HKEY_LOCAL_MACHINE, “SOFTWARE\Microsoft”, hKey)

If ret = 0 Then ‘If Success

MsgBox “HKLM\SOFTWARE\Microsoft = ” & hKey

End If

‘继续以刚才所取得的”HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft”hKey为参数,再取得它的’SubKey”Windows\CurrentVersion”的handle。

ret = RegOpenKey(hKey, “Windows\CurrentVersion”, hKey2)

If ret = 0 Then

MsgBox “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion = ” & hKey2

End If

相关的两个API函数是:RegCreateKey[建立SubKey]和RegClose[关闭SubKey]

详细说明:

RegCreateKey函数:

VB声明 Declare Function RegCreateKey Lib “advapi32.dll” Alias “RegCreateKeyA”

(ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long

它的参数用法与RegOpenKey一样。所不同的是RegOpenKey只能打开已经有的SubKey,而RegCreateKey则可以建立SubKey,比较特别的是,如果调用RegCreateKey所建立的SubKey是一个已经存在的SubKey,则它的功能和RegOpenKey相同。由于RegCreateKey的这种特性,有的程序员干脆不用RegOpenKey,而用RegCreateKey来统一代替RegOpenKey。

RegClose函数:

Declare Function RegCloseKey Lib “advapi32.dll” (ByVal hKey As Long) As Long

当我们不再存取Registry时,将打开或建立的SubKey关闭是一个比较好的习惯,就正如我们在使用C语言的文件打开函数后必须要关闭一样。

二十四史简介——新唐书

《新唐书》二百二十五卷,包括本纪十卷,志五十卷,表十五卷,列传一百五十卷。
宋仁宗认为《唐书》浅陋,下诏重修。前后参预其事的有欧阳修、宋祁、范镇、吕夏卿、王畴、宋敏求、刘羲叟等人。其中列传主要由宋祁负责,本纪、志、表主要由欧阳修负责,所以《新唐书》署“欧阳修、宋祁撰”。宋祁有文名,曾任知制诰、翰林学士等职。他历时十余年完成列传,于嘉三年(公元1058年)交齐全部列传的稿子。欧阳修是北宋著名的文学家,擅长古文,他因参加推行“庆历新政”的活动,被贬为地方官,至至和元年(公元1054年)才调到朝廷任翰林学士,主持修史工作,等到他写定本纪、志、表,已是嘉五年(公元1060年)的事了。列传与本纪、志、表合在一起时,并没有经过严格的整齐划一。
《新唐书》比起《旧唐书》来,确有自己的一些特点和优点。首先,《新唐书》的作者对志下了一番功夫,增加了以前各史所没有的《仪卫志》、《兵志》。其他几个志也各增补了新资料,质量多在《旧唐书》之上。

正则表达式(Regular Express)

  正则表达式是一种可以用于模式匹配和替换的强有力的工具,在几乎所有的基于UNIX系统的工具中找到正则表达式的身影,例如,vi编辑器,Perl或PHP脚本语言,以及awk或sed shell程序等。此外,象Javascript、VBScript等客户端的脚本语言也提供了对正则表达式的支持。由此可见,正则表达式已经超出了某种语言或某个系统的局限,成为人们广为接受的概念和功能。

  正则表达式可以让用户通过使用一系列的特殊字符构建匹配模式,然后把匹配模式与数据文件、程序输入以及WEB页面的表单输入等目标对象进行比较,根据比较对象中是否包含匹配模式,执行相应的程序。

  举例来说,正则表达式的一个最为普遍的应用就是用于验证用户在线输入的邮件地址的格式是否正确。如果通过正则表达式验证用户邮件地址的格式正确,用户所填写的表单信息将会被正常处理;反之,如果用户输入的邮件地址与正则表达的模式不匹配,将会弹出提示信息,要求用户重新输入正确的邮件地址。由此可见正则表达式在WEB应用的逻辑判断中具有举足轻重的作用。

    基本语法

  在对正则表达式的功能和作用有了初步的了解之后,接下来具体看一下正则表达式的语法格式。

  正则表达式的形式一般如下:

  /love/

  其中位于“/”定界符之间的部分就是将要在目标对象中进行匹配的模式。用户只要把希望查找匹配对象的模式内容放入“/”定界符之间即可。为了能够使用户更加灵活的定制模式内容,正则表达式提供了专门的“元字符”。所谓元字符就是指那些在正则表达式中具有特殊意义的专用字符,可以用来规定其前导字符(即位于元字符前面的字符)在目标对象中的出现模式。

  较为常用的元字符包括: “+”, “*”,以及 “?”。其中,“+”元字符规定其前导字符必须在目标对象中连续出现一次或多次,“*”元字符规定其前导字符必须在目标对象中出现零次或连续多次,而“?”元字符规定其前导对象必须在目标对象中连续出现零次或一次。

  下面介绍正则表达式元字符的具体应用。

  /fo+/

  因为上述正则表达式中包含“+”元字符,表示可以与目标对象中的 “fool”, “fo”, 或者 “football”等在字母f后面连续出现一个或多个字母o的字符串相匹配。

  /eg*/

  因为上述正则表达式中包含“*”元字符,表示可以与目标对象中的 “easy”, “ego”, 或者 “egg”等在字母e后面连续出现零个或多个字母g的字符串相匹配。

  /Wil?/

  因为上述正则表达式中包含“?”元字符,表示可以与目标对象中的 “Win”, 或者 “Wilson”,等在字母i后面连续出现零个或一个字母l的字符串相匹配。

  除了元字符之外,用户还可以精确指定模式在匹配对象中出现的频率。例如,

  /jim{2,6}/

  上述正则表达式规定字符m可以在匹配对象中连续出现2-6次,因此,上述正则表达式可以同jimmy或jimmmmmy等字符串相匹配。

  在对如何使用正则表达式有了初步了解之后,我们来看一下其它几个重要的元字符的使用方式。

  \s:用于匹配单个空格符,包括tab键和换行符;

  \S:用于匹配除单个空格符之外的所有字符;

  \d:用于匹配从0到9的数字;

  \w:用于匹配字母,数字或下划线字符;

  \W:用于匹配所有与\w不匹配的字符;

  . :用于匹配除换行符之外的所有字符。

  (说明:我们可以把\s和\S以及\w和\W看作互为逆运算)

  下面,我们就通过实例看一下如何在正则表达式中使用上述元字符。

  /\s+/

  上述正则表达式可以用于匹配目标对象中的一个或多个空格字符。

  /\d000/

  如果手中有一份复杂的财务报表,那么就可以通过上述正则表达式轻而易举的查找到所有总额达千元的款项。

  除了以上所介绍的元字符之外,正则表达式中还具有另外一种较为独特的专用字符,即定位符。定位符用于规定匹配模式在目标对象中的出现位置。

  较为常用的定位符包括: “^”, “$”, “\b” 以及 “\B”。其中,“^”定位符规定匹配模式必须出现在目标字符串的开头,“$”定位符规定匹配模式必须出现在目标对象的结尾,\b定位符规定匹配模式必须出现在目标字符串的开头或结尾的两个边界之一,而“\B”定位符则规定匹配对象必须位于目标字符串的开头和结尾两个边界之内,即匹配对象既不能作为目标字符串的开头,也不能作为目标字符串的结尾。同样,我们也可以把“^”和“$”以及“\b”和“\B”看作是互为逆运算的两组定位符。举例来说:

  /^hell/

  因为上述正则表达式中包含“^”定位符,所以可以与目标对象中以 “hell”, “hello”或 “hellhound”开头的字符串相匹配。

  /ar$/

  因为上述正则表达式中包含“$”定位符,所以可以与目标对象中以 “car”, “bar”或 “ar” 结尾的字符串相匹配。

  /\bbom/

  因为上述正则表达式模式以“\b”定位符开头,所以可以与目标对象中以 “bomb”, 或 “bom”开头的字符串相匹配。

  /man\b/

  因为上述正则表达式模式以“\b”定位符结尾,所以可以与目标对象中以 “human”, “woman”或 “man”结尾的字符串相匹配。

  为了能够方便用户更加灵活的设定匹配模式,正则表达式允许使用者在匹配模式中指定某一个范围而不局限于具体的字符。例如:

  /[A-Z]/

  上述正则表达式将会与从A到Z范围内任何一个大写字母相匹配。

  /[a-z]/

  上述正则表达式将会与从a到z范围内任何一个小写字母相匹配。

  /[0-9]/

  上述正则表达式将会与从0到9范围内任何一个数字相匹配。

  /([a-z][A-Z][0-9])+/

  上述正则表达式将会与任何由字母和数字组成的字符串,如 “aB0” 等相匹配。这里需要提醒用户注意的一点就是可以在正则表达式中使用 “()” 把字符串组合在一起。“()”符号包含的内容必须同时出现在目标对象中。因此,上述正则表达式将无法与诸如 “abc”等的字符串匹配,因为“abc”中的最后一个字符为字母而非数字。

  如果我们希望在正则表达式中实现类似编程逻辑中的“或”运算,在多个不同的模式中任选一个进行匹配的话,可以使用管道符 “|”。例如:

  /to|too|2/

  上述正则表达式将会与目标对象中的 “to”, “too”, 或 “2” 相匹配。

  正则表达式中还有一个较为常用的运算符,即否定符 “[^]”。与我们前文所介绍的定位符 “^” 不同,否定符 “[^]”规定目标对象中不能存在模式中所规定的字符串。例如:

  /[^A-C]/

  上述字符串将会与目标对象中除A,B,和C之外的任何字符相匹配。一般来说,当“^”出现在 “[]”内时就被视做否定运算符;而当“^”位于“[]”之外,或没有“[]”时,则应当被视做定位符。

  最后,当用户需要在正则表达式的模式中加入元字符,并查找其匹配对象时,可以使用转义符“\”。例如:

  /Th\*/

  上述正则表达式将会与目标对象中的“Th*”而非“The”等相匹配。

二十四史简介——旧唐书

《旧唐书》记事公元618–907年的唐代史实。五代后晋时官修的《旧唐书》,是现存最早的系统记录唐代历史的一部史籍。它原名《唐书》,宋代欧阳修、宋祁等编写的《新唐书》问世后,才改称《旧唐书》。《旧唐书》共二百卷,包括本纪二十卷,志三十卷,列传一百五十卷。
后晋高祖天福六年(公元941年),石敬瑭命修唐史,由当时的宰相赵莹负责监修。赵莹立即组成修纂班子,到出帝开运二年(公元945年),全书修成,历时仅四年多。
《旧唐书》的作者去唐不远,有条件接触到大量的唐代史料,所以能在短短的四年多时间里修成这样一部二百卷的大书。
但是,由于肃宗以后的国史尚未编出,宣宗以后的实录也未修成,所以《旧唐书》的作者在修《旧唐书》时,唐代晚期的史料相当缺乏。虽然作者曾做过不少搜集史料的工作,但由于成书仓促,所以对于唐代晚期史事的记述,仍显得粗糙,在材料的占有与剪裁、体例的完整、文字的简洁等方面,都存在不少缺点。
《新唐书》行世后,《旧唐书》在很长一段时间里几乎被人们废弃。
等到明朝嘉靖十七年(公元1538年)闻人诠等重新刊印后,才又广泛流传开来。《旧唐书》传布过程中的兴衰,既反映了它的缺点,也说明它有自己的长处,非《新唐书》所能取而代之。

The Workflow for Detailed Design Phase

Introduction

This workflow is a good practice guidance to Engineering Managers and supporting personnel for the delivery of technical integrity. It is an ‘aide-memoir’ that highlights the key deliverables and activities throughout the lifecycle of a typical Detailed Design project.

Detailed Design is broken into seven phases:

Phase 1: Scope Definition and Engineering Execution Strategy

Phase 2: Commencement of Detailed Design

Phase 3: Initial Design Development and Hazard Identification

Phase 4: Initial Design Review & Audit

Phase 5: Approval for Design (AFD)

Phase 6: Approval for Construction (AFC)

Phase 7: Design Close-Out

The workflow shown in the follow Road Map illustrates the execution sequence on a generic Detail Design Project. The vertical columns show activities that can be undertaken concurrently whilst the sequential flow of work is across the Road Map. As the deliverables and activities in each phase are completed, work can transition into the next phase.

Situations will arise when work will need to be be done out of sequence, typically to meet a demanding project schedule. Use of the workflow allows the risks of out-of-sequence working to be identified and the necessary mitigation strategies to be put in place.

HBP’s corporate governance and assurance of Engineering will measure compliance with the workflow and ensure out-of-phase working is being identified and managed. This document contains a copy of the Detail Design Workflow Road Map and includes detailed descriptions of the activities, the key engineering disciplines and supporting documentation.
Phase 1: Scope Definition and Engineering Execution Strategy

Preparation for commencement of detail design. To evaluate FEED deliverables to ensure engineering is sufficiently mature for detail design to progress in a controlled and minimal change environment. To confirm Engineering Execution Plan.

 Activities / DeliverablesDescriptionKey DisciplineSupporting Documentation
1Engineering Execution StrategyReview / confirm Engineering Execution Strategy, e.g. execution locations, workshare, disciplines required, specialist support, etc.Project Manager and Project Engineering ManagerTender documentation, Project Execution Plan (PEP)
2Feed / BoD ValidationConfirm maturity of Front End Engineering Design. Identify any areas of concern and ensure these are captured on the Technical Risk Register.Project Engineering  Manager 
3Project Baseline StandardsEstablish which codes, standards and specifications are to be utilised, eg. Corporate, project, client, and confirm procedure. Include in Engineering Execution Plan and / or Discipline Job Design Specifications.Project Engineering  ManagerEngineering Baseline Standards, Document No. (DOCUMENT CODE)
4Engineering Audit ScheduleCreate formal schedule to identify when technical integrity audits, design reviews, HAZIDS, HAZOPS, etc are to be carried out. Align to Level 3 Engineering Plan and include in Engineering Execution Plan.Project Engineering  ManagerTechnical Safety Events Schedule (Lead Technical Safety Engineer)
5Engineering Execution Plan & Engineering Organisation ChartCreate Engineering Execution Plan complete with key supporting documents / information.Project Engineering  Manager 
6Integrated Engineering SystemsAgree engineering design tools to be used and confirm that system hardware, software and support is available. Include issues such as PDMS or PDS, Cats and Specs, survey methods, dimensional control techniques, etc. Document and record in the Engineering Execution Plan and discipline job design specifications.Engineering Systems and All DisciplinesEngineering Systems Project Start-up Manual, Document No. (DOCUMENT CODE)
7QRA & FRA StrategyEstablish status of project Quantitative Risk Assessment (QRA), Fire Risk Assessment (FRA) and Emergency Escape & Rescue Assessment (EERA) information and confirm methadology for timely delivery into engineering design process. Agree accountability for delivery, eg. Client, 3rd party, HBP, and record in Engineering Execution Plan.Technical SafetyHazard Management Philosophy, (DOCUMENT CODE):Hazard & Risk Management, (DOCUMENT CODE)
8Discipline Job Design SpecificationDefine the key project specific design parameters and operational constraints that are applicable to the appropriate discipline for the detailed design of the project. To identify key individuals, roles and responsibilities, design tools, key codes and standards, etc.All Disciplines 
9Level 3 Engineering PlanAgree work breakdown structure, develop CTRs and create level 3 integrated engineering plan covering all disciplines. To be included in Engineering Execution Plan.All Disciplines 
10Confirm CE Compliance StrategyReview and confirm strategy for CE Compliance . Ensure discipline Lead Engineers are aware of their responsibilities and appropriate resources / measures are in place.Project Engineering  ManagerCorporate CE Compliance Strategy (DOCUMENT CODE); Project Compliance with Pressure Equipment Regulations (DOCUMENT CODE); Pressure Equipment Regulations Guidelines (DOCUMENT CODE); ATEX Guidelines, (DOCUMENT CODE); Machinery Directive Guidelines, (DOCUMENT CODE); Electromatic Compatibility Regulations Guidelines, (DOCUMENT CODE); MC, The Electrical Equipment (Safety) Regulations Guideleines, (DOCUMENT CODE).
11Technical Risk RegisterCreate formal Technical Risk Register identifying all possible risks asscociated with the engineering design.Techncal Safety 

Phase 2: Commencement of Detail Design

To formally kick off the Engineering Design Process in accordance with the project execution plan and to ensure that key engineering strategies / philosophies are in place.

 Activities / DeliverablesDescriptionKey DisciplineSupporting Documentation
1Performance Standards & Verification SchemeConfirm safety critical systems / elements and set appropriate performance standards. i.e. functionality, reliability and survivability. Develop scheme to allow the independent competent body (ICB) to verify the design against the performance standards.Technical SafetyHazard Management Philosophy, (DOCUMENT CODE); Hazard & Risk Management, (DOCUMENT CODE); Design Verification Activities (under DCR), (DOCUMENT CODE); Platform Safety Case.
2Document Distribution MatrixCreate formal document distribution matrix to ensure all disciplines & departments receive all necessary design information in a timely manner.Project Engineering Manager 
3Structural Integrity InterfaceEnsure structural integrity interfaces are identified & visible to Project, e.g. HBP / Client focal points, Technical Authorities, Independent Verification Bodies, etc.Structural 
4Material Selection ReportReport defining the requirements and specifications of necessary material.MetallurgyHBP Corporate Material Engineering Specifications.
5Hazard Management PlanCreate Hazard Management Plan identifying all key hazards, technical safety activities and the approach to managing Major Accident Hazards (MAH) in the design.Technical SafetyHazard & Risk Management, (DOCUMENT CODE); Management of Functional Safety Guideline (DOCUMENT CODE)
6Piping SpecificationsDevelop / confirm baseline piping specifications, utilizing HBP Corporate specifications where possible.PipingHBP Corporate Piping Specifications.
7PDMS CalaloguesEnsure PDMS catalogues are populated & available for all affected disciplines, utilising HBP Corporate data, i.e. CPC, where possible.Engineering Systems, supported by Piping, Electrical, Instruments, Structural & HVAC 
8CMSS PhilosophyDevelop Control Monitoring and Safety Systems (CMSS) Philosophy covering key instrumentation and control systems e.g. Process Control System (PCS), Emergency Shutdown System (ESD) and Fire and Gas (F&G).Instruments 

Phase 3: Initial Design Development and Hazard Identification

To develop initial design deliverables to Inter Discipline Review (IDC) stage and identify key hazards.

 Activities / DeliverablesDescriptionKey DisciplineSupporting Documentation
1HAZIDPerform hazard identification studies, as identified on Engineering Audit Schedule / Technical Safety Events Schedule.Technical SafetyProject Hazard Identification (HAZID) (DOCUMENT CODE); Engineering & Design Reviews, (DOCUMENT CODE).
2ENVIDFormal assessment of environmental aspects associated with a modification or a change, and to propose prevention or mitigating measures.Technical SafetyEnvironmental Impact Identification (ENVID) (DOCUMENT CODE); Engineering & Design Reviews, (DOCUMENT CODE).
3PFD IDCIssue Process Flow Diagrams (PFD’s) on formal Inter-Discipline Review (IDC).Process 
4Shutdown & Blowdown PhilosophyExplain the measures to prevent and control blowdown and how this will be achieved.Process 
5P&ID’s IDCIssue Piping & Instrumentation Diagrams (P&ID’s) on formal Inter-Discipline Review (IDC).Process 
6C&E IDCIssue Cause & Effects for formal Inter-Discipline Review (IDC).Process and Instruments 
7Plot Plans / Layouts IDCIssue equipment Plot Plans / Layouts on formal inter-Discipline Review (IDC).Piping and Layouts 
8Hazardous Area Layouts IDCIssue Hazardous Area Layouts for formal Inter-Discipline Review (IDC).Technical Safety 
9Equipment ListCreate master project equipment list identifying all major items of tagged equipment, e.g. vessels, pumps, motors, generators, hydrocycolnes, chemical injection packages,   electrical switchgear, control panels, etc.Mechanical 
10Mechanical Handling StrategyDevelop Mechanical Handling Strategy including general approach / constraints, platform crane limits, installation philosophy, operation and maintenance, etc.Mechanical and Structural 
11Particular Material Appraisals (PMA)Where required, i.e. where Corporate PMA’s or EAM’s are not suitable, develop new PMA’s and obtain approval from Notified Bodies (NoBo’s).PED Focal Point 
12Fire Risk Assessment (FRA)Determine Fire & Explosion scenarios and identifies requirements for prevention, control and mitigation measures.Technical Safety 
13Emergency Escape & Resecue Assesment (EERA)Identify requirements for emergency escape & rescue, e.g. lifeboats, escape routes, plant layout, etcTechnical Safety 
14Dropped Object StudyIdentify and assess the potential risks to drilling, production, process equipment, and manned areas from dropped or swinging objects. Where the consequence of a dropped object is considered significant, to propose prevention or mitigating measures.Technical Safety 
15Blast Design PhilosophyDevelop philosophy that assesses potential explosion hazards and identifies appropriate blast loadings to be applied to the engineering design process, eg. Vessels, pipe supports, structural steel, etc.Technical Safety 
16PFP / AFP PhilosophyDevelop philosophy that identifies requirements for Passive Fire Protection (PFP) and/or Active Fire Protection (AFP).Technical Safety 
17HIPPS ReviewInitial review to establish requirements for a High Integrity Pressure Protection System.InstrumentsManagement of Functional Safety, (DOCUMENT CODE)

Phase 4: Initial Design Review and Audit

To confirm that the initial design development is robust.

 Activities / DeliverablesDescriptionKey DisciplineSupporting Documentation
1Hazardous Area ReviewFormal Engineering discipline review of hazardous area layouts to confirm requirements for the correct selection and location of equipment.Technical SafetyHazard and Risk Management Procedure (DOCUMENT CODE); Engineering & Design reviews, (DOCUMENT CODE)
2P&ID Review and / or ‘Initial Hazop’Formal Engineering discipline review of P&ID’s to confirm design basis.Process, Piping, Technical Safety, InstrumentsFormal Hazop, (DOCUMENT CODE); Engineering & Design Reviews, (DOCUMENT CODE)
3Plot Plans / Layout / 3-D Model ReviewFormal Engineering review of Plot Plans / Layouts. The review shall ensure that the layout design complies with the required technical, safety, operability and maintainability standards. Makes sure the layout is cost effective, ensures the constructability of the work and agrees the layout basis on which the detailed design can proceed.Piping and Layouts, Structural, Mechanical, Electrical, Technical Safety, ProcessEngineering & Design Reviews, (DOCUMENT CODE)
4C&E ReviewFormal review of Cause & Effects diagrams to confirm design basis and alignment with Hazard Management Plan.Instruments, Process, Technical SafetyHazard and Risk Management Procedure (DOCUMENT CODE); Engineering & Design reviews, (DOCUMENT CODE); Management of Functional Safety Guideline (DOCUMENT CODE)
5Technical AuditObtain confirmation, by sampling of project documentation, that the engineering of the project is to the required standard and free from errors.Independent (Corporate Engineering)Technical Audit Procedure (DOCUMENT CODE)

Phase 5: Design Approval

To ‘Freeze’ the Process design, and develop dependent design & procurement activities.

 Activities / DeliverablesDescriptionKey DisciplineSupporting Documentation
1PUWER AssessmentsConduct initial PUWER assessment typically by review of PDMS model and/or vendor / equipment supplier information received to date.Technical Safety, MechanicalEngineering & Design Reviews, (DOCUMENT CODE)
2HAZOPHazard and Operability Studies, a systematic multi-discipline study based on the applications of guidewords to identify causes of potential hazards and operability constraints in a facility.Process, Technical SafetyDependent on Project updated P&ID’s and C&E’s may be prepared from commented IDC’s from Phase 3 Formal HAZOP, (DOCUMENT CODE); Engineering & Design Reviews, (DOCUMENT CODE) – Note: additional HAZOP’s may be required, i.e. earlier or later in the project. PEM to consult with Process & Technical Safety Lead Engineers.
3SHE Audit (AFD)SHE Audit ensures that the design obligations under The Health and Safety At Work Act 1974 and project health, safety and environmental performance standards are being or have been met during the engineering and design processes.Technical SafetySHE Audit Procedure (DOCUMENT CODE); Engineering & Design Reviews, (DOCUMENT CODE)
4Environmental ReportIssue final report to document & confirm that the design has considered all applicable environmental aspects & demonstrates that design controls have been included to minimise / control the environmental impact.Technical SafetyProcess Engineering & Design Reviews, (DOCUMENT CODE)
5Constructability ReviewConduct formal Constructability Reviews to ensure safe and efficient installation of plant & equipment.Affected disciplines + Construction / Implementation GroupEngineering & Design Reviews, (DOCUMENT CODE)
6P&ID AFDIssue Approved For Design (AFD) Process and Instrumentation Diagrams.Process 
7C&E AFDIssue Approved For Design (AFD) Cause & Effects.Instruments 
8Process Data Sheets AFDIssue Approved For Design (AFD) Process Data Sheets.Process 
9HP / LP Interface ListingIdentify all HP / LP interfaces on formal register and ensure that all have been addressed satisfactorily via HAZOP’s and / or individual reviews.Process 
10Holds RegisterDevelop register to record & manage post AFD design holds.Engineering Manager 
11SIL AssessmentsConduct assessment to determine target Safety Integrity Level (SIL). Note: Where the target SIL is 3, then it is likely that a High Integrity Pressure Protection System (HIPPS) will be required. If the value is found to be 1 or 2, then a HIPPS will not be required.InstrumentsManagement of Functional Safety, (DOCUMENT CODE)
12HIPPS StudyConduct study to formally identify the performance requirements of the High Integrity Pressure Protection System (HIPPS) and demonstrate that it is robust. Should include dynamic study for a range of transient conditions.ProcessManagement of Functional Safety, (DOCUMENT CODE)
13HIPPS Reliability StudyConduct study to formally demonstrate that the High Integrity Pressure Protection System (HIPPS) complies with the reliability & availability criteria for the Project, e.g. as stipulated in the performance standards.InstrumentsManagement of Functional Safety, (DOCUMENT CODE)
14SIL Achievement ReportConduct independent assessment to formally record that the target Safety Integrity Levels (SIL’s have been achieved) Must be completed prior to introduction of Hydrocarbons.Independent Competent Person (ICP)Management of Functional Safety, (DOCUMENT CODE)
15Flow AssuranceConduct flow assurance studies to demonstrate the process design under a range of flow conditions, i.e. start-up to 100%.Process 
16Verification of Vendor Information & Certification – Design CompletionVerify, primarily through review of vendor documentation, that their design & manufacture of fabricated packages, etc is robust and contains sufficient information to facilitate completion of affected HBP discipline design.Affected disciplines 
17PFEER Compliance ReportIssue final report as documented confirmation that the design meets the requirements of the Prevention of Fire and Explosion, and Emergency Response (PFEER) RegulationsTechnical Safety 

Phase 6: Approval for Construction (AFC)

To ensure that sufficient design information & certification is available to facilitate safe installation, operation & maintenance.

 Activities / DeliverablesDescriptionKey DisciplineSupporting Documentation
1SHE Audit AFCConduct SHE Audit at AFC stage in accordance with Harmonised Procedure.Technical SafetySHE Audit Procedure (DOCUMENT CODE)
2IEC 61511 Compliance ReportFinal report to formally demostrate that the Safety Instrumented Systems comply with the requirements of IEC 61511.InstrumentsManagement of Functional Safety, (DOCUMENT CODE)
3PFD’s AFCIssue Approved For Construction (AFC) Process Flow Diagrams.Process 
4Operational Safety Case DevelopmentCommence operational Safety Case development.Technical Safety 
5P&ID’s AFCIssue Approved For Construction (AFC) Process and Instrumentation Diagrams.Process 
6Quantative Risk Assessment (QRA)Complete QRA activities to confirm that the design is robust and complies with legislative requirements.Technical Safety 
7C&E AFCIssue Approved For Construction (AFC) Cause & Effects.Instruments 
8Operating Procedures Review / Operational HAZOPEnsure operating procedures are verified line by line against the facilities provided on the P&ID’s.Process, Technical SafetyFormal HAZOP, (DOCUMENT CODE); Engineering & Design Reviews, (DOCUMENT CODE)
9Fabrication Drawings AFCIssue Approved For Construction (AFC) Piping Isometrics, Structural Steelwork drgs, etc.Affected Disciplines 
10Verification of Vendor Information& Certification – Installation, Operation & MaintenanceVerify, primarily through review of vendor documentation, that their design & manufacture of fabricated packages, etc is robust and contains sufficient information to facilitate safe installation, operation & maintenance.Affected Disciplines 
11EC Design Examination CertificatesWhere HBP are deemed to be the manufacturer of the piping systems, then under the PED/PER, HBP have to apply to the Notified Body (NoBo) for an EC Design Examination Certificate (Cat IV assemblies only).PER Focal pointProject Compliance with the Pressure Equipment Directive, Document No. (DOCUMENT CODE).
12Declaration of ConformityWhere HBP are deemed to be the manufacturer of the piping systems, then under the PED/PER, HBP have to create a Declaration of Conformity, signed by the Project Manager.Project ManagerProject Compliance with the Pressure Equipment Directive, Document No. (DOCUMENT CODE).

Phase 7: Design Close-Out

To ensure all final design deliverables are completed and that client and statutory obligations are satisfactorily resolved.

 Activities / DeliverablesDescriptionKey DisciplineSupporting Documentation
1Safety Case Acceptance (HSE)Submit Safety Case to HSE & close out all queries / correspondance prior to next stage of operations.Technical Safety 
2Certifying Authority (CA) / Independent Verification Bodies (IVB) AcceptanceClose out all outstanding technical queries and obtain final Letter of Acceptance.Technical Safety 
3Complete Project As-Built DocumentationComplete as-builts of design drawings and deliverables in accordance with Project / Client requirements.Affected DisciplinesAs Built Drawings and Documentation, (DOCUMENT CODE)