Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 11 additions & 14 deletions benchmarking/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,18 @@ def benchmark() -> None:
Rotation=45,
WWR=0.3,
NFloors=2,
FacadeRValue=3.0,
FacadeFramingSystem="2x4 16OCC Woodframe",
FacadeCavityInsulationRValue=1.2,
FacadeExteriorInsulationRValue=1.0,
FacadeInteriorInsulationRValue=0.0,
FacadeInteriorFinish="drywall",
FacadeExteriorFinish="brick_veneer",
RoofRValue=3.0,
SlabRValue=3.0,
GroundSlabSystem="BasicConcrete",
GroundSlabInsulationRValue=1.5,
GroundSlabInsulationMaterial="XPSBoard",
GroundSlabInteriorFinish="wood_floor",
GroundSlabStructuralThickness=0.15,
WindowUValue=3.0,
WindowSHGF=0.7,
WindowTVis=0.5,
Expand Down Expand Up @@ -65,18 +74,6 @@ def benchmark() -> None:
OccupancyPMInterp=0.5,
OccupancyWeekendPeakInterp=0.15,
OccupancySummerPeakInterp=0.85,
# HSPRegularWeekdayWorkhours=21,
# HSPRegularWeekdayNight=21,
# HSPSummerWeekdayWorkhours=21,
# HSPSummerWeekdayNight=21,
# HSPWeekendWorkhours=21,
# HSPWeekendNight=21,
# CSPRegularWeekdayWorkhours=23,
# CSPRegularWeekdayNight=23,
# CSPSummerWeekdayWorkhours=23,
# CSPSummerWeekdayNight=23,
# CSPWeekendWorkhours=23,
# CSPWeekendNight=23,
HeatingSetpointBase=21,
SetpointDeadband=2,
HeatingSetpointSetback=2,
Expand Down
1 change: 1 addition & 0 deletions epinterface/sbem/components/materials.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class CommonMaterialPropertiesMixin(BaseModel):
"Finishes",
"Siding",
"Sealing",
"Bio",
]

