Skip to content

Commit

Permalink
Merge branch 'develop' into PR_opened/Fix_7151_GeneratorPVAvailSched
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarrec committed Aug 28, 2019
2 parents 83e9c36 + db22e04 commit d16bf86
Show file tree
Hide file tree
Showing 26 changed files with 3,539 additions and 203 deletions.
31 changes: 24 additions & 7 deletions cmake/Install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ if( WIN32 AND NOT UNIX )
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
include(InstallRequiredSystemLibraries)
if(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION "./")
install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION "./")
endif()
endif()

Expand Down Expand Up @@ -443,7 +443,7 @@ elseif(WIN32)
# You need at least one "install(..." command for it to be registered as a component
install(CODE "MESSAGE(\"Registering filetypes.\")" COMPONENT RegisterFileType)
install(CODE "MESSAGE(\"Copying and Registering DLLs\")" COMPONENT CopyAndRegisterSystemDLLs)

install(CODE "MESSAGE(\"Creating start menu.\")" COMPONENT CreateStartMenu)

endif()

Expand Down Expand Up @@ -500,18 +500,25 @@ if ( BUILD_DOCS )

# So instead, we just used the number of threads that are available. That's not ideal, since it ignores any "-j N" option passed by the user
# But LaTeX should run quickly enough to not be a major inconvenience.
# There no need to do that for Ninja for eg, so only do it for Make
# There no need to do that for Ninja for eg, so only do it for Make and MSVC

# flag -j to cmake --build was added at 3.12
if(CMAKE_GENERATOR MATCHES "Make" AND (CMAKE_VERSION VERSION_GREATER "3.11"))
# flag -j to cmake --build was added at 3.12 (VERSION_GREATER_EQUAL need cmake >= 3.7, we apparently support 2.8...)
if(NOT(CMAKE_VERSION VERSION_LESS "3.12") AND ((CMAKE_GENERATOR MATCHES "Make") OR WIN32))
include(ProcessorCount)
ProcessorCount(N)
if(NOT N EQUAL 0)
set(DOC_BUILD_FLAGS "-j ${N}")
message("DOC_BUILD_FLAGS=${DOC_BUILD_FLAGS}")
endif()
endif()
install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" --build \"${CMAKE_BINARY_DIR}\" ${DOC_BUILD_FLAGS} --target documentation)")
if(WIN32)
# Win32 is multi config, so you must specify a config when calling cmake.
# Let's just use Release, it won't have any effect on LaTeX anyways.
set(DOC_CONFIG_FLAG "--config Release")
endif()

# Getting these commands to work (especially with macro expansion) is tricky. Check the resulting `cmake_install.cmake` file in your build folder if need to debug this
install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" --build \"${CMAKE_BINARY_DIR}\" ${DOC_CONFIG_FLAG} ${DOC_BUILD_FLAGS} --target documentation)"
COMPONENT Documentation)

install(FILES "${CMAKE_BINARY_DIR}/doc-pdf/Acknowledgments.pdf" DESTINATION "./Documentation" COMPONENT Documentation)
install(FILES "${CMAKE_BINARY_DIR}/doc-pdf/AuxiliaryPrograms.pdf" DESTINATION "./Documentation" COMPONENT Documentation)
Expand Down Expand Up @@ -592,6 +599,12 @@ cpack_add_component(Licenses
DESCRIPTION "License files for EnergyPlus"
REQUIRED)

# No need for system privileges for this
cpack_add_component(CreateStartMenu
DISPLAY_NAME "Start Menu links"
DESCRIPTION "Create Start Menu Links"
)

