Skip to content

Commit

Permalink
Louvered shutter effective openness implemented. Side opennings are s…
Browse files Browse the repository at this point in the history
…till not solved.
  • Loading branch information
vidanovic committed Feb 8, 2025
1 parent b599c71 commit 65444c6
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 4 deletions.
50 changes: 49 additions & 1 deletion src/Tarcog/src/EffectiveOpenness.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,49 @@ namespace EffectiveLayers
return m_Thickness;
}

EffectiveLayerLouveredShutter::EffectiveLayerLouveredShutter(
double width,
double height,
double thickness,
const FenestrationCommon::LouveredShutter::Geometry & geometry,
const ShadeOpenness & openness) :
EffectiveLayer(width,
height,
thickness,
openness,
{1.385e-01, 8.805e-01, 0.0580255, 1.225e-01},
ThermalPermeability::LouveredShutter::permeabilityFactor(geometry)),
m_Geometry(geometry)
{}

EffectiveOpenness EffectiveLayerLouveredShutter::getEffectiveOpenness()
{
const auto area{m_Width * m_Height};
const auto openness_factor{
std::max(0.0,
1
- std::pow(2 / FenestrationCommon::WCE_PI
* FenestrationCommon::radians(m_Geometry.SlatAngle),
4))};
const auto Ah_eff{area * coefficients.C1
* (std::pow(m_PermeabilityFactor * openness_factor, coefficients.C2))
- coefficients.C3
* std::cos(FenestrationCommon::radians(m_Geometry.SlatAngle))};
const auto Al_eff{m_ShadeOpenness.Dl * m_Height * coefficients.C3};
const auto Ar_eff{m_ShadeOpenness.Dr * m_Height * coefficients.C3};
const auto Atop_eff{m_ShadeOpenness.Dtop * m_Width * coefficients.C4};
const auto Abot_eff{m_ShadeOpenness.Dbot * m_Width * coefficients.C4};
return {Ah_eff, Al_eff, Ar_eff, Atop_eff, Abot_eff, m_PermeabilityFactor};
}

double EffectiveLayerLouveredShutter::effectiveThickness()
{
return coefficients.C4
* (m_Geometry.SlatWidth * std::cos(FenestrationCommon::radians(m_Geometry.SlatAngle))
+ m_Geometry.SlatThickness
* std::abs(std::sin(FenestrationCommon::radians(m_Geometry.SlatAngle))));
}

EffectiveLayerPerforated::EffectiveLayerPerforated(
double width,
double height,
Expand Down Expand Up @@ -180,7 +223,12 @@ namespace EffectiveLayers
const auto Ar_eff{m_ShadeOpenness.Dr * m_Height};
const auto Atop_eff{m_ShadeOpenness.Dtop * m_Width};
const auto Abot_eff{m_ShadeOpenness.Dbot * m_Width};
return {m_EffectiveFrontThermalOpennessArea, Al_eff, Ar_eff, Atop_eff, Abot_eff, m_PermeabilityFactor};
return {m_EffectiveFrontThermalOpennessArea,
Al_eff,
Ar_eff,
Atop_eff,
Abot_eff,
m_PermeabilityFactor};
}

double EffectiveLayerUserDefined::effectiveThickness()
Expand Down
17 changes: 17 additions & 0 deletions src/Tarcog/src/EffectiveOpenness.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,23 @@ namespace EffectiveLayers
double effectiveThickness() override;
};

class EffectiveLayerLouveredShutter : public EffectiveLayer
{
public:
EffectiveLayerLouveredShutter(
double width,
double height,
double thickness,
const FenestrationCommon::LouveredShutter::Geometry & geometry,
const ShadeOpenness & openness = {0, 0, 0, 0});

[[nodiscard]] EffectiveOpenness getEffectiveOpenness() override;
[[nodiscard]] double effectiveThickness() override;

private:
FenestrationCommon::LouveredShutter::Geometry m_Geometry;
};

class EffectiveLayerPerforated : public EffectiveLayerCommon
{
public:
Expand Down
23 changes: 21 additions & 2 deletions src/Tarcog/tst/units/EffectiveLayers.unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ TEST(TestEffectiveLayers, TestVenetianVerticalEffectiveLayerWithTopAndBotOpennes
EXPECT_NEAR(0, effectiveOpenness.Ar, 1e-8);
}

TEST(TestEffectiveLayers, TestEffectiveLayerCommon) {
TEST(TestEffectiveLayers, TestEffectiveLayerCommon)
{
SCOPED_TRACE("Begin Test: Effective layer common.");

const auto width{1.0}; // m
Expand All @@ -110,7 +111,7 @@ TEST(TestEffectiveLayers, TestEffectiveLayerCommon) {
const auto permeabilityFactor{0.15};

EffectiveLayers::EffectiveLayerCommon common{
width, height, materialThickness, permeabilityFactor};
width, height, materialThickness, permeabilityFactor};

const auto effectiveThickness{common.effectiveThickness()};

Expand Down Expand Up @@ -176,6 +177,24 @@ TEST(TestEffectiveLayers, TestPerforatedEffectiveOpenness)
EXPECT_NEAR(7.2e-3, effectiveOpenness.Ar, 1e-8);
}

TEST(TestEffectiveLayer, TestLouveredShutterEffectiveOpenness)
{
constexpr auto systemWidth{1.0}; // m
constexpr auto systemHeight{1.0}; // m
constexpr auto materialThickness{0.0006}; // m
FenestrationCommon::LouveredShutter::Geometry geometry{0.0889, 0.01, 87.0, 0.0762};
const EffectiveLayers::ShadeOpenness openness{0.0, 0.0, 0.0, 0.0};

EffectiveLayers::EffectiveLayerLouveredShutter louveredShutter{
systemWidth, systemHeight, materialThickness, geometry, openness};

EXPECT_NEAR(0.00179327, louveredShutter.effectiveThickness(), 1e-8);

const auto effectiveOpenness{louveredShutter.getEffectiveOpenness()};
EXPECT_NEAR(0.00464752, effectiveOpenness.EffectiveFrontThermalOpennessArea, 1e-8);
EXPECT_NEAR(0.295495, effectiveOpenness.PermeabilityFactor, 1e-6);
}

TEST(TestEffectiveLayers, RadiusFromRise)
{
double curvature{23.88962765};
Expand Down
2 changes: 1 addition & 1 deletion src/Tarcog/tst/units/PermeabilityFactors.unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,5 @@ TEST_F(TestPermeabilityFactors, TestLouveredShutterPermeability)
const auto permeabilityOpenness{
ThermalPermeability::LouveredShutter::permeabilityFactor(geometry)};

EXPECT_NEAR(0.295494779044715, permeabilityOpenness, 1e-6);
EXPECT_NEAR(0.295495, permeabilityOpenness, 1e-6);
}

0 comments on commit 65444c6

Please sign in to comment.