MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / getDefaultConstruction

Method getDefaultConstruction

src/model/DefaultConstructionSet.cpp:182–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180 }
181
182 boost::optional<ConstructionBase> DefaultConstructionSet_Impl::getDefaultConstruction(const PlanarSurface& planarSurface) const {
183 boost::optional<ConstructionBase> result;
184 if (planarSurface.optionalCast<Surface>()) {
185
186 boost::optional<DefaultSurfaceConstructions> defaultSurfaceConstructions;
187 std::string outsideBoundaryCondition = planarSurface.cast<Surface>().outsideBoundaryCondition();
188 if (istringEqual("Outdoors", outsideBoundaryCondition)) {
189 defaultSurfaceConstructions = this->defaultExteriorSurfaceConstructions();
190 } else if (istringEqual("Ground", outsideBoundaryCondition) || istringEqual("GroundSlabPreprocessorAverage", outsideBoundaryCondition)
191 || istringEqual("GroundSlabPreprocessorCore", outsideBoundaryCondition)
192 || istringEqual("GroundSlabPreprocessorPerimeter", outsideBoundaryCondition)
193 || istringEqual("GroundBasementPreprocessorAverageWall", outsideBoundaryCondition)
194 || istringEqual("GroundBasementPreprocessorAverageFloor", outsideBoundaryCondition)
195 || istringEqual("GroundBasementPreprocessorUpperWall", outsideBoundaryCondition)
196 || istringEqual("GroundBasementPreprocessorLowerWall", outsideBoundaryCondition)) {
197 defaultSurfaceConstructions = this->defaultGroundContactSurfaceConstructions();
198 } else if (istringEqual("Surface", outsideBoundaryCondition)) {
199 defaultSurfaceConstructions = this->defaultInteriorSurfaceConstructions();
200 } else if (istringEqual("Adiabatic", outsideBoundaryCondition)) {
201 // Adiabatic is special - doesn't has multiple choices by orientation - so return directly
202 result = this->adiabaticSurfaceConstruction();
203 return result;
204 } else {
205 //GroundFCfactorMethod
206 //OtherSideCoefficients
207 //OtherSideConditionsModel
208 }
209
210 if (defaultSurfaceConstructions) {
211 std::string surfaceType = planarSurface.cast<Surface>().surfaceType();
212 if (istringEqual("Floor", surfaceType)) {
213 result = defaultSurfaceConstructions->floorConstruction();
214 } else if (istringEqual("Wall", surfaceType)) {
215 result = defaultSurfaceConstructions->wallConstruction();
216 } else if (istringEqual("RoofCeiling", surfaceType)) {
217 result = defaultSurfaceConstructions->roofCeilingConstruction();
218 }
219 }
220
221 } else if (planarSurface.optionalCast<SubSurface>()) {
222
223 boost::optional<DefaultSubSurfaceConstructions> defaultSubSurfaceConstructions;
224 boost::optional<Surface> surface = planarSurface.cast<SubSurface>().surface();
225 if (surface) {
226 std::string outsideBoundaryCondition = surface->outsideBoundaryCondition();
227 if (istringEqual("Outdoors", outsideBoundaryCondition)) {
228 defaultSubSurfaceConstructions = this->defaultExteriorSubSurfaceConstructions();
229 } else if (istringEqual("Surface", outsideBoundaryCondition)) {
230 defaultSubSurfaceConstructions = this->defaultInteriorSubSurfaceConstructions();
231 } else {
232 //Adiabatic
233 //Ground
234 //GroundFCfactorMethod
235 //OtherSideCoefficients
236 //OtherSideConditionsModel
237 //GroundSlabPreprocessorAverage
238 //GroundSlabPreprocessorCore
239 //GroundSlabPreprocessorPerimeter

Callers

nothing calls this directly

Tested by

no test coverage detected