Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

zhengangzhu's profile - activity

2023-02-10 09:36:44 -0500 received badge  Famous Question (source)
2020-04-06 04:25:01 -0500 received badge  Notable Question (source)
2018-01-10 02:00:13 -0500 received badge  Popular Question (source)
2016-02-16 19:02:42 -0500 commented question ZoneAirContaminantBalance setschedule failed

Is it a bug of new version of Open Studio?

2016-02-02 01:58:41 -0500 asked a question ZoneAirContaminantBalance setschedule failed

ScheduleConstant OutdoorAirCO2ConcentrationSchedule = new ScheduleConstant(model); OutdoorAirCO2ConcentrationSchedule.setValue(400); model.getZoneAirContaminantBalance().setOutdoorCarbonDioxideSchedule(OutdoorAirCO2ConcentrationSchedule);

Why it's failed and throw exception Description: C:\Git\OpenStudio_2\openstudiocore\src\model\ScheduleTypeRegistry.cpp@88 : No 'Outdoor Carbon Dioxide' Schedule is registered for class ZoneAirContaminantBalance.

2015-11-24 02:18:03 -0500 commented answer How to generate the shade via Open Studio SDK?

Yes. With the shading surface group added the shading can be generated in IDF. Thanks.

2015-11-19 18:45:10 -0500 commented answer How to generate the shade via Open Studio SDK?

It's the same with C#. Could you generate the shade in IDF using this code?

2015-11-19 18:44:24 -0500 received badge  Organizer (source)
2015-11-19 02:19:17 -0500 asked a question How to generate the shade via Open Studio SDK?

I use following code trying to generate the shade

Point3dVector points = new Point3dVector();

points.Add(new Point3d(0,1,0));
points.Add(new Point3d(1,1,0));
points.Add(new Point3d(1,0,0));
points.Add(new Point3d(0,0,0));

ShadingSurface shadingSurface = new ShadingSurface(points, model);

but no vertexes set from the generated idf

Shading:Building:Detailed,

  RightFin-{e996d645-5c20-47cf-8df8-faa8b9745cba}, !- Name

  ,                                       !- Transmittance Schedule Name
  ;

Anything else needs to be set to successfully generate the shade?

2015-09-01 22:22:39 -0500 commented answer Can OpenStudio generate ZoneControl:Thermostat?

ThermlZone is translated. Ther ThermalZone has HVAC equipments.

2015-09-01 22:00:31 -0500 commented answer Is SqlFile the only way used by Open Studio to parse the E+ result?

Yes. Thanks very much. So it will call EPMacro.exe, ExpandObjects.exe energyplus.exe directly? What's the benefit compared with RunEp.bat?

And why Open Studio design a little bit complicated EP run framework like workflow, job? To be generic to support other engines in the future?

2015-09-01 21:44:38 -0500 commented answer Can OpenStudio generate ZoneControl:Thermostat?

Yes. I create a OS:ThermostatSetpoint:DualSetpoint and I can see from the OSM file its been set to the thermozone.

2015-09-01 20:16:54 -0500 commented answer Can OpenStudio generate ZoneControl:Thermostat?

Hi Macumber, is it possible that all the ScheduleYear/ScheduleWeek/ScheduleDay setting functions return true but the dualsetpoint and zonecontrol:thermostat not translated to IDF? It's difficult to debug what's the root cause? It's just not generated in IDF. I'm using the C# interface. Do you know how to debug it for these cases?

2015-09-01 20:13:12 -0500 commented question Is SqlFile the only way used by Open Studio to parse the E+ result?

Actually I'd like to understand the way Open Studio dealing with the EnergyPlus results. 1. SqlFile to parse the SQL result and display in Runmanager. Is this the only way in Open Studio? 2. How OpenStudio triggers the EnergyPlus simulation? Is it also use the RunEP.bat in EnergyPlus or call the EnergyPlus.exe directly? Looks OpenStudio uses a lot of code like workflow, job in its RunManager.

2015-09-01 02:42:11 -0500 asked a question Is SqlFile the only way used by Open Studio to parse the E+ result?

Is SqlFile the only way used by Open Studio in RunManager to get the E+ result? And the only output used is the sql format?

2015-08-31 19:44:15 -0500 commented answer Can OpenStudio generate ZoneControl:Thermostat?

Thanks. But the key issue is not resolved. Dualsetpoint and Zonecontrol:thermostat are not generated while the schedules are generated. At least all the set functions return true

2015-08-31 02:26:37 -0500 received badge  Commentator
2015-08-31 02:26:37 -0500 commented question Can OpenStudio generate ZoneControl:Thermostat?

I manually set the CalenderYear of YearDescription as 2009. All ScheduleYear setting return true. But there is still no ZoneControl:Thermostat in IDF

2015-08-31 02:16:56 -0500 commented question Can OpenStudio generate ZoneControl:Thermostat?

Is it because of "if (yd.assumedYear() != untilDate.assumedBaseYear()){ LOG(Error, "Assumed base year " << untilDate.assumedBaseYear() << " of untilDate does not match this model's assumed base year of " << yd.assumedYear()); return false; }"

But I can't get the assumedyear of YearDescription from C#. I know assumedyear of untilDate is 2009. How can I get the Open Studio log?

2015-08-30 22:40:19 -0500 commented question Can OpenStudio generate ZoneControl:Thermostat?

Add a scheduleweek to a scheduleyear sometimes success sometimes fail. I don't know why. Any restrictions for the scheduleday/scheduleweek?

