Skip to content

Metabolic heat gains #24

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
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
60 changes: 58 additions & 2 deletions Corpus/residential.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,10 +469,66 @@ def lightingload(self):
load = int(np.sum(result['P'])/60/1000)
print (' - Lighting load is %s kWh' % str(load))

return None

def MetabolicHeat(self):
'''
Simulation of the metabolic heat gains.
'''

# it is assumed that 50% of the produced heat is radiative
# and 50% is convective
fRad = 0.5
fCon = 0.5
counter = range(len(self.clusters))
nday = self.nday
nbin = 144
nmin = self.nday * 1440
rad = np.zeros(nmin+1)
con = np.zeros(nmin+1)
for i in counter:
to = -1 # time counter for occupancy
tl = -1 # time counter for minutes
# the heat a person produces is dependent on the metabolism
met_sl = random.gauss(0.8,0.05) # metabolism when sleeping
met_act = random.gauss(2,0.1) # metabolism when active
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the range for active occupants purposely chosen to be so narrow? I understand that the Met could vary much more, but is the idea here to keep an average value, because it will be used constantly throughout the year?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image
it is based on this data I received from Jelle. So actually the active metabolism considered here is for activities in the kitchen. I think it is indeed good to widen the range for active metabolism

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the most optimal would be if we link the metabolic gains with the specific activities, however, this is not that simple as the activities are only used for the appliance use and are not 'fixed profiles' in the same way as the occupancy.

x = [0.8, 1.25]
f = [70,110]
sleep = np.interp(met_sl, x, f)
active = np.interp(met_act, x, f)
Comment on lines +495 to +498
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add an explanation? My understanding is that x is the metabolic rate in Met units, and then you use this interpolation to go to heat in Watts given in f, based on the assumption of linear relation between the two (0.8Met->70W, 1.25Met->110W). Is this the case?
Then I'm concerned that np.interp gives a fixed value outside the given range, such that for 2Met we still get 110W. Or am I mistaken? Maybe the range could be expanded to cover all cases, or if the relation is not linear (I don't really know), add more points.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Your explanation is correct. I assumed the np.interp makes an interpolation as well outside the given range. But I did not check that. I went back to some previous result files and in fact I did not find any metabolic loads higher than 110 W. Will it be solved if we just expand the range?

Met = np.zeros(nmin+1)
for doy, step in itertools.product(range(nday), range(nbin)):
to += 1
for run in range(0, 10):
tl += 1
if self.occ[i][to]==1:
Met[tl] = active
elif self.occ[i][to]==2:
Met[tl] = sleep
# and sum
rad += fRad*Met
con += fCon*Met

# a new time axis for power output is to be created as a different
# time step is used in comparison to occupancy
time = 4*60*60 + np.arange(0, (nmin+1)*60, 60)

result = {'time':time, 'occ':None, 'P':None, 'Q':None,
'QRad':rad, 'QCon':con, 'Wknds':None, 'mDHW':None}

self.r_MetabolicHeat = result

# output ##########################################################
# the total heat gains of the persons are returned
HeatG = int((np.sum(result['QCon'])/60/1000)+(np.sum(result['QRad'])/60/1000))
print (' - Total metabolic heat gains are %s kWh' % str(HeatG))


return None

receptacles(self)
lightingload(self)
MetabolicHeat(self)

return None

Expand Down Expand Up @@ -590,8 +646,8 @@ def roundUp(self):
self.sh_bath = self.sh_settings['bathroom']
self.P = self.r_receptacles['P'] + self.r_lighting['P']
self.Q = self.r_receptacles['Q'] + self.r_lighting['Q']
self.QRad = self.r_receptacles['QRad'] + self.r_lighting['QRad']
self.QCon = self.r_receptacles['QCon'] + self.r_lighting['QCon']
self.QRad = self.r_receptacles['QRad'] + self.r_lighting['QRad'] + self.r_MetabolicHeat['QRad']
self.QCon = self.r_receptacles['QCon'] + self.r_lighting['QCon'] + self.r_MetabolicHeat['QCon']
self.mDHW = self.r_flows['mDHW']

#######################################################################
Expand Down