4 - OpenStudio Create space via geometry method and surface matching

Learn OpenStudio Now in one of these online courses:

Script Preview

Hi everyone, this is Harshul Singhal. In my previous video you understood how to work on the standard shape method. Now I will try to explain to you the next method, which is the most important method. Create the OpenStudio spaces by footprint of the building. Basically, what you do you, you actually create a footprint in SketchUp. You create this footprint in SketchUp using this SketchUp tools, and then you run one OpenStudio script to create OpenStudio 3D geometry, very important. Again, I will explain to you, we create a SketchUp footprint using the SketchUp tools. And then, we run one OpenStudio script to create the 3DOpenStudio geometry, all right.

 

We will do one exercise here. Let me just go back to my SketchUp interface. Again, for this video I will try to explain to you as much as I can. I will make some mistakes on purpose. I will try to go through different ways to create the geometry. In case you get confused, please go through this video again. And, if you still have some doubts, please don't hesitate to reach back to us, okay. I'm going to start with a clean slate, again. This my interface. The first thing that we need to do is, run this new OpenStudio model from wizard script, to bring some space type and constriction set wizard. Click on this, I don't want to save my current OpenStudio model, hit No. And then, this user input window provides some building type, let's say office. Template can be Ashrae 90.1 2010. Climate zone can be 3C, for San Francisco. And, this can be true, and hit OK. Now I have 13 space types and 1 constriction set. I already have explained to you this process in my previous video.

 

In case you did not get a chance to look at that video, please look into it so that you get the idea of these space types and construction sets, all right. Hit OK, hit OK again. Now, how I like to create my geometry, I like to create it in my top plane view. Hit top here in this view toolbar. I'm in my top plane right now. What I can do, I can actually use either SketchUp, either rectangle tool bar, a solid rectangle tool, or I can use the line tool. Let me just explain to you how to work on the line tool. Click on it, click it one time on this plane. Provide some dimensions either through your keyboard, or just click another, the next point by using the mouse. I will provide some dimensions here. Let's say I want to create a shoebox model of my office building, which is, let's say, 40 feet by 40 feet. Provide some dimensions from keyboard, hit enter. Again, in, for this north-facing, for dimensions, again, 40 feet again, and connect it, okay. Now I can actually create the parameter spaces. I can use another tool, which is this offset tool.

 

Again, if you are not familiar with this tool, you can go to windows, default tray, use this instructor tool, and it will explain to you how to work on this offset tool. It explains everything in detail, so please keep using it. I'm going to click this offset tool, click on my edge, and provide some dimensions for my parameter space. Let's say, my parameter space is 15 feet deep. And now, I can create, connect these corners to create four parameter spaces, okay. That's what my building footprint looks like, I'm just going to move it to origin. Doesn't make any difference, but still, I want to keep my things clean, that's how I work. Now what I can do, I can actually select this footprint now.  Go to extensions, go to OpenStudio, go to modify model, and then look for this script, which is, create spaces from diagram. Again, this script lives in extensions, then OpenStudio, then modify model, and then create spaces from diagram, hit OK.

 

Let's say the height of the floor can be 12 feet. Number of floors, let's keep it 2, and hit OK.  This is what my building looks like. Again, it's a shoebox model. Generally, you need to provide more information for your spaces, for, let's say, a lead model. I'm just going to create a new, or a new footprint, more detailed footprint later, after this. Again, the same way, either you can just double click on these spaces, use your rectangle, or line tool bar to create windows, or you can just select everything and provide some dimensions, or actually window wall ratio using this window wall ratio script, okay. It lives in extensions, OpenStudio userscript, alter or add model elements, and then set window to wall ratio. I will just select some of these spaces to provide some window wall ratio. Let's say, 60 person, offset can be 1 meter from the ground, and hit OK.

 

Now if I want to customize this geometry, I can still do that. Let's say, let's make some changes. If you are a SketchUp user you should know how to work on these tools here. I'm just going to explain to you some of them. Again, double click on this space, don't forget to double click on the spaces, you need to get inside the group. Double-click on it, take the line, make some changes here. Maybe, extrude this, like this, which is a very weird extrude. Then I can make some more changes there. Make one more segment in floor, and extrude this part of floor. I'm sorry, there’s something wrong. I need to make one more segment here, here. And now, I can extrude this part up to this depth. Can you see how easily I created this funky-looking geometry. I can make some windows here, I can make some more changes. Let's say, if I want to bring a certain section of this wall out. Create some segment in wall, and just extrude it.

 