2015-08-30 21:06:10 -0500 commented question Can OpenStudio generate ZoneControl:Thermostat?

Do I need to check the function return value each time? Will Open Studio throw any exceptions?No document or comment explain what exceptions will be thrown

2015-08-30 20:50:59 -0500 commented question Can OpenStudio generate ZoneControl:Thermostat?

I use the following code to add the schedules. "res1" and "res2" return false while "res3" and "res4" return true. I guess something wrong with the schedules. Open Studio doesn't tell users any message in this case which is not good. Date untilDate = new Date(new MonthOfYear(12), 31); bool res1 = coolScheduleYear.addScheduleWeek(untilDate, coolScheduleWeek); bool res2 = heatScheduleYear.addScheduleWeek(untilDate, heatScheduleWeek); bool res3 = dualSetpoint.setCoolingSetpointTemperatureSchedule(coolScheduleYear); bool res4 = dualSetpoint.setHeatingSetpointTemperatureSchedule(heatScheduleYear)

2015-08-28 00:52:17 -0500 asked a question OS:RunPeriodControl:SpecialDays is generated while can't be found in idf

The OS:RunPeriodControl:SpecialDays is generated with Open Studio SDK, but in the translated IDF there is no this object? Does Open Studio support that?

2015-08-28 00:14:43 -0500 asked a question Can OpenStudio generate ZoneControl:Thermostat?

I need to create a thermostat dualsetpoint But when I set ScheduleWeek for the ScheduleYear using C# code it's failed. After reading the source code, the problem is it will check the assumedYear. "if (yd.assumedYear() != untilDate.assumedBaseYear()){ LOG(Error, ..."

First question: Do I need to check the function return value each time? Open Studio does not throw exceptions? If throw where can I know what exceptions may be thrown for each function? How can I get the Open Studio log for debugging like the log in this example?

Second question: I know the assumedyear of the date is 2009. Then I set the yeardescription's assumedyear to 2009 too. The scheduleweek set successfully. Then two scheduleyears set for the OS:ThermostatSetpoint:DualSetpoint. But still no dualsetpoint and zonecontrol:thermostat in the IDF

Third question: What does assumedyear mean? Why do we check this?

2015-07-31 01:26:21 -0500 asked a question Use C# SqlFile to get the Energy Plus result

Using the following C# code, there is always a System.AccessViolationException

Path path = new Path("D:\\IdealAirSystem.sql");

SqlFile sqlFile = new SqlFile(path);

Is this the correct way to use SqlFile? (The sql file exists at that path)

2015-06-07 22:25:02 -0500 commented question Register C# dll as COM component

Do you mean the Open Studio version? It's updated.

2015-06-07 22:24:14 -0500 received badge  Editor (source)
2015-06-07 21:22:30 -0500 asked a question Register C# dll as COM component

Hi ,

I'm trying to register OpenStudio related dll as COM components so that I can call from other languages such as VB with RegAsm.exe provided by Microsoft. But there is an exception "Warning: No types were registered"

The ComVisible property in the AssembleInfo.cs should be set to true to resolve this issue. But I don't have this since the dlls are coming from the installation.

Anyone can help? thank

2015-05-27 01:21:37 -0500 commented answer "Induced Air Outlet Port List" for Return Plenum

Can we specify the secondary air inlet not automatically set? No APIs open for this operation.

2015-05-21 03:33:54 -0500 asked a question What does "Port" means in Open Studio

I know the node and also convert model objects like HeatExchangerAirToAirSensibleAndLatent.primaryAirInletModelObject to node

but I don't know what does HeatExchangerAirToAirSensibleAndLatent.primaryAirInletPort mean? Seems no port concept in Energy Plus.

2015-05-20 03:44:40 -0500 asked a question How to get the node of the zone splitter in C#

In C++ the node can get from this airLoop.zoneSplitter().lastOutletModelObject()->cast<node>()

But in C# the related functions are not implemented as the compiler complains

public OptionalNode supplySplitterInletNode(); public OptionalNode zoneSplitterInletNode(int zoneSplitterIndex);

So I'm in trouble to find the following node and add AirTerminalSingleDuctParallelPIUReheat to it. Any one can help? Thanks

image description

2015-05-20 03:38:44 -0500 commented answer how to set day of week for start day using C#

Thanks very much Macumber, due to the company policy I can't tell you the details at this stage.

2015-04-29 21:33:22 -0500 commented answer how to set day of week for start day using C#

I'm very sorry I have problems to use the C# API to call this function. Could you show me the code example to use this function?

With following code the function can't be recognized using OpenStudio; Model model = new Model(); getYearDescription(model);

2015-04-28 20:05:47 -0500 commented answer how to set day of week for start day using C#

Hi Macumber,

Thank you very much. For getYearDescription(model) do you mean it's a method of Model? There is no method named getYearDescription in the Model. Only one method public SWIGTYPEpboostoptionalTopenstudiomodelYearDescriptiont yearDescription();

I don't understand the type "SWIGTYPEpboostoptionalTopenstudiomodelYearDescriptiont".

2015-04-28 07:22:30 -0500 received badge  Student (source)
2015-04-28 02:05:12 -0500 asked a question how to set day of week for start day using C#

I can set it using C++

openstudio::model::YearDescription yd1 = model.getUniqueModelObject<openstudio::model::YearDescription>(); yd1.setDayofWeekforStartDay("Sunday");

In C#, there is a class YearDescription But I don't know how to set it into the Model

Anyone can help? Thanks