-
Notifications
You must be signed in to change notification settings - Fork 394
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
CondFD Conductivity/Specific Heat Actuator Bug #9221
Conversation
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.
I boneheadedly missed that the heat flux with/without EMS actuated k and cp values were not matching before 😒 . This is due to missing updating k and cp in two places with the EMS overrides. The heat flux values now match.
The plot below shows the direct and ems heat flux values for one surface. "Direct" values come from setting k and cp directly in the IDF, and the "ems" values come from setting k and cp to different values in the IDF and then modifying them back to the original values using EMS.
@@ -110,7 +110,7 @@ \subsection{Conduction Finite Difference}\label{conduction-finite-difference} | |||
Several actuators, called ``CondFD Surface Material Layer,'' are available with actuated component control types for models that use the Conduction Finite Difference solution for conduction through surfaces. These are described below. | |||
|
|||
\begin{itemize} | |||
\item ``Thermal Conductivity''. Has units of [W/m-K]. Controls the thermal conductivity of the specified material layer within a given surface. Actuator is named from the surface name and material layer name combined with a colon ":". E.g. "SURFNAME:MATERIALLAYERNAME" | |||
\item ``Thermal Conductivity''. Has units of [W/m-K]. Controls the thermal conductivity of the specified material layer within a given surface. Actuator is named from the surface name and material layer name combined with a colon ``:''. E.g. ``SURFNAME:MATERIALLAYERNAME'' |
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.
Updated to use correct quotation marks.
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.
👍
\paragraph{CondFD EMS Heat Source Power After Layer} | ||
|
||
This output is the heat power added after material layer N from the EMS heat flux actuator (Component type: ``CondFD Surface Material Layer''; Control type: ``Heat Flux''). Only valid for the CondFD solution algorithm. | ||
|
||
\paragraph{CondFD EMS Heat Source Energy After Layer} | ||
|
||
This output is the heat energy added after material layer N from the EMS heat flux actuator (Component type: ``CondFD Surface Material Layer''; Control type: ``Heat Flux''). Energy is aggregated on the electricity meter and is only valid for the CondFD solution algorithm. | ||
|
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.
New EMS-specific output vars are now referenced here.
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.
Good addition.
ktA1 = kt; | ||
ktA2 = kt; |
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.
Bugfix: updating conductivity here with EMS override value.
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.
Yep, good call.
// EMS Conductivity 2 Override | ||
if (condActuator2.isActuated) { | ||
kt2 = condActuator1.actuatedValue; | ||
} | ||
|
||
// EMS Specific Heat 2 Override | ||
if (specHeatActuator2.isActuated) { | ||
Cp2 = specHeatActuator1.actuatedValue; | ||
} | ||
|
||
// Update EMS internal variables | ||
surfFD.condNodeReport(i) = kt1; | ||
surfFD.specHeatNodeReport(i) = Cp1; | ||
surfFD.condNodeReport(i + 1) = kt2; | ||
surfFD.specHeatNodeReport(i + 1) = Cp2; | ||
|
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.
Bugfix: updating k and cp here with EMS override values.
// EMS Conductivity 2 Override | ||
if (condActuator2.isActuated) { | ||
kt2 = condActuator2.actuatedValue; | ||
} | ||
|
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.
Unused code, removing.
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.
Awesome
// EMS Specific Heat 2 Override | ||
if (specHeatActuator2.isActuated) { | ||
Cp2 = specHeatActuator2.actuatedValue; | ||
} |
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.
Unused code, removing.
state.dataHeatBalFiniteDiffMgr->SurfaceFD(Surf).condNodeReport(i) = kt1; | ||
state.dataHeatBalFiniteDiffMgr->SurfaceFD(Surf).specHeatNodeReport(i) = Cp1; | ||
state.dataHeatBalFiniteDiffMgr->SurfaceFD(Surf).condNodeReport(i + 1) = kt2; | ||
state.dataHeatBalFiniteDiffMgr->SurfaceFD(Surf).specHeatNodeReport(i + 1) = Cp2; | ||
surfFD.condNodeReport(i) = kt1; | ||
surfFD.specHeatNodeReport(i) = Cp1; | ||
surfFD.condNodeReport(i + 1) = kt2; | ||
surfFD.specHeatNodeReport(i + 1) = Cp2; |
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.
Renaming with already-existing local reference.
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.
Nice.
state.dataHeatBalFiniteDiffMgr->SurfaceFD(Surf).condNodeReport(i) = kt1; | ||
state.dataHeatBalFiniteDiffMgr->SurfaceFD(Surf).specHeatNodeReport(i) = Cp1; | ||
state.dataHeatBalFiniteDiffMgr->SurfaceFD(Surf).condNodeReport(i + 1) = kt2; | ||
state.dataHeatBalFiniteDiffMgr->SurfaceFD(Surf).specHeatNodeReport(i + 1) = Cp2; | ||
surfFD.condNodeReport(i) = kt1; | ||
surfFD.specHeatNodeReport(i) = Cp1; | ||
surfFD.condNodeReport(i + 1) = kt2; | ||
surfFD.specHeatNodeReport(i + 1) = Cp2; |
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.
Renaming with already-existing local reference.
@@ -110,7 +110,7 @@ \subsection{Conduction Finite Difference}\label{conduction-finite-difference} | |||
Several actuators, called ``CondFD Surface Material Layer,'' are available with actuated component control types for models that use the Conduction Finite Difference solution for conduction through surfaces. These are described below. | |||
|
|||
\begin{itemize} | |||
\item ``Thermal Conductivity''. Has units of [W/m-K]. Controls the thermal conductivity of the specified material layer within a given surface. Actuator is named from the surface name and material layer name combined with a colon ":". E.g. "SURFNAME:MATERIALLAYERNAME" | |||
\item ``Thermal Conductivity''. Has units of [W/m-K]. Controls the thermal conductivity of the specified material layer within a given surface. Actuator is named from the surface name and material layer name combined with a colon ``:''. E.g. ``SURFNAME:MATERIALLAYERNAME'' |
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.
👍
\paragraph{CondFD EMS Heat Source Power After Layer} | ||
|
||
This output is the heat power added after material layer N from the EMS heat flux actuator (Component type: ``CondFD Surface Material Layer''; Control type: ``Heat Flux''). Only valid for the CondFD solution algorithm. | ||
|
||
\paragraph{CondFD EMS Heat Source Energy After Layer} | ||
|
||
This output is the heat energy added after material layer N from the EMS heat flux actuator (Component type: ``CondFD Surface Material Layer''; Control type: ``Heat Flux''). Energy is aggregated on the electricity meter and is only valid for the CondFD solution algorithm. | ||
|
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.
Good addition.
ktA1 = kt; | ||
ktA2 = kt; |
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.
Yep, good call.
// EMS Conductivity 2 Override | ||
if (condActuator2.isActuated) { | ||
kt2 = condActuator2.actuatedValue; | ||
} | ||
|
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.
Awesome
state.dataHeatBalFiniteDiffMgr->SurfaceFD(Surf).condNodeReport(i) = kt1; | ||
state.dataHeatBalFiniteDiffMgr->SurfaceFD(Surf).specHeatNodeReport(i) = Cp1; | ||
state.dataHeatBalFiniteDiffMgr->SurfaceFD(Surf).condNodeReport(i + 1) = kt2; | ||
state.dataHeatBalFiniteDiffMgr->SurfaceFD(Surf).specHeatNodeReport(i + 1) = Cp2; | ||
surfFD.condNodeReport(i) = kt1; | ||
surfFD.specHeatNodeReport(i) = Cp1; | ||
surfFD.condNodeReport(i + 1) = kt2; | ||
surfFD.specHeatNodeReport(i + 1) = Cp2; |
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.
Nice.
Great fix here, the change makes sense, and some extra cleanup along the way. CI is happy with it except the license year, which is fixed separately. Not wasting more cycles just for that. Merging this in, thanks @mitchute ! |
CondFD Conductivity/Specific Heat Actuator Bug
Pull request overview