Want to do some more stuff, let's do it. Let’s just play around with this, okay. That's how my geometry looks like. Can you see how easily I created this funky-looking geometry? You cannot create this geometry easily in eQuest. Do you want to make some more changes, let's just extrude this skylight area, or actually core area. And, let's create some windows in this. Let's say, if I made some mistake, I did not click on this group, this space group. I just created some windows, my mistake over this space, can you see. The rendering is totally different. It doesn't look like what you have here, for windows. What I'm going to do, I'm going to run that script, again. Remember project loose geometry, which lives in extensions. OpenStudio, modify model, and project loose geometry, click on it. And project all loose geometry, hit OK. It fixed that issue for me.

 

Can you see, it is such a funky looking geometry. What if I have something else for ground floor. Let's say, this is second floor, this is third floor, and I have one ground or first floor, which has a different kind of footprint. What I can do, I can actually assign these two spaces as one-story. Let's just assume that this, these two floors were constructed in 2000, 2010. And, the first floor or, ground floor was constructed in 1980. In this case we need to provide a different kind of construction set. Just select them, go to inspector tool. Either you can go to facility, let me just find the story for you, yes. Let's go to facility. You know what, let's just not worry about this for now because, we can actually assign everything all together. I don't want you to get confused. What I'm going to do, I'm going to move, or actually, I'm going to click on this top tool here, so that I can create the ground floor footprint easily. Again, I'm going to use some SketchUp toolbars, actually SketchUp tools, to create the geometry. Just use rectangle this time, and provide some dimensions. Let's say, the footprint size, or dimensions for, are, let's say 100 feet, 50 feet, hit enter, all right. Looks like this is like smaller than this, so let's just make it bigger. I'm going to increase the depth or the width of this footprint by using the move tool. I have selected this edge, the north-facing edge. And then, I'm going to click on this move. Move it to, let's say, 30 feet. And, it increased the width of my footprint.

 

Now what I'm going to do, I'm going to create some segments out of it to create the spaces. Let's just use line. This is going to be the detailed space footprint. I don't want to create the shoe box type for this, so let's just create a corridor. I'm going to give some arbitrary dimensions. You can also use SketchUp tools. For example, if I use the move tool. I'm sorry, let me just do it one more time. If I select this line, click on tool, and hit shift, actually, no, sorry. Hit Ctrl, keep clicking Ctrl. It also copies the things for you. I have copied using Ctrl and move ,and then I can provide dimension to provide the width of this corridor. Let's say, 10 feet, hit enter. This is my corridor. I can provide one more corridor if I want. Let's say, one more corridor is here. And then, create some more spaces. These two can be restrooms, this can be an open space, this can be a conference room, there can be one more corridor here, there can be a couple of more spaces. Let's just imagine this is what my building footprint for ground floor, that's how it looks like, okay.

 

Now, what I can do, I can either detail out more, or I can just select everything here. Run that script again, what we ran, maybe five minutes back. Create spaces of that from the diagram. Again, it lives in extensions, OpenStudio, and then modify model. And, that creates spaces from the diagram, okay. Click on it. You can provide height, let's say it's 12 feet this time, number of floors, one should be okay, and hit OK. Can you see that it created the new footprint for me. What I can do, I can actually move this, these two floors over this ground floor using the move tool. Again, be very precise in moving this. If you don't, if you make any mistakes it can bring more errors in your project. A lot of times, if these surfaces, they don't touch each other, OpenStudio doesn't like it, and it just crashes on you. Be very precise. Again, like, you know, it needs some practice. You need to make sure that you know these end points are, like, touching each other, and then drop it, okay.

 

Let's say this is my model here, looks like a very funky building, right. Super good. But, what if I just need to add only one space. Well, you need not to, like, run this create spaces, or spaces from diagram script one more time. If it's just one or two spaces, you can use this tool here, which is new space. They all, I mean you could have just created all this building using this new space tool, as well. But, it would have been a longer process. You would have ended up creating 50 different spaces, one by one. That's why I use this shortcut method, which is, create spaces from diagram. If I need to add only one space now, I can easily do it by just clicking on this new space tool. Click on it, and then just drop this tiny plus sign next to your cursor, anywhere. It brings this transparent box for you, which says, OpenStudio space.

 

