Parameters listing
To proceed to the Sensitivity analyse, we should define the initial list of parameters
Wood stove parameters
Parameters name |
Nominal Value |
Standart deviation |
Nominal Heating Power |
6000 W |
5% |
Nominal Temperature |
80°C |
5°C |
Nominal efficiency |
90% |
5% |
Nominal pressure drop |
6000 |
10% |
Water volume |
0.009 m3 |
3% |
Mass of boiler |
9kg |
3% |
LHV of the wood |
5 kWh/kg |
5% |
Density of th fuel |
1000 kg |
10% |
CO2 emisson at combustion |
0.007 kgCO2/kgFuel |
15% |
Boiler pump and mixing circuit parameters
Parameters name |
Nominal Value |
Standart deviation |
Thermal conductivity ( lambda/thickness) |
0.04 / 4 cm |
7% |
Pipe length |
5 m |
3% |
Nominal pressure drop |
3000 Pa |
10% |
KV of the 3-Way valve |
50 (m3/h.Bar)^(1/2) |
20% |
Hot water Tank parameters
Parameters name |
Nominal Value |
Standart deviation |
Volume of the Tank |
3 m3 |
5% |
height of the Tank |
2 m |
3% |
Insulation thickness |
25 cm |
7% |
Insulation Heat conductivity |
0.04 W/(m.K) |
10% |
Control and Monitoring control
Parameters name |
Significant |
Standart deviation |
Minimal temperature at the bottom of the tank |
50°C |
2°C |
Threshold to switch boiler off |
1°C |
1°C |
Pump delay |
60s |
5% |
Proportionnal gain of PID |
0.1 |
10% |
Integral gain of PID |
120 |
10% |
Minimal return temperature to the wood stove |
60°C |
2°C |
Test to block boiler if room air temperature is sufficiently high |
16°C |
1°C |
Only sensitivity analyzes are performed in this part of the tutorial. The results of the various sensitivity analyzes (component and system) will therefore be presented. In practice, the process can start with a component and continue until it is calibrated and then start again with another component. We will try here to be methodical and therefore not to use this way of doing.
Sensitivity of the boiler
The following script was applied to obtain the weight of the table "Wood stove parameters
# -*- coding: utf-8 -*-
"""
@author: wthomare
"""
import buildingspy.simulate.Simulator as si
from SALib.sample import saltelli
from SALib.analyze import sobol
import os
from buildingspy.io.outputfile import Reader
import numpy as np
import shutil
from multiprocessing import Pool
import copy
TSimulation = 604800
model = u"FBM.Tutorial.FirstTuto"
s = si.Simulator(model,u"dymola",u"case", packagePath="//media//wthomare//DONNEES//comis")
s.setStopTime(TSimulation)
s.setSolver('dassl')
s.translate()
s1=copy.deepcopy(s)
problem = {
'num_vars': 9,
'names': [
'boi.Q_flow_nominal',
"boiler.T_nominal",
"boiler.a",
"boiler.dp_nominal",
"boiler.VWat",
"boiler.mDry",
"datFue.h",
"datFue.d",
"datFue.mCO2"],
'bounds': [[5700,6300],
[75,85],
[85,95],
[5000,7000],
[0.0873,0.0927],
[8.73,9.27],
[17100,18900],
[900,1100],
[0.00608,0.00805]]}
W = saltelli.sample(problem,100, calc_second_order=True)
po = Pool(processes = 4)
def SaveResult(path,texte):
fichier = open("outputsMorris.txt","a")
fichier.write(texte + "\n")
fichier.close()
# Function to set common parameters and to run the simulation
def simulateCase(s):
s.setStopTime(TSimulation)
# Kill the process if it does not finish in 10 minute
s.setTimeOut(600)
s.showProgressBar(False)
s.printModelAndTime()
s.simulate_translated()
def evaluate(i):
s1.setOutputDirectory('//media//wthomare//DONNEES//FyPy//case %d' % (i))
s1.addParameters({"boiler.Q_flow_nominal' :W[i,0]})
s1.addParameters({"boiler.T_nominal" :W[i,1]})
s1.addParameters({"boiler.a" :W[i,2]})
s1.addParameters({"boiler.dp_nominal" :W[i,3]})
s1.addParameters({"boiler.VWat" :W[i,4]})
s1.addParameters({"boiler.mDry" :W[i,5]})
s1.addParameters({"datFue.h" :W[i,6]})
s1.addParameters({"datFue.d" :W[i,7]})
s1.addParameters({"datFue.mCO2" :W[i,8]})
simulateCase(s1)
# Main function
if __name__ == '__main__':
po.map(evaluate,range(len(W)) )
for i,X in enumerate(W):
resultFile = os.path.join("//media","wthomare","DONNEES","FyPy",'case %d' % (i),u"ValidationPan.mat")
outTemp=Reader(resultFile,"dymola")
SaveResult("//home//wthomare//Bureau//PyWorDir//SaveOutputFile//Boiler",str(outTemp.integral('Solaire.y')))
shutil.rmtree('//media//wthomare//DONNEES//FyPy//case %d' % (i))
Y = np.loadtxt("outputsMorris.txt", float)
Si = sobol.analyze(problem, Y, print_to_console=False)
shutil.rmtree('case')
print Si['S1']
Results :
Tables resume wich parameters was significant on our output for each component then for the system
Wood stove parameters
Parameters name |
Significant |
Nominal Heating Power |
Yes |
Nominal Temperature |
No |
Nominal efficiency |
Yes |
Nominal pressure drop |
No |
Water volume |
No |
Mass of boiler |
No |
LHV of the wood |
Yes |
Density of th fuel |
No |
CO2 emisson at combustion |
No |
Boiler pump and mixing circuit parameters
Parameters name |
Significant |
Thermal conductivity ( lambda/thickness) |
Yes |
Pipe length |
No |
Nominal pressure drop |
No |
KV of the 3-Way valve |
Yes |
Hot water Tank parameters
Parameters name |
Significant |
Volume of the Tank |
No |
height of the Tank |
No |
Thermal conductivity ( lambda/thickness) |
Yes |
Control and Monitoring control
Parameters name |
Significant |
Minimal temperature at the bottom of the tank |
Yes |
Threshold to switch boiler off |
No |
Pump delay |
No |
Proportionnal gain of PID |
No |
Integral gain of PID |
No |
Minimal return temperature to the wood stove |
Yes |
Test to block boiler if room air temperature is sufficiently high |
Yes |