Research Article

Translating Building Information Modeling to Building Energy Modeling Using Model View Definition

Algorithm 4

A code block of the ModelicaBEM presenting a window object, a door object, and connect objects of a door generated by the Revit2Modelica prototype.
Window instance
//Window information
PBIM.BIMPackage.Window Windows208788(
areaWin=5.99981328229248,fFraRatio=0.000991968307418856, structureWin(glass={Glass208788},
final nLay=1,UFra=3, absIRFra=0.8, absSolFra=0.5,
haveInteriorShade=false,haveExteriorShade=false));
Door instance
//Door information
PBIM.BIMPackage.Door Doors210796(redeclare package Medium=MediumA, doorWidth=0.8636,
doorHeight=2.032);
Room instance
//Room information
PBIM.BIMPackage.Room Room2(...
, datConExt(layers={Walls206993.structure,R2.structure,F2.structure},
A={Walls206993.area,R2.area,F2.area},
til={Walls206993.tilt,R2.tilt,F2.tilt},
azi={Walls206993.azi,R2.azi,F2.azi}),
datConExtWin(layers={Walls194278.structure,Walls194279.structure},
A={(Walls194278.area*Walls208788.areaWin)/(5.99981328229248),
(Walls194279.area*Walls209156.areaWin)/(5.99981328229248),
glaSys={Windows208788.structureWin,Windows209156.structureWin},
AWin={Windows208788.areaWin,Windows209156.areaWin},
fFra={Windows208788.fFraRatio,Windows209156.fFraRatio},
til={Walls194278.tilt,Walls194279.tilt},
azi={Walls194278.azi,Walls194279.azi}),
nConBou=0,nConPar=0,
nSurBou=1, surBou(A={Walls205734.area},
absIR={Walls205734.structure.absIR_a},
absSol={Walls205734.structure.absSol_a},
til={Walls205734.tilt}),nPorts=3);
Connect instances
//Connect information
connect(Doors210796.port_b1, Room1.Room_ports2);
connect(Doors210796.port_a2, Room1.Room_ports3);
connect(Doors210796.port_a1, Room2.Room_ports2);
connect(Doors210796.port_b2, Room2.Room_ports3);