-
Notifications
You must be signed in to change notification settings - Fork 0
/
Layer.cs
78 lines (65 loc) · 2.14 KB
/
Layer.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WallSectionWidget
{
public class Layer
{
public Material Material;
public double Thickness { get; private set; }
public double InteriorSideDepthFromSurface;
public double InteriorTemperature;
public double TemperatureDifference;
public double InteriorVapourPressure;
public double VapourPressureDifference;
public GHIOParam<Layer> GHIOParam => new GHIOParam<Layer>(this);
public Layer(Material material, double thickness)
{
Material = material;
Thickness = thickness;
InteriorSideDepthFromSurface = 0.0;
InteriorTemperature = 15.0;
TemperatureDifference = -5.0;
InteriorVapourPressure = 2000;
VapourPressureDifference = -300;
}
public double Conductivity
{
get { return Material.Conductivity; }
}
public double Resistivity
{
get { return Thickness / Material.Conductivity; }
}
public double VapourResistivity
{
get { return Material.VapourResistivity * Thickness; }
}
public double ExteriorTemperature
{
get { return InteriorTemperature + TemperatureDifference; }
}
public double ExteriorVapourPressure
{
get { return InteriorVapourPressure + VapourPressureDifference; }
}
public double InteriorHumidity
{
get { return Psychrometrics.RelativeHumidity(InteriorTemperature, InteriorVapourPressure); }
}
public double ExteriorHumidity
{
get { return Psychrometrics.RelativeHumidity(ExteriorTemperature, ExteriorVapourPressure); }
}
public IntermediateConditions IntermediateConditions
{
get { return new IntermediateConditions(this); }
}
public double ExteriorSideDepthFromSurface
{
get { return InteriorSideDepthFromSurface + Thickness; }
}
}
}