Skip to content
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

Add moisture source and transport mechanisms to HAMT #8443

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
40b5b2a
Add moisture source object to IDD
jasondegraw Dec 30, 2020
07f618f
Add object and input code
jasondegraw Dec 30, 2020
8bb529d
Test out moving the surface count
jasondegraw Dec 30, 2020
a9e5669
Port over the moisture code
jasondegraw Dec 30, 2020
7f7b370
Merge remote-tracking branch 'origin/afn-repairs' into hamt-1-and-2
jasondegraw Dec 30, 2020
f6ae40d
Move an object array
jasondegraw Dec 30, 2020
a604f1a
Minor prep for repairs
jasondegraw Dec 30, 2020
b890ce5
Merge remote-tracking branch 'origin/afn-repairs' into hamt-1-and-2
jasondegraw Dec 30, 2020
6376a3a
Port original implementation over to new objects
jasondegraw Dec 30, 2020
42e1855
Merge remote-tracking branch 'upstream/develop' into hamt-1-and-2
jasondegraw Feb 12, 2021
9265a14
Add draft example file for type 1
jasondegraw Mar 3, 2021
e9220b7
update idf for ConstructionProperty:InternalMoistureSource using +.id…
YanfeiORNL Mar 4, 2021
ae4c0a2
update idf for ConstructionProperty:InternalMoistureSource using +.id…
YanfeiORNL Mar 4, 2021
49c8431
type1-UserDefined, is finished for CosntructionProperty:InternalMoist…
YanfeiORNL Mar 9, 2021
3a5211d
add type2-StackAndOverPressure for ConstructionProperty:InternalMoist…
YanfeiORNL Mar 9, 2021
8001926
add Type3-AFN for exmaple idf files
YanfeiORNL Mar 9, 2021
4835de4
Add initial documentation to Engr Ref
jasondegraw Mar 25, 2021
fc75c13
Merge branch 'hamt-1-and-2' of https://github.com/NREL/EnergyPlus int…
YanfeiORNL Mar 27, 2021
2dd1b8e
Merge branch 'develop' into hamt-1-and-2
jasondegraw Nov 16, 2021
ad2036b
Reformat yet again
jasondegraw Nov 16, 2021
02dd80d
More clean up, remove mistakenly added files
jasondegraw Nov 16, 2021
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

Large diffs are not rendered by default.

58 changes: 58 additions & 0 deletions idd/Energy+.idd.in
Original file line number Diff line number Diff line change
Expand Up @@ -8903,6 +8903,64 @@ ConstructionProperty:InternalHeatSource,
\note 0.0 means in line with the tubing, 1.0 means at the midpoint between two adjacent pipes
\note this field is ignored for 1-D calculations

ConstructionProperty:InternalMoistureSource,
\memo HeatBalanceAlgorithm = CombinedHeatAndMoistureFiniteElement solution algorithm only.
\memo Adds moisture source to selected layer inside the component.
\memo Has no effect with other HeatBalanceAlgorithm solution algorithms
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\min-fields = 4 ?

A1, \field Name
\required-field
\type alpha
\reference InternalMoistureSourceNames
A2, \field Construction Name
\type object-list
\object-list ConstructionNames
N1, \field Moisture Source Present In Layer Number
\required-field
\type integer
\minimum 1
\maximum 10
\note Layer number to which the moisture source should be applied (from outside to inside)
\note refers to the list of layers specified for the construction applied to the above surface
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this is referring to "... the above construction" ? (where "surface" here = construction), only a suggestion.

\note refers to the list of layers specified for the construction in the previous field

\note If a source occurs on a layer surface, the layer should be split into two layers (thin where source occurs) and the source added to the thin layer
A3, \field Source Type
\required-field
\type choice
\key UserDefined
\key StackAndOverPressure
\key AirflowNetwork
\note Type of Moisture Source Calculation
\note UserDefined: User defined input of air flow through component
\note StackAndOverPressure: Calculation of dynamic air flow through component due to stack effect and ventilation overpressure (according to Kuenzel, Zirkelbach and Schafazcek 2012)
\note AirflowNetwork: Calculation of dynamic air flow through component with AirflowNetwork model
N2, \field Air Flow Rate
\units m/s
\type real
\minimum -0.001
\maximum 0.001
\note Air flux density in m3 per m2 and second.
\note Only required for Source Type UserDefined.
N3, \field Stack Height
\units m
\type real
\minimum 0
\maximum 100
\note Height of the connected airspace in the building envelope element
\note Only required for Source Type StackAndOverPressure.
N4, \field Component Air Permeance
\units m/s
\type real
\minimum 0
\maximum 1
\note Moisture specific air permeance of the component in m3 per m2, hour and Pascal.
\note Only required for Source Type StackAndOverPressure.
N5; \field Mechanical Ventilation Overpressure
\units Pa
\type real
\minimum 0
\maximum 100
\note Constant mechanical ventilation overpressure in Pascal.
\note Only required for Source Type StackAndOverPressure.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the notes on the previous 4 fields, I assume none of these are needed for an airflow network simulation and therefore none of these fields are a \required-field.


Construction:AirBoundary,
\memo Indicates an open boundary between two zones. It may be used for base surfaces and fenestration surfaces.
\memo The two adjacent zones are grouped together for solar, daylighting and radiant exchange.
Expand Down
249 changes: 247 additions & 2 deletions src/EnergyPlus/HeatBalanceHAMTManager.cc

Large diffs are not rendered by default.

