Finally we make a take-off from a small P&ID and write, as homework, some code:

Take-off
First we make a take-off of all objects, and, where not shown on the P&ID, give them a subtag:
| NAME | ESSENTIAL TYPE | SPECIALIZED TYPE | Class|Ind? | Act|NonAct | Part of |
| B001 | VESSEL | ATMOSPHERIC VESSEL, VERTICAL VESSEL | Individual | NonActual | |
| B001-N1 | FLUID PORT | FLANGED NOZZLE | Individual | NonActual | B001 |
| B001-N2 | FLUID PORT | FLANGED NOZZLE | Individual | NonActual | B001 |
| B001-N3 | FLUID PORT | FLANGED NOZZLE | Individual | NonActual | B001 |
| B001-N4 | FLUID PORT | FLANGED NOZZLE | Individual | NonActual | B001 |
| B001-N4-COVR | VENT COVER | Individual | NonActual | ||
| B001-N5 | FLUID PORT | FLANGED NOZZLE | Individual | NonActual | B001 |
| B001-N6 | FLUID PORT | FLANGED NOZZLE | Individual | NonActual | B001 |
| B001-M1 | MANHOLE | Individual | NonActual | B001 | |
| L0011 | LEVEL LOOP | Individual | NonActual | ||
| LSH0011 | LEVEL SWITCH | Individual | NonActual | L0011 | |
| L0012 | LEVEL LOOP | Individual | NonActual | ||
| LSL0012 | LEVEL SWITCH | Individual | NonActual | L0012 | |
| LLA0012 | WARNING ALARM LOW PORT | Individual | NonActual | L0012 | |
| P001-SYS | PUMP SYSTEM | Individual | NonActual | ||
| MCC-P001 | MOTOR CONTROL CENTRE | Individual | NonActual | P001-SYS | |
| PM001 | MOTOR | ELECTRIC MOTOR | Individual | NonActual | P001-SYS |
| P001 | BARE PUMP | CENTRIFUGAL PUMP | Individual | NonActual | P001-SYS |
| P001-IN | PIPE FLANGE | Individual | NonActual | P001 | |
| P001-OUT | PIPE FLANGE | Individual | NonActual | P001 | |
| 01-100-PE-N | PIPING SYSTEM | Individual | NonActual | ||
| 01-100-PE-N-OUT | PIPE FLANGE | Individual | NonActual | 01-100-PE-N | |
| 02-100-PE-N | PIPING SYSTEM | Individual | NonActual | ||
| 02-100-PE-N-IN | PIPE FLANGE | Individual | NonActual | 02-100-PE-N | |
| 02-100-PE-N-1 | PIPING NETWORK NODE | Individual | NonActual | 02-100-PE-N | |
| 02-100-PE-N-2 | DRAIN VALVE | Individual | NonActual | 02-100-PE-N | |
| 02-100-PE-N-3 | BLIND FLANGE | Individual | NonActual | 02-100-PE-N | |
| 02-100-PE-N-4 | BLOCK VALVE | Individual | NonActual | 02-100-PE-N | |
| 02-100-PE-N-5 | PIPE REDUCER | Individual | NonActual | 02-100-PE-N | |
| 02-100-PE-N-OUT | PIPE FLANGE | Individual | NonActual | 02-100-PE-N | |
| 03-100-PE-N | PIPING SYSTEM | Individual | NonActual | ||
| 03-100-PE-N-IN | PIPE FLANGE | Individual | NonActual | 03-100-PE-N | |
| 03-100-PE-N-1 | PIPE REDUCER | Individual | NonActual | 03-100-PE-N | |
| 03-100-PE-N-2 | PIPING NETWORK NODE | Individual | NonActual | 03-100-PE-N | |
| 03-100-PE-N-3 | INSTRUMENT CONNECTION POINT | Individual | NonActual | 03-100-PE-N | |
| 03-100-PE-N-4 | CHECK VALVE | Individual | NonActual | 03-100-PE-N | |
| 03-100-PE-N-5 | BLOCK VALVE | Individual | NonActual | 03-100-PE-N | |
| PSV0014 | PRESSURE RELIEF DEVICE | Individual | NonActual | ||
| PI0013 | PRESSURE GAUGE | Individual | NonActual | ||
| 04-100-PE-N | PIPING SYSTEM | Individual | NonActual | ||
| 04-100-PE-N-IN | PIPE FLANGE | Individual | NonActual | 04-100-PE-N | |
| 04-100-PE-N-OUT | PIPE FLANGE | Individual | NonActual | 04-100-PE-N |
Homework
For above items that are marked yellow:
- write their declaration
- classify them where required with the Class in column 3 (use ClassificationOfIndividual),
- define the whole-part assemblies (use AssemblyOfAnIndividual).
Connections
Then we define the interconnections between these objects:
| CONNECTIONS (in stream direction) | |||
| FROM | TO | TYPE | Direct | Indirect |
| 01-100-PE-N-OUT | B001-N1 | FLANGED CONNECTION | Direct |
| 04-100-PE-N-OUT | B001-N2 | FLANGED CONNECTION | Direct |
| B001-N3 | 02-100-PE-N-IN | FLANGED CONNECTION | Direct |
| B001-N4 | B001-N4-COVR | FLANGED CONNECTION | Direct |
| B001-N5 | LSH0011 | FLANGED CONNECTION | Direct |
| LSH0011 | MCC-P001 | SIGNAL TRANSMISSION CONNECTION | Indirect |
| MCC-P001 | PM001 | POWER TRANSMISSION CONNECTION | Indirect |
| PM001 | P001 | DRIVE-TO-DRIVEN CONNECTION | Direct |
| B001-N6 | LSL0012 | FLANGED CONNECTION | Direct |
| LSL0012 | LAL0012 | SIGNAL TRANSMISSION CONNECTION | Indirect |
| 02-100-PE-N-IN | 02-100-PE-N-1 | INDIRECT PIPING CONNECTION | Indirect |
| 02-100-PE-N-1 | 02-100-PE-N-2 | INDIRECT PIPING CONNECTION | Indirect |
| 02-100-PE-N-2 | 02-100-PE-N-3 | FLANGED CONNECTION | Direct |
| 02-100-PE-N-1 | 02-100-PE-N-4 | INDIRECT PIPING CONNECTION | Indirect |
| 02-100-PE-N-4 | 02-100-PE-N-5 | INDIRECT PIPING CONNECTION | Indirect |
| 02-100-PE-N-5 | 02-100-PE-N-OUT | INDIRECT PIPING CONNECTION | Indirect |
| 02-100-PE-N-OUT | P001-IN | FLANGED CONNECTION | Direct |
| P001-OUT | 03-100-PE-N-IN | FLANGED CONNECTION | Direct |
| 03-100-PE-N-IN | 03-100-PE-N-1 | INDIRECT PIPING CONNECTION | Indirect |
| 03-100-PE-N-1 | 03-100-PE-N-2 | INDIRECT PIPING CONNECTION | Indirect |
| 03-100-PE-N-2 | PI0013 | INSTRUMENT TUBING CONNECTION | Indirect |
| 03-100-PE-N-2 | PSV0014 | INDIRECT PIPING CONNECTION | Indirect |
| 03-100-PE-N-2 | 03-100-PE-N-3 | INDIRECT PIPING CONNECTION | Indirect |
| 03-100-PE-N-3 | 03-100-PE-N-4 | INDIRECT PIPING CONNECTION | Indirect |
| PSV0014 | 04-100-PE-N-IN | FLANGED CONNECTION | Direct |
| 04-100-PE-N-IN | 04-100-PE-N-OUT | INDIRECT PIPING CONNECTION | Indirect |
Obviously this information shall be automatically generated by the P&ID software, any time that a new revision has been issued. But unfortunately the P&ID software suppliers are not interested, as far as I know.
Homework
Write one template instance for each type of connection that is marked yellow, using ClassifiedDirectConnectionOfTwoIndividuals and ClassifiedIndirectConnectionOfTwoIndividuals.
Properties
Finally we write templates for the properties listed in the left upper corner of the P&ID and for the relief valve:
| POSSESSOR | INFORMATION ABOUT NAMED OBJECT | VALUE | UNITS |
| B001 | DIAMETER | 1000 | MILLIMETRE |
| B001 | HEIGHT | 3000 | MILLIMETRE |
| B001 | NOMINAL CAPACITY (volume) | 2.4 | METRE CUBED |
| B001 | UPPER LIMIT ALLOWABLE WORKING PRESSURE | 10 | BAR GAUGE |
| B001 | UPPER LIMIT ALLOWABLE TEMPERATURE | 50 | DEGREE CELSIUS |
| P001-STRM | NORMAL VOLUMETRIC FLOW RATE | 5 | METRE CUBED PER HOUR |
| P001 | DIFFERENTIAL HEAD | 2.5 | BAR |
| P001 | UPPER LIMIT ALLOWABLE WORKING PRESSURE | 10 | BAR GAUGE |
| P001 | UPPER LIMIT ALLOWABLE TEMPERATURE | 50 | DEGREE CELSIUS |
| PSV0014 | SET PRESSURE | 6 | BAR GAUGE |
Homework
Write all ten template instances to represent above information. Keep in mind that all above information is about the Asset Requirements Class, so the templates are for classes.
It is true that the P&ID lists this information for the individuals B001 and P001, but, as we say in Dutch: "Papier is geduldig" (paper is patient).
For clarification: These properties are requirements that must be met by the ActualIndividual and, because of their classification with the Asset Requirements Class, also by the NonActualIndividual.
ActualIndividuals ARE what they are, with characteristics that are almost 100% certain different from the requirements, of better said: not exactly the same.
Classes have range properties, individuals have point properties. Even a requirement for 316SS has a range, because when the supplier offers a better material for a 316SS price that may be acceptable. But when an individual is made of 316SS, THAT IS A FACT. The only ‘range’-like aspect is in the accuracy of measurements or material analyses.
So the P&ID tells what, topologically, the plant looks like. The fact that P&IDs also show equipment and stream data is a relic of the old days, when we didn't have computers, so that documents also served as data base. The definition of what the characteristics of the plant items shall be is given by the Asset Requirements Class, usually defined by a technical specification (commodity materials by a Product Specification or an acceptable standard).
The first two properties are instances of ClassOfShapeDimension (use ClassOfIndividualHasDimensionedShapeWithValue ), and the rest are instances of ClassOfIndirectProperty
(use ClassOfIndividualHasIndirectPropertyWithMaximumValue for the ‘UPPER LIMIT’ properties, and ClassOfIndividualHasIndirectPropertyWithValue for the rest ).
Assume that the tags CO-B001 and CO-P001 (CO = ClassOf) have already been declared and that B001 and P001 are their respective members. Furthermore P001-STRM is the Liquid Stream through P001, with CO-P001-STREAM to attribute the above value to.
In a next revision you can find the correct code, allowing you to compare.

