OpenStudio EnergyPlus - Measure Writing Using AI
In this video we will use Artificial Intelligence (Claude AI) to write a custom OpenStudio measure. We will use the Apply Measure Now command to transform our OpenStudio model, run the simulation, and check out the results. The measure created in this tutorial is available on the Building Component Library here: https://bcl.nrel.gov/content/a1b2c3d4-e5f6-7890-abcd-ef1234567890 Transcript: All right, we are back. This time we are going to talk about custom measure writing. We are going to write a custom measure in OpenStudio. This time we are going to use AI to do that and we are going to use Claude to write the code for that. We have a simple model. This is just our shoe box model for now, and right now it has got a simple packaged rooftop air conditioner system installed. What we want to do is, we want to install an air source heat pump system hydronic... sorry, air to water heat pump type system. What we can do is we will just delete this loop for now. Go ahead and add a loop. This time we are going to add a fully hydronic loop. Chilled water and heating water loop to the model. That adds a packaged VAV system, a hydronic system, to the to the model. We will just add our zone in here. Now we have our hydraulic loops, a chilled water and a heating water loop. Here is our chilled water loop. It has got a water source condenser on it. This one is actually connected to a cooling tower. Then we've also got our hot water loop, which is just a simple hot water boiler. But what we want to do is change this to an airsource chiller. An airsource heat pump. At the moment, OpenStudio does not have air source heat pumps. I believe it is just water source heat pumps. Yes, water to water cooling and water to water heating. If we go to the input output reference manual and take a look at plant loop heat pumps, that is what these are right here. This is a heat pump water to water equation fit I believe. No, chiller. Okay. Right now what we have existing is just a simple electric chiller. But what is in the open standard OpenStudio library is these equation fit cooling and heating heat pumps. Unfortunately those are water source only. In order to get the airsource heat pump, we have to go with an EIR formulated heat pump, which is these two down here. We are going to have to swap these out. We are going to write a custom measure to swap these out. Let us go ahead and go to Claude. We need to formulate our prompt. I have an existing OpenStudio model with a chiller. Let us see. I have an existing OpenStudio model. I want to write a custom measure to replace. I want to write a custom measure. A custom measure that can be applied using the Apply Measure Now. That will be this up here: Apply Measure Now. I want the measure to do the following tasks. The existing condenser water plant loop with CoolingTower:SingleSpeed should be deleted. The existing water source chiller, Chiller:Electric:EIR should be replaced with... replace it with this heat pump EIR cooling; HeatPump:PlantLoop:EIR:Cooling. A new... should be replaced with an air source HeatPump:PlantLoop:EIR:Cooling. The existing heating water loop with boiler hot water; Boiler:HotWater. Let us see, on the existing heating water loop with boiler hot water should be... let us see. How can we write this? A new... let us see... HeatPump:PlantLoop:EIR:Heating should be added in parallel (Series) to the existing heating water loop. The existing boiler hot water...in parallel to the existing boiler hot water...on the heating water loop. Let us see, we should probably specify this is also air source. A new air source HeatPump:PlantLoop:EIR:Heating should be added. Okay. Let us see. Then we also want Claude to create a measure.xml file. Also please create a measure.xml file and readme.md file for the above measure. Let us see. I think if we go into our measures folder and just look at any one of these. We need to have a readme.md file and then a measure.xml file and then Claude is going to create, well, it is going to... he's going to create all three of these items for us. So let us look this over. Custom measure tasks. Right. Let us give this a try. All right, Claude has completed it. He has even given us some optional arguments that we can specify in the measure. We will go ahead and click download all. We have to drop this into our measures folder, My Measures folder. We need to create a new folder in there. All right. The folder needs to be named... Let us see. I believe the folder needs to be named something like this right here. This one right here, I believe: name. Then we can drop all three of these in here. Let us go back to our... let us go back to OpenStudio. We will go to apply measure now, and I believe it should be under HVAC. I guess it would be cooling here. Yeah. ... Complete transcript: https: //www.helix-engineers.net/technical-articles
Download
0 formatsNo download links available.