Again, same thing what we do for SketchUp groups, double click on this this box. It opens a new environment for you. Let me just do it again. This is my normal environment. If I click on this OpenStudio space, double click on it, and it changes the environment. It means you are inside the OpenStudio environment, and whatever you do, it will reflect changes in your OpenStudio model. Just create any space, any dimensions, they should be okay for now. Let's say 12 feet by 15 feet, hit enter. And give some height using this extra tool, push-pull tool, sorry. Let's say 12 feet, using your keyboard, hit enter. And, you can see the rendering pattern, rendering colors, it means that you are in OpenStudio interface. Just move it somewhere on top of this a space. Let's say, this is some random storage space, all right. 

 

This is how my geometry looks like, okay. Very important thing that I want to explain. Before you work on SketchUp or OpenStudio, make sure that you have all the inputs ready for you. Make sure that you bring all the internally load information, schedules, HVAC, related information, envelope section information on an Excel sheet. You don't want to start an OpenStudio and then look around for information, the basic information later. It's always a good approach to bring all the information on your table, and then start energy modeling, okay, all right. That's how my geometry looks like.

 

Now a lot of information that I still need to explain to you. This is not the final geometry, so don't get excited. What I, what we can do here, we can actually start with inspecting our tool. Because we have done so much work, you definitely want to make sure that everything is right so far before we move further. A lot of times what happens, you make some mistakes, and later you find out that your model didn't work properly. For example, a lot of times, if people are trying to make windows, they don't double click on spaces. They just create geometry, or actually a window over this groove, like this. And  when they run the simulation, they always find an error. Make sure that you look into these kind of free-floating surfaces, or flee free-floating edges. Like some, a lot of times, people just delete this surface, but I still they have those edges. We need to delete them one by one. Select them one by one, and delete them, okay.

 

Next thing, you want to inspect your OpenStudio model. Click on this open, inspector tool. And now, you can see you have 19 spaces in your project, okay. They are renamed in this default method, which is like, you know, a very generic method in any OpenStudio, or actually, any energy modeling tool. The best way to work on your energy model is to rename them properly. I will, I have no time to rename each and every space, but, I will just rename some of them. For example, let me just bring this inspector tool and my SketchUp interface next to each other. Let's see if I want to rename this space. This space 107. How I like to rename them, I like to rename them something like this, Fl1_Office101. Let's say, that's the legend name that I got in my architecture plans, underscore, let's say it is facing North, okay. Let's say if I want to rename this space, same thing. I can just copy this name here, and make some changes for this, for this space just say this is conference, 104 underscore, yes.

 

That's how I like to name my spaces, because later if I need to QC my spaces, or do anything, it makes my life easier. I know, like, where I need to make some changes. For example, if you have a fan coil unit system, you have a huge project on your plate. And, let's say you have thousands of spaces. It's so difficult to go to each and every space, find which space is what, and assign the properties. If you rename them properly, things are very easy for you later. What else you see here, you have 138 surfaces in your project, 16 sub-surfaces. Something like windows or shading, I'm sorry, windows and skylights. And that's it for now, okay. Click this close button here, for inspector tool. Maximize this SketchUp window.

 

What else you want to see. You want to see if you have any errors or warnings in your project. Once you are done with this geometry, you want to run this script, this very important script here, which lives in OpenStudio. Inspect model, and show errors and warnings. If you run it, and if you see this warning, you are well and good. If you don't see it, let's say, you have some errors, you run another script to diagnose your errors. Which is, go to OpenStudio userscript, go to reports, and then OSM diagnostic report. When you run it, I'd ask you to save your project first. Let me just save it here again, like, I'm just going to rename it. Like, something like, let's say, 952am, and hit open. And, it doesn't allow me to click the, it does not allow me to run a diagnostic report. That's good, that it did something to me, so it's good for you, as well, to understand how this thing works. First I was supposed to save this OpenStudio model, which I haven't done it so far. Let me just rename it to something like, 950am_v2, and hit save.

 

Now, if I run this diagnostic script, it asks me, hey which OSM file do you want to click, or you want to open for a diagnostic. I save this file at 950am, double click on it, and it says, hey do you want to remove objects with errors, and you want to remove objects with warnings. If you want to remove both of them, select true for all of them. I like to just remove the errors in my project. Hit OK, and it says diagnostic test complete. Since I had no error in my project, you don't see anything here. But definitely, you want to run it still. You have done so much work, so far, in this project. You don't want to screw it up later. Make sure that you fix it here, and then move to the next phase, hit OK, okay. Save it, all right. Let me just make some errors in my projects so that we can fix them here. A lot of times, what happens, you see some weird errors that you still cannot fix by using this OpenStudio diagnostic script. Again, this, these next couple of minutes will be very important so please play, I'm sorry. Please pay attention.

 