cpack_add_component(RegisterFileType
DISPLAY_NAME "Associate with EP-Launch and IDFEditor"
DESCRIPTION "Associate *.idf, *.imf, and *.epg files with EP-Launch, *.ddy and *.expidf with IDFEditor.exe"
Expand All @@ -618,6 +631,10 @@ cpack_ifw_configure_component(Symlinks
REQUIRES_ADMIN_RIGHTS
)

cpack_ifw_configure_component(CreateStartMenu
SCRIPT cmake/qtifw/install_win_createstartmenu.qs
)

cpack_ifw_configure_component(RegisterFileType
SCRIPT cmake/qtifw/install_registerfiletype.qs
REQUIRES_ADMIN_RIGHTS
Expand Down
13 changes: 1 addition & 12 deletions cmake/qtifw/install_operations.qs
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,7 @@ function Component()
// On Windows
if( kernel == "winnt" ) {

// Create Shortcuts in the Windows Start Menu
component.addOperation("CreateShortcut", "@TargetDir@/Documentation/index.html", "@StartMenuDir@/EnergyPlus Documentation.lnk");
component.addOperation("CreateShortcut", "@TargetDir@/PostProcess/EP-Compare/EP-Compare.exe", "@StartMenuDir@/EP-Compare.lnk");
component.addOperation("CreateShortcut", "@TargetDir@/PreProcess/EPDraw/EPDrawGUI.exe", "@StartMenuDir@/EPDrawGUI.lnk");
component.addOperation("CreateShortcut", "@TargetDir@/EP-Launch.exe", "@StartMenuDir@/EP-Launch.lnk");
component.addOperation("CreateShortcut", "@TargetDir@/ExampleFiles/ExampleFiles.html", "@StartMenuDir@/Example Files Summary.lnk");
component.addOperation("CreateShortcut", "@TargetDir@/ExampleFiles/ExampleFiles-ObjectsLink.html", "@StartMenuDir@/ExampleFiles Link to Objects.lnk");
component.addOperation("CreateShortcut", "@TargetDir@/PreProcess/IDFEditor/IDFEditor.exe", "@StartMenuDir@/IDFEditor.lnk");
component.addOperation("CreateShortcut", "@TargetDir@/PreProcess/IDFVersionUpdater/IDFVersionUpdater.exe", "@StartMenuDir@/IDFVersionUpdater.lnk");
component.addOperation("CreateShortcut", "@TargetDir@/readme.html", "@StartMenuDir@/Readme Notes.lnk");
component.addOperation("CreateShortcut", "@TargetDir@/PreProcess/WeatherConverter/Weather.exe", "@StartMenuDir@/Weather Statistics and Conversions.lnk");

// Create Shortcuts in the Windows Start Menu: done separately (optional)

// Note: Associate file types: done separately (optional)

Expand Down
29 changes: 29 additions & 0 deletions cmake/qtifw/install_win_createstartmenu.qs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Windows commands to be performed elevated: copy and register DLLs

function Component()
{
Component.prototype.createOperations = function()
{
// call default implementation
component.createOperations();

// ... add custom operations

var kernel = systemInfo.kernelType;
// On Windows
if( kernel == "winnt" ) {

component.addOperation("CreateShortcut", "@TargetDir@/Documentation/index.html", "@StartMenuDir@/EnergyPlus Documentation.lnk");
component.addOperation("CreateShortcut", "@TargetDir@/PostProcess/EP-Compare/EP-Compare.exe", "@StartMenuDir@/EP-Compare.lnk");
component.addOperation("CreateShortcut", "@TargetDir@/PreProcess/EPDraw/EPDrawGUI.exe", "@StartMenuDir@/EPDrawGUI.lnk");
component.addOperation("CreateShortcut", "@TargetDir@/EP-Launch.exe", "@StartMenuDir@/EP-Launch.lnk");
component.addOperation("CreateShortcut", "@TargetDir@/ExampleFiles/ExampleFiles.html", "@StartMenuDir@/Example Files Summary.lnk");
component.addOperation("CreateShortcut", "@TargetDir@/ExampleFiles/ExampleFiles-ObjectsLink.html", "@StartMenuDir@/ExampleFiles Link to Objects.lnk");
component.addOperation("CreateShortcut", "@TargetDir@/PreProcess/IDFEditor/IDFEditor.exe", "@StartMenuDir@/IDFEditor.lnk");
component.addOperation("CreateShortcut", "@TargetDir@/PreProcess/IDFVersionUpdater/IDFVersionUpdater.exe", "@StartMenuDir@/IDFVersionUpdater.lnk");
component.addOperation("CreateShortcut", "@TargetDir@/readme.html", "@StartMenuDir@/Readme Notes.lnk");
component.addOperation("CreateShortcut", "@TargetDir@/PreProcess/WeatherConverter/Weather.exe", "@StartMenuDir@/Weather Statistics and Conversions.lnk");

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ \subsubsection{Model Outputs}\label{model-outputs-000}

\subsection{Stratified Water Thermal Tank}\label{stratified-water-thermal-tank}

The input objects WaterHeater:Stratified and ThermalStorage:ChilledWater:Stratified provide models for a stratified water thermal tank that divides the water tank into multiple nodes of equal volume. This model is used for both the stratified water heater and the stratified chilled water storage tank. The nodes are coupled by vertical conduction effects, internode fluid flow, and temperature inversion mixing. The object simultaneously solves the differential equations governing the energy balances on the nodes using an analytical solution to a simplified representation of the heat balance equation. The system time step is divided into one minute substeps at which control decisions are evaluated that allow the simulation to capture events that occur on a short time scale.
The input objects WaterHeater:Stratified and ThermalStorage:ChilledWater:Stratified provide models for a stratified water thermal tank that divides the water tank into multiple nodes of equal volume. This model is used for both the stratified water heater and the stratified chilled water storage tank. The nodes are coupled by vertical conduction effects, internode fluid flow, and temperature inversion mixing. The object simultaneously solves the differential equations governing the energy balances on the nodes using an analytical solution to a simplified representation of the heat balance equation. The system time step is divided into multiple substeps at which control decisions are evaluated that allow the simulation to capture events that occur on a short time scale.

\subsubsection{Energy Balance}\label{energy-balance-1}

Expand Down Expand Up @@ -745,7 +745,7 @@ \subsubsection{Numerical Solution}\label{numerical-solution}

To solve the differential equations the nodal heat balance equations are modified into the form:

\begin{equation}
\begin{equation}\label{strat-tank-diffeq}
\frac{d{T_n}}{dt} = a T_n + b
\end{equation}

Expand All @@ -768,7 +768,19 @@ \subsubsection{Numerical Solution}\label{numerical-solution}

The solution is obtained by separating the $q_{net}$ terms described above into their respective $a$ and $b$ parts, solving for $T_{final}$ and $T_{avg}$, recalculating $b$ using the new average temperatures and iterating until the temperatures converge, at which point temperature inversions are resolved and controls decisions are made before moving on to the next sub timestep.

\paragraph{Control Logic Evaluation}
\paragraph{Adaptive Sub Timestep}

The sub timestep is allowed to vary between 10 seconds and 10 minutes. The length of the sub timestep is determined by the current heat transfer rates in the tank, which are used to predict the amount of time until a control decision (\ref{control-logic-evaluation}) will need to be made. The sub timestep is then selected to approach the time of the control decision.

First, the temperature difference required for a heater to turn on or off for each control node is calculated by determining the difference between its setpoint temperature and the current temperature if the heater is on or its cut in temperature and current temperature if the heater is off. The minimum of the temperature differences is selected as the maximum allowable nodal temperature change $dT_{max}$. The time until that temperature change occurs is estimated for each node by rearranging \ref{strat-tank-diffeq} to solve for $dt$.

\begin{equation}
dt = \frac{dT_{max}}{aT + b}
\end{equation}

Finally, the minimum of the nodal $dt$ values is used as the sub timestep unless it is outside the allowable bounds or it will extend beyond the end of the timestep. In those cases, the sub timestep is adjusted to fit within the bounds.

\paragraph{Control Logic Evaluation}\label{control-logic-evaluation}

Before each system time step is calculated the following evaluations are made:

Expand All @@ -777,7 +789,7 @@ \subsubsection{Numerical Solution}\label{numerical-solution}
\item Internode flow is determined and net flow rates are determined
\end{enumerate}

Before each substep is calculated, the following evaluations are made:
Before each sub timestep is calculated, the following evaluations are made:

\begin{enumerate}
\item Thermostatic controls for heater 1 and heater 2 are evaluated to determine if the heater elements should turn on or off
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1314,7 +1314,7 @@ \subsubsection{Inputs}\label{inputs-16-006}

\paragraph{Field: Horizontal Insulation Material Name}\label{field-horizontal-insulation-material-name}

Name of material object representing the horizontal slab insulation. Optional argument only required if horizontal insulation is present.
This alpha field is the name of a material object representing the horizontal slab insulation. It should be noted that the material listed here cannot be a "no mass" material (\hyperref[materialnomass]{Material:NoMass}) that is defined by R-Value only but should be defined as a regular material with an actual thickness. This optional argument is only required if horizontal insulation is present.

\paragraph{Field: Horizontal Insulation Extents}\label{field-horizontal-insulation-extents}

Expand All @@ -1330,7 +1330,7 @@ \subsubsection{Inputs}\label{inputs-16-006}

\paragraph{Field: Vertical Insulation Name}\label{field-vertical-insulation-name}

Name of material object representing the vertical slab insulation. Optional argument only required if vertical insulation is present.
This alpha field is the name of a material object representing the vertical slab insulation. It should be noted that the material listed here cannot be a "no mass" material (\hyperref[materialnomass]{Material:NoMass}) that is defined by R-Value only but should be defined as a regular material with an actual thickness. This optional argument is only required if vertical insulation is present.

\paragraph{Field: Vertical Insulation Depth}\label{field-vertical-insulation-depth}

Expand Down Expand Up @@ -1524,7 +1524,7 @@ \subsubsection{Inputs}\label{inputs-17-004}

\paragraph{Field: Horizontal Insulation Name}\label{field-horizontal-insulation-name}

Name of material object representing the horizontal underfloor basement insulation. Optional argument only required if horizontal insulation is present.
This alpha field is the name of a material object representing the horizontal underfloor basement insulation. It should be noted that the material listed here cannot be a "no mass" material (\hyperref[materialnomass]{Material:NoMass}) that is defined by R-Value only but should be defined as a regular material with an actual thickness. This optional argument is only required if horizontal insulation is present.

\paragraph{Field: Horizontal Insulation Extents}\label{field-horizontal-insulation-extents-1}

Expand All @@ -1548,7 +1548,7 @@ \subsubsection{Inputs}\label{inputs-17-004}

\paragraph{Field: Vertical Insulation Name}\label{field-vertical-insulation-name-1}

Name of material object representing the vertical slab insulation. Optional argument only required if vertical insulation is present.
This alpha field is the name of a material object representing the vertical basement insulation. It should be noted that the material listed here cannot be a "no mass" material (\hyperref[materialnomass]{Material:NoMass}) that is defined by R-Value only but should be defined as a regular material with an actual thickness. This optional argument is only required if vertical insulation is present.

\paragraph{Field: Vertical Insulation Depth}\label{field-vertical-insulation-depth-1}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2622,7 +2622,7 @@ \subsection{Window Output Variables}\label{window-output-variables}
Zone,Average, Surface Window Inside Face Other Convection Heat Gain Rate [W]
\end{lstlisting}

Output variables applicable to interior and exterior windows and doors are:
Output variables applicable to interior and exterior windows and doors under certain conditions (see next three subsections for more information) are:

\begin{lstlisting}
Zone,Average,Surface Window Total Absorbed Shortwave Radiation Rate Layer <x> [W]
Expand All @@ -2632,15 +2632,16 @@ \subsection{Window Output Variables}\label{window-output-variables}

\subsubsection{Surface Window Total Absorbed Shortwave Radiation Rate Layer \textless{}x\textgreater{} {[}W{]}}\label{surface-window-total-absorbed-shortwave-radiation-rate-layer-x-w}

This will output shortwave radiation absorbed in a window layer. The key values for this output variable are the surface name. Layers are numbered from the outside to the inside of the surface. The full listing will appear in the RDD file.
This will output shortwave radiation absorbed in a window layer. The key values for this output variable are the surface name. Layers are numbered from the outside to the inside of the surface. The full listing will appear in the RDD file. Note that this variable is only defined for constructions defined by a \hyperref[constructioncomplexfenestrationstate]{Construction:ComplexFenestrationState}.

\subsubsection{Surface Window Front Face Temperature Layer \textless{}x\textgreater{} {[}C{]}}\label{surface-window-front-face-temperature-layer-x-c}

This will output a temperature for the front face of the layer. The layer front face is considered to be the face closest to the outside environment. The full listing will appear in the RDD file.
This will output a temperature for the front face of the layer. The layer front face is considered to be the face closest to the outside environment. The full listing will appear in the RDD file. Note that this variable is only defined for constructions defined by a \hyperref[constructioncomplexfenestrationstate]{Construction:ComplexFenestrationState}. For other window constructions, this variable is also defined for the outer layer (Layer 1) only. The value will be identical to the \hyperref[surface-outside-face-temperature-c]{Surface Outside Face Temperature}.


\subsubsection{Surface Window Back Face Temperature Layer \textless{}x\textgreater{} {[}C{]}}\label{surface-window-back-face-temperature-layer-x-c}

This will output a temperature for the back face of the layer. The layer back face is considered to be the face closest to the inside environment. The full listing will appear in the RDD file.
This will output a temperature for the back face of the layer. The layer back face is considered to be the face closest to the inside environment. The full listing will appear in the RDD file. Note that this variable is only defined for constructions defined by a \hyperref[constructioncomplexfenestrationstate]{Construction:ComplexFenestrationState}. For other window constructions, this variable is also defined for the inner layer only. The value will be identical to the \hyperref[surface-inside-face-temperature-c]{Surface Inside Face Temperature}.

\subsection{Surface Output Variables (all heat transfer surfaces)}\label{surface-output-variables-all-heat-transfer-surfaces}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,11 @@ \subsection{CVHW (Temp,calledfrom)}\label{cvhw-tempcalledfrom}
\subsection{RhoH2O (Temp,calledfrom)}\label{rhoh2o-tempcalledfrom}

Returns density of water (kg/m3) as function of Temperature {[}T{]} (Celsius).

\subsection{PsyDeltaHSenFnTdb2W2Tdb1W1 (Tdb2,W2, Tdb1, W1,calledfrom)}\label{psydeltahsenfntdb2w2tdb1w1-tdb2w2tdb1w1calledfrom}

Returns sensible enthalpy difference of moist air going from state 1 to state 2 in Joules per kilogram as a function of state 2 dry bulb temperature {[}Tdb2{]} (Celsius), state 2 humidity ratio {[}W2{]} (kilograms of water per kilogram of dry air), state 1 dry bulb temperature {[}Tdb1{]} (Celsius), and state 1 humidity ratio {[}W1{]} (kilograms of water per kilogram of dry air).

\subsection{PsyHfgAvgFnTdb2Tdb1 (Tdb2,Tdb1,calledfrom)}\label{psyhfgavgfntdb2tdb1-tdb2w2tdb1calledfrom}

Returns average latent of vaporization of water for use in moist air calculation in Joules per kilogram of water as a function of state 2 dry bulb temperature {[}Tdb2{]} (Celsius), and state 1 dry bulb temperature {[}Tdb1{]} (Celsius).
Loading

0 comments on commit d16bf86

Please sign in to comment.