-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactoring of interpolation functions for blinds Prof and Slat Angle #8591
Changes from 6 commits
2532651
57aa34f
04c0cbe
8e8c211
34957ce
1d74547
c100766
242f33c
30c6570
5cd3283
8a1a02b
7a17319
40e7d68
c8c506d
e15f581
1c3f2e5
75cb7f1
0bb86d5
a0adce1
4bf5a48
c155311
00ec6a3
1e9f393
230c5ef
66b0ee8
ade8f89
c96898b
01c3e0b
4b5e824
57070ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -157,6 +157,27 @@ namespace General { | |
Real64 &XX_1 // Hign bound obtained with maximum number of allowed iterations | ||
); | ||
|
||
constexpr Real64 InterpGeneral(Real64 const Lower, | ||
Real64 const Upper, | ||
Real64 const InterpFac | ||
) | ||
{ | ||
return Lower + InterpFac * (Upper - Lower); | ||
}; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm sure declaring this function |
||
constexpr Real64 InterpProfSlat(Real64 const SlatLower, | ||
Real64 const SlatUpper, | ||
Real64 const ProfLower, | ||
Real64 const ProfUpper, | ||
Real64 const SlatInterpFac, | ||
Real64 const ProfInterpFac | ||
) | ||
{ | ||
Real64 ValA = SlatLower + SlatInterpFac * (SlatUpper - SlatLower); | ||
Real64 ValB = ProfLower + SlatInterpFac * (ProfUpper - ProfLower); | ||
return ValA + ProfInterpFac * (ValB - ValA); | ||
}; | ||
|
||
Real64 InterpSw(Real64 const SwitchFac, // Switching factor: 0.0 if glazing is unswitched, = 1.0 if fully switched | ||
Real64 const A, // Glazing property in unswitched state | ||
Real64 const B // Glazing property in fully switched state | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -163,7 +163,6 @@ namespace HeatBalanceIntRadExchange { | |
typedef Array1D<Real64>::size_type size_type; | ||
|
||
// Using/Aliasing | ||
using General::InterpSlatAng; // Function for slat angle interpolation | ||
using HeatBalanceMovableInsulation::EvalInsideMovableInsulation; | ||
using WindowEquivalentLayer::EQLWindowInsideEffectiveEmiss; | ||
|
||
|
@@ -288,11 +287,8 @@ namespace HeatBalanceIntRadExchange { | |
int const SurfNum = zone_SurfacePtr(ZoneSurfNum); | ||
int const ConstrNum = state.dataSurface->Surface(SurfNum).Construction; | ||
zone_info.Emissivity(ZoneSurfNum) = state.dataConstruction->Construct(ConstrNum).InsideAbsorpThermal; | ||
auto const &surface_window(state.dataSurface->SurfaceWindow(SurfNum)); | ||
if (state.dataConstruction->Construct(ConstrNum).TypeIsWindow && ANY_INTERIOR_SHADE_BLIND(state.dataSurface->SurfWinShadingFlag(SurfNum))) { | ||
zone_info.Emissivity(ZoneSurfNum) = | ||
InterpSlatAng(state.dataSurface->SurfWinSlatAngThisTS(SurfNum), state.dataSurface->SurfWinMovableSlats(SurfNum), surface_window.EffShBlindEmiss) + | ||
InterpSlatAng(state.dataSurface->SurfWinSlatAngThisTS(SurfNum), state.dataSurface->SurfWinMovableSlats(SurfNum), surface_window.EffGlassEmiss); | ||
zone_info.Emissivity(ZoneSurfNum) = state.dataHeatBal->ITABSF(SurfNum); | ||
Comment on lines
-266
to
+264
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, if I'm following correctly, |
||
} | ||
if (state.dataSurface->Surface(SurfNum).MovInsulIntPresent) { | ||
HeatBalanceMovableInsulation::EvalInsideMovableInsulation(state, SurfNum, HMovInsul, AbsInt); | ||
|
@@ -345,8 +341,7 @@ namespace HeatBalanceIntRadExchange { | |
// and emiss is used here that is a weighted combination of shade/blind and glass temp and emiss. | ||
} else if (ANY_INTERIOR_SHADE_BLIND(state.dataSurface->SurfWinShadingFlag(SurfNum))) { | ||
SurfaceTempRad[ZoneSurfNum] = state.dataSurface->SurfWinEffInsSurfTemp(SurfNum); | ||
SurfaceEmiss[ZoneSurfNum] = InterpSlatAng(state.dataSurface->SurfWinSlatAngThisTS(SurfNum), state.dataSurface->SurfWinMovableSlats(SurfNum), surface_window.EffShBlindEmiss) + | ||
InterpSlatAng(state.dataSurface->SurfWinSlatAngThisTS(SurfNum), state.dataSurface->SurfWinMovableSlats(SurfNum), surface_window.EffGlassEmiss); | ||
SurfaceEmiss[ZoneSurfNum] = state.dataHeatBal->ITABSF(SurfNum); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, just use |
||
} else { | ||
SurfaceTempRad[ZoneSurfNum] = SurfaceTemp(SurfNum); | ||
SurfaceEmiss[ZoneSurfNum] = construct.InsideAbsorpThermal; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6 new
SurfWin*
arrays to avoid recomputing values.