65 changes: 61 additions & 4 deletions src/EnergyPlus/HeatBalanceHAMTManager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ namespace HeatBalanceHAMTManager {
// Members
int matid; // Material Id Number
int sid; // Surface Id Number
int layer_id; // Layer Id Number
int source_id; // Internal moisture source ID Number
Real64 Qadds; // Additional sources of heat
Real64 Wadds; // Additional sources of water
Real64 density; // Density
Real64 wthermalc; // Moisture Dependant Thermal Conductivity
Real64 spech; // Specific Heat capacity
Expand Down Expand Up @@ -112,14 +115,65 @@ namespace HeatBalanceHAMTManager {

// Default Constructor
subcell()
: matid(-1), sid(-1), Qadds(0.0), density(-1.0), wthermalc(0.0), spech(0.0), htc(-1.0), vtc(-1.0), mu(-1.0), volume(0.0), temp(0.0),
tempp1(0.0), tempp2(0.0), wreport(0.0), water(0.0), vp(0.0), vpp1(0.0), vpsat(0.0), rh(0.1), rhp1(0.1), rhp2(0.1), rhp(10.0),
dwdphi(-1.0), dw(-1.0), origin(3, 0.0), length(3, 0.0), overlap(6, 0.0), dist(6, 0.0), adjs(6, 0), adjsl(6, 0)
: matid(-1), sid(-1), layer_id(-1), source_id(-1), Qadds(0.0), Wadds(0.0), density(-1.0), wthermalc(0.0), spech(0.0), htc(-1.0),
vtc(-1.0), mu(-1.0), volume(0.0), temp(0.0), tempp1(0.0), tempp2(0.0), wreport(0.0), water(0.0), vp(0.0), vpp1(0.0), vpsat(0.0),
rh(0.1), rhp1(0.1), rhp2(0.1), rhp(10.0), dwdphi(-1.0), dw(-1.0), origin(3, 0.0), length(3, 0.0), overlap(6, 0.0), dist(6, 0.0),
adjs(6, 0), adjsl(6, 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider deleting the constructor in the future and initializing in-line with declaration

{
}
};

void ManageHeatBalHAMT(EnergyPlusData &state, int const SurfNum, Real64 &SurfTempInTmp, Real64 &TempSurfOutTmp);
// structure internal moisture source
struct InternalMoistureSource
{
int id; // Internal moisture source id
int surface_id; // Surface id
int layer_id; // Layer id

// int SourceType; // (1 = air flow input; 2 = infiltration model (Kuenzel); 3 = multi zone air flow model)
enum class Type
{
UserDefined = 1,
StackAndOverPressure,
AirflowNetwork
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should have Invalid = -1 and Num as the last element ? Any reason UserDefinded must = 1 ?

};
Type type;

// SourceType == 1: Air Flow input
Real64 moist_airflow_input; // moist air flow input for source type 1 in m3 / m2 s

// Source Type == 2: Air infiltration model
Real64 stack_height; // Stack height in m to create pressure difference for source type 2
Real64 component_air_permeance; // Component air permeance in
Real64 mechanical_ventilation_overpressure; // Additional mechanical ventilation overpressure in Pa
Real64 delta_pressure; // Pressure difference over component in Pa

// Source Type == 3: Air flow network
int afn_id; // Id of the component element in the airflow network

Real64 moist_airflow;

InternalMoistureSource(int id = -1,
int surface_id = -1,
int layer_id = -1,
Type type = Type::UserDefined,
Real64 moist_airflow_input = 0.0,
Real64 stack_height = 0.0,
Real64 component_air_permeance = 0.0,
Real64 mechanical_ventilation_overpressure = 0.0,
Real64 delta_pressure = 0.0,
int afn_id = 0,
Real64 moist_airflow = 0.0)
: id(id), surface_id(surface_id), layer_id(layer_id), type(type), moist_airflow_input(moist_airflow_input), stack_height(stack_height),
component_air_permeance(component_air_permeance), mechanical_ventilation_overpressure(mechanical_ventilation_overpressure),
delta_pressure(delta_pressure), afn_id(afn_id), moist_airflow(moist_airflow)
{
}
};

// Functions

void ManageHeatBalHAMT(EnergyPlusData &state, int const SurfNum, Real64 &TempSurfInTmp, Real64 &TempSurfOutTmp);

void GetHeatBalHAMTInput(EnergyPlusData &state);

Expand All @@ -136,6 +190,8 @@ namespace HeatBalanceHAMTManager {

Real64 WVDC(Real64 const Temperature, Real64 const ambp);

Real64 SatAbsHum(EnergyPlusData &state, Real64 const Temperature);

// COPYRIGHT NOTICE

// Portions Copyright (c) University College London 2007. All rights
Expand Down Expand Up @@ -186,6 +242,7 @@ struct HeatBalHAMTMgrData : BaseGlobalStruct
bool latswitch = false; // latent heat switch,
bool rainswitch = false; // rain switch,
Array1D<HeatBalanceHAMTManager::subcell> cells;
Array1D<HeatBalanceHAMTManager::InternalMoistureSource> sources;
bool OneTimeFlag = true;
int qvpErrCount = 0;
int qvpErrReport = 0;
Expand Down
1 change: 1 addition & 0 deletions src/EnergyPlus/RoomAirModelAirflowNetwork.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@

// EnergyPlus Headers
#include <AirflowNetwork/Elements.hpp>
#include <EnergyPlus/AirflowNetworkBalanceManager.hh>
#include <EnergyPlus/BaseboardElectric.hh>
#include <EnergyPlus/BaseboardRadiator.hh>
#include <EnergyPlus/Data/EnergyPlusData.hh>
Expand Down
Loading