(@Ruth Urban : not an answer per se, but this may narrow down the issue).
GHX horizontal trench options in OpenStudio (App vs SDK) have evolved somewhat over the last 12 months (e.g. this PR), between SDK v3.5.0 and v3.6.0. From the comments, this may continue to evolve through SDK v3.8.0. I suspect you're using OpenStudio Application v1.6.0 (i.e. SDK v3.6.1), as the code seems to be tripping here (line 175). Yet it's unclear if it's on the App side of things (vs the SDK), incomplete/invalid input elsewhere, etc.
FYI, if I take the US DOE Prototype Warehouse and apply the following changes:
require "openstudio"
translator = OpenStudio::OSVersion::VersionTranslator.new
path = OpenStudio::Path.new("warehouse.osm")
model = translator.loadModel(path)
model = model.get
trench = OpenStudio::Model::GroundHeatExchangerHorizontalTrench.new(model)
loop = model.getPlantLoopByName("Main Service Water Loop").get
loop.addSupplyBranchForComponent(trench)
model.save("alt_warehouse.osm", true)
I can then re-open the altered file with the App:
... where the undisturbed ground temperature model has been generated automatically. Simulation runs without any warnings/errors (of course, results are meaningless in this case). I don't believe one can otherwise add (let alone edit) an undisturbed ground temperature model with the App. If it's greyed out in your case, it would appear the undisturbed ground temperature model hasn't been generated, isn't found, or something along those lines.
Can you edit your initial question by providing more info?
- OpenStudio Application version?
- does the saved .osm file hold an instance of OS:Site:GroundTemperature:Undisturbed:KusudaAchenbach?
- if so, can you post the .osm excerpt?
- might as well post the OS:GroundHeatExchanger:HorizontalTrench .osm definition ...
EDIT @Ruth Urban : OK, I can reproduce your exact issue with the basic test I initially suggested (modified warehouse example above). If I manually delete the "Undisturbed Ground Temperature Model" parameter of an OS:GroundHeatExchanger:HorizontalTrench object in an .osm file (just like your .osm excerpt) :
OS:GroundHeatExchanger:HorizontalTrench,
{3f4c66c5-cedc-4dbb-943d-73e64ad57fb9}, !- Handle
Ground Heat Exchanger Horizontal Trench 1, !- Name
{920159c0-63d1-48eb-a2df-b275b0aed5f3}, !- Inlet Node Name
{3640a33d-46e5-467d-9c1c-73a65c8cd5e2}, !- Outlet Node Name
0.004, !- Design Flow Rate {m3/s}
75, !- Trench Length in Pipe Axial Direction {m}
2, !- Number of Trenches
2, !- Horizontal Spacing Between Pipes {m}
0.016, !- Pipe Inner Diameter {m}
0.02667, !- Pipe Outer Diameter {m}
1.25, !- Burial Depth {m}
1.08, !- Soil Thermal Conductivity {W/m-K}
962, !- Soil Density {kg/m3}
2576, !- Soil Specific Heat {J/kg-K}
0.3895, !- Pipe Thermal Conductivity {W/m-K}
641, !- Pipe Density {kg/m3}
2405, !- Pipe Specific Heat {J/kg-K}
30, !- Soil Moisture Content Percent {percent}
50, !- Soil Moisture Content Percent at ...
, !- Undisturbed Ground Temperature Model
0.408; !- Evapotranspiration Ground Cover Parameter
... the OpenStudio binary/executable will crash with the following:
[BOOST_ASSERT] <2> Assertion modelObject failed on line 175 of openstudio::model::ModelObject openstudio::model::detail::GroundHeatExchangerHorizontalTrench_Impl::undisturbedGroundTemperatureModel() const in file /Users/jenkins/git/OpenStudioFull/3.6.1/src/model/GroundHeatExchangerHorizontalTrench.cpp.
Some OpenStudio objects can have certain parameters ... (more)
I'm able to reproduce the crash, based on your .osm excerpt. See the recent EDIT in the initial answer (bug description + short term solution).