Let me just generate some errors for you. Sometimes it's difficult to generate errors, let me just try my best. Let's say, in this space, I created some windows like this, okay. And then, I totally forgot to delete something properly. Just, let's say, I just kept it like this, okay. You can see there are three free floating edges. And, let's say, I didn't pay attention to fix them. Let's try to generate that error and warning report. See it doesn't show any errors or warnings. Let's say, if I run diagnostic report, it asks me to select the file that I want to run for diagnostic. Let me just save this file first, and then run the diagnostic. And, it asked me the same thing, just hit OK. And, you can see they, it still doesn't show any error or something. Let me just save it, and open this model one more time. I hope it shows me some errors. Well, it did not, so it fixed it automatically for me. Looks like when I ran that diagnostic script, it fixed it, fixed something for me. Let me just think about it. How can I create some errors for you guys.

 

What if, if I just delete something like this, and then run the, and just, like, save this project, and open it again. Can you see, it shows me one error now. Hey, subsurface 16 is missing, it cannot be drawn. Well, a lot of times you cannot fix these kinds of problems. There are some free-floating sub-surfaces o surfaces, because of any weird reason the software wasn't able to create it for you, okay. There is an error. Let's see if we can fix it through this diagnostic method. I'm just going to run this, show errors and warning script. It shows me one error, all right. Let's go to OpenStudio userscript, go to reports, and then run this OSM diagnostic script. It asks me like, hey select the file, okay. Run this, it did the diagnostic for me, okay. That's well and good. Let me just save this file, and open this file again, for you guys. But, can you see that diagnostic script wasn't able to remove this sub-surface error, all right.

 

What you do in this case, well, I'll show you my technique now, which is very important. What I do, I just go to my OSM file, that’s the folder where I saved this file. Open this SketchUp file, I'm sorry. This OpenStudio file in Notepad++. Again, this is only for advanced users. I'm just trying to explain to you how to work on it. But, in case you don't know, like, or you are not comfortable working on this Notepad++, please don't do that. I'm going to look for that sub-surface 16. And, okay, I know this sub-surface is creating some trouble. I'm just going to select this sub-surface component, very precisely. You can see this is the component, or the object that is creating trouble. Which is OpenStudio sub-surface, it ends here. I can see this semicolon here, which means that's where this component ends. I'm just going to delete it, and save it. Or, at least, I should have made a copy of it. I mean that's the mistake I did. I will Ctrl C again, make a copy of it. Okay, V3, save it, and now delete it.

 

What happens, maybe, if I make some mistakes here, at least have a one, I have one copy of my previous version. Save this V3, go to my SketchUp interface, again, reload it, or open the V3 version now. I'm sorry, I think I did one more mistake here. I should have saved it as OSM. See, again, one more important thing here. See I saved it as text version. That's very wrong, I won't be able to open the txt format in OSM. That's good that I made this mistake, I am trying to fix it for you guys. I'm going to open this V2 version in Notepad++ again. Close that V3.txt file, save this, v2.osm again. Save a copy as, I think I should make, I should just use this easiest version, which is, just copy it here, and paste it here, and rename it. That way it's much easier, okay. Now open this V3 version in Notepad++, look for that sub-surface 16, hit enter. Why it wasn't able to find it. Did I already delete it, I think I did. Let's just open this V3 version in SketchUp. See, there is no error, that surface is gone. But that, this, this space here, needs some fixed, it needs to be fixed. Double click on it, use this rectangle toolbar, or actually, rectangle tool. Make a wall, very precisely, the way I am doing it. I selected this corner, and then, stretch your mouse to the opposite corner, like this. It created the wall for me automatically, all right. That's good that we made some errors. It was a good exercise for us to understand how to QC these kinds of troubles, or issues, okay. Save this model.

 

What is next thing here? We can do, either we can provide the window wall ratio, which we already have done, or we run another script, which is surface matching tool, okay. What happens when you create the spaces in OpenStudio? It creates all these surfaces, all these space related surfaces, as outdoor surfaces. Let me just show you. For example, if I double click on this space, and click on any surface here. Go to inspector tool. You can see this wall is outdoor. It has outdoor boundary condition, sun exposure, wind exposure. That makes sense, because this is an outdoor wall. What if, if I just click on this option here, in the OpenStudio landing toolbar. Click on this, hide rest of the model. Can you see here, in this landing toolbar, click on it. And now, if I double click on this space, it just shows me this selected space, it hides everything. I know this is an interior wall. It is supposed to be an interior wall. Click on it, and go to inspector tool. And, you can see, even this wall has an outdoor boundary condition, sun exposure, wind exposure, which isn't right. If you have provided a construction set at building level, let's say, the installation property for the external wall is R11, based on ASHRAE 90.1 2010, for particular climate zone. This interior wall will also have that insulation, which is wrong. Either these walls are adiabatic, or they are an internal wall with some different kind of insulation property, okay.

 

There’s another way to look into it. If I change the rendering property to, let's say, this render by boundary condition, in this OpenStudio rendering toolbar, a default selection is render by surface type. The rendering is S for the surface type. As I mentioned earlier in my previous video, roofs are in a brown color, walls are in an orangish color, windows are in a blue color, transparent blue, and the ground is in a grey color. If I change the rendering condition to, let's say, render by boundary condition. This blue color is supposed to be for the outdoor boundary condition, all right. The different kind of boundary renderings here, render by construction, this purple one, or magenta color is the roof, gray one is the wall construction, this white is the window construction, and this red is the floor construction.

 

There is another rendering, render by space type, we haven't assigned this space, we haven't assigned space type to our project. Let's not worry about it. Next is render by thermal zone, we don't have any thermal zones, and, render by building story. We still need to work on space type, thermal zone, and building story. For now, let's just click on this, render by boundary condition. And, in this section toolbar, click on this section plane. Again, this is how my section toolbar looks like. The first option is section plane. Bring this plane, you can either keep it vertically or horizontally. I like to keep it horizontally, like this. I'll just drop it over my top most floor, like this, and it will show me the section. Right now this section plane is an orange color. if I select it, it changes into a blue color. And now, I can move this section plane using this move tool. And, it's blue in color, select, click on this move tool. Select or click on your interface, the, this green plane. And, just move this section, plane. It will show you the different floors, different sections, of your project, like this. See, pretty cool.

 

But, you can see all, most of the internal walls are in a blue color, which means we need to fix them. We need to change the properties for internal walls, they can't be external walls, like what I showed you earlier. Just click everything in your project, like this. Or, you can like, you know, yeah, select some of these spaces. I would prefer to select all these spaces since we need to fix it in our complete project. And then, look for this tool, surface matching tool, which lives in this toolbar, OpenStudio tool bar, next to this Sun wearing glasses, which is kind of weird. Click on this surface matching. It asks you, first thing is, hey some users haven’t put it, I'm sorry. This is something else, they have like, you know, explained to you the issues, I will explain this issue later. What happens in this first section, it actually intercept and divides inter-zone surfaces. Let me just explain to you what it means.

 

Can you see this ground floor here? Let me just show you properly. Can you see this floor here, this particular surface here. It is overlapping with a couple of other surfaces, from ground floor. Again, let me just show you. This surface here, from second floor, is on top of this surface, this surface, and this surface. Technically, there should be three segments here, right. But, it's not. There'll be different kinds of calculations that we need, that the software needs to perform. For that, it needs to create a connection between this space and this space separately. Then this space and this space separately, this and this. For that, it needs to segment out this, what, the, I'm sorry. This particular, this particular surface into three sections, all right.

 

How you do it. You just go to a surface matching tool again, click on this, intersect in entire model. It will intersect and divide Inter-zone surfaces for you. Click on it, hit OK. And then, the next thing is surface matching. Click on this, match in entire model, click OK. Now, if you move this section plane, you can see all internal walls are a kind of green in color, you can see, right. If I click on any of this green wall, and look into intersect, or, inspector tool, you can see the properties have been changed. Although, outside boundary condition is some other surface, the internal surface. No sun exposure, no wind exposure. Very important step. If you remember, there was an, there was a warning here from the OpenStudio people. Some users have reported issues with the intersect functionality in this dialogue. If you experience problems, please try to using the IntersectSpaceGeometery userscript, all right.

 

This userscript lives in OpenStudio main interface. A lot of times, here, in this SketchUp interface, it gives you problems. It's a kind of bug, what OpenStudio has reported for us. In case you want to be very precise, you can, you should run this surface matching in later in OpenStudio interface. Or, you can actually do it right now. What you can do, you can just, like, delete this plane, save this model, save this OpenStudio file here, in OpenStudio interface, open it. Run this script, surface matching script here. Save the model. And, again, open your OSM file in SketchUp. I don't want to confuse you by just jumping in OpenStudio main interface, right now. But, just for now, remember it, that you can fix this bug in OpenStudio main interface, all right. And, I will anyways, run this script for you later in the next video.