MaterialRoughness = Literal[
Expand Down
1 change: 1 addition & 0 deletions epinterface/sbem/flat_constructions/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Flat construction objects for SBEM assemblies."""
105 changes: 105 additions & 0 deletions epinterface/sbem/flat_constructions/assemblies.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
"""Envelope assembly builders for semi-flat construction definitions."""

from epinterface.sbem.components.envelope import (
ConstructionAssemblyComponent,
ConstructionLayerComponent,
)
from epinterface.sbem.flat_constructions.materials import (
CEMENT_MORTAR,
CONCRETE_RC_DENSE,
GYPSUM_BOARD,
GYPSUM_PLASTER,
SOFTWOOD_GENERAL,
URETHANE_CARPET,
)


def build_partition_assembly(
*, name: str = "Partition"
) -> ConstructionAssemblyComponent:
"""Build the default interior partition assembly."""
return ConstructionAssemblyComponent(
Name=name,
Type="Partition",
Layers=[
ConstructionLayerComponent(
ConstructionMaterial=GYPSUM_PLASTER,
Thickness=0.02,
LayerOrder=0,
),
ConstructionLayerComponent(
ConstructionMaterial=SOFTWOOD_GENERAL,
Thickness=0.02,
LayerOrder=1,
),
ConstructionLayerComponent(
ConstructionMaterial=GYPSUM_PLASTER,
Thickness=0.02,
LayerOrder=2,
),
],
)


def build_floor_ceiling_assembly(
*,
name: str = "FloorCeiling",
) -> ConstructionAssemblyComponent:
"""Build the default interstitial floor/ceiling assembly."""
return ConstructionAssemblyComponent(
Name=name,
Type="FloorCeiling",
Layers=[
ConstructionLayerComponent(
ConstructionMaterial=URETHANE_CARPET,
Thickness=0.02,
LayerOrder=0,
),
ConstructionLayerComponent(
ConstructionMaterial=CEMENT_MORTAR,
Thickness=0.02,
LayerOrder=1,
),
ConstructionLayerComponent(
ConstructionMaterial=CONCRETE_RC_DENSE,
Thickness=0.15,
LayerOrder=2,
),
ConstructionLayerComponent(
ConstructionMaterial=GYPSUM_BOARD,
Thickness=0.02,
LayerOrder=3,
),
],
)


# def build_envelope_assemblies(
# *,
# facade_wall: SemiFlatWallConstruction,
# roof: SemiFlatRoofConstruction,
# slab: SemiFlatSlabConstruction,
# ) -> EnvelopeAssemblyComponent:
# """Build envelope assemblies from the flat model construction semantics."""
# facade = build_facade_assembly(facade_wall, name="Facade")
# roof_assembly = build_roof_assembly(roof, name="Roof")
# partition = build_partition_assembly(name="Partition")
# floor_ceiling = build_floor_ceiling_assembly(name="FloorCeiling")
# ground_slab = build_slab_assembly(
# slab,
# name="GroundSlabAssembly",
# )

# return EnvelopeAssemblyComponent(
# Name="EnvelopeAssemblies",
# FacadeAssembly=facade,
# FlatRoofAssembly=roof_assembly,
# AtticRoofAssembly=roof_assembly,
# PartitionAssembly=partition,
# FloorCeilingAssembly=floor_ceiling,
# AtticFloorAssembly=floor_ceiling,
# BasementCeilingAssembly=floor_ceiling,
# GroundSlabAssembly=ground_slab,
# GroundWallAssembly=ground_slab,
# ExternalFloorAssembly=ground_slab,
# )
144 changes: 144 additions & 0 deletions epinterface/sbem/flat_constructions/base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
"""An AB base class for flat construction objects which defines the interface for all flat construction objects."""

from typing import Literal

from pydantic.dataclasses import dataclass

from epinterface.sbem.components.materials import ConstructionMaterialComponent
from epinterface.sbem.flat_constructions.materials import (
MATERIALS_BY_NAME,
MaterialName,
)

SheathingMaterialName = Literal[
"Plywood",
"OSB",
"ParticleBoard",
"Fiberboard",
"ConcreteMC_Light",
# "MetalSheathing",
# "Masonry",
]
CavityInsulationMaterialName = Literal[
"FiberglassBatt",
"MineralWoolBatt",
"CelluloseBatt",
]
ContinuousInsulationMaterialName = Literal[
"XPSBoard",
"PolyisoBoard",
"EPSBoard",
"MineralWoolBoard",
]
FramingMaterialName = Literal[
"SoftwoodGeneral",
"ConcreteMC_Light",
"ConcreteRC_Dense",
# "LightGaugeSteel",
# "StructuralSteel",
# "CMU",
]

MonolithicInfillMaterialName = Literal[
"ConcreteMC_Light",
"ConcreteRC_Dense",
"ClayBrick",
]

MonolithicFramingMaterialName = Literal[
"ConcreteMC_Light",
"ConcreteRC_Dense",
"StructuralSteel",
]

BasicGroundSlabMaterialName = Literal[
"ConcreteMC_Light",
"ConcreteRC_Dense",
]


def get_sheathing_material(
sheathing_material_name: SheathingMaterialName,
) -> ConstructionMaterialComponent:
"""Get the sheathing material component from the material name."""
return MATERIALS_BY_NAME[sheathing_material_name]


@dataclass(frozen=True)
class MatWithThickness:
"""A material with a thickness."""

material: ConstructionMaterialComponent
thickness_m: float


def get_cavity_insulation_material(
cavity_insulation_material_name: CavityInsulationMaterialName,
nominal_r_value: float,
) -> MatWithThickness:
"""Get the cavity insulation material component and thickness from the material name and nominal R-value.

Args:
cavity_insulation_material_name (CavityInsulationMaterialName): The name of the cavity insulation material.
nominal_r_value (float): The nominal R-value of the cavity insulation material.

Returns:
material_with_thickness (MatWithThickness): The cavity insulation material component and thickness.
"""
mat = MATERIALS_BY_NAME[cavity_insulation_material_name]
thickness_m = nominal_r_value * mat.Conductivity
return MatWithThickness(material=mat, thickness_m=thickness_m)


def get_continuous_insulation_material(
continuous_insulation_material_name: ContinuousInsulationMaterialName,
nominal_r_value: float,
) -> MatWithThickness:
"""Get the continuous insulation material component and thickness from the material name and nominal R-value.

Args:
continuous_insulation_material_name (ContinuousInsulationMaterialName): The name of the continuous insulation material.
nominal_r_value (float): The nominal R-value of the continuous insulation material.

Returns:
material_with_thickness (MatWithThickness): The continuous insulation material component and thickness.
"""
mat = MATERIALS_BY_NAME[continuous_insulation_material_name]
thickness_m = nominal_r_value * mat.Conductivity
return MatWithThickness(material=mat, thickness_m=thickness_m)


def get_framing_material(
framing_material_name: FramingMaterialName,
) -> ConstructionMaterialComponent:
"""Get the framing material component from the material name."""
return MATERIALS_BY_NAME[framing_material_name]


def get_monolithic_framing_material(
monolithic_framing_material_name: MonolithicFramingMaterialName,
) -> ConstructionMaterialComponent:
"""Get the monolithic framing material component from the material name."""
return MATERIALS_BY_NAME[monolithic_framing_material_name]


def get_monolithic_infill_material(
monolithic_infill_material_name: MonolithicInfillMaterialName,
) -> ConstructionMaterialComponent:
"""Get the monolithic infill material component from the material name."""
return MATERIALS_BY_NAME[monolithic_infill_material_name]


def get_basic_ground_slab_material(
basic_ground_slab_material_name: BasicGroundSlabMaterialName,
) -> ConstructionMaterialComponent:
"""Get the basic ground slab material component from the material name."""
return MATERIALS_BY_NAME[basic_ground_slab_material_name]


@dataclass(frozen=True)
class FinishTemplate:
"""Default finish material and thickness assumptions."""

material_name: MaterialName
thickness_m: float
Loading
Loading