From 18f9e29f1e0d2f977b036bba81c5094757d0476e Mon Sep 17 00:00:00 2001 From: marcusfuchs Date: Tue, 16 Feb 2016 10:09:56 +0100 Subject: [PATCH 1/3] Fix package order in UsersGuide --- AixLib/UsersGuide/package.order | 1 - 1 file changed, 1 deletion(-) diff --git a/AixLib/UsersGuide/package.order b/AixLib/UsersGuide/package.order index 58cdc801f7..48b13dbbd9 100644 --- a/AixLib/UsersGuide/package.order +++ b/AixLib/UsersGuide/package.order @@ -1,4 +1,3 @@ -UsersGuide Acknowledgements Contact Copyright From d0103fe1c0265b029af452f356df2fb69c5b210f Mon Sep 17 00:00:00 2001 From: marcusfuchs Date: Tue, 16 Feb 2016 10:47:12 +0100 Subject: [PATCH 2/3] Change docstrings use from degree symbol to "deg" For #155. There seems to be a problem with how Dymola handles the degree symbol. When converting files to utf8 in notepad++ and replacing the degree symbol, Dymola will add an extra character to it. Therefore, the symbols have been replaced by the string "deg". --- .../Building/Components/Weather/BaseClasses/Sun.mo | 4 ++-- .../RadOnTiltedSurf_Perez.mo | 6 +++--- AixLib/HVAC/AirHandlingUnit/AHU.mo | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/AixLib/Building/Components/Weather/BaseClasses/Sun.mo b/AixLib/Building/Components/Weather/BaseClasses/Sun.mo index 80d9ffbe0e..06565bbb40 100644 --- a/AixLib/Building/Components/Weather/BaseClasses/Sun.mo +++ b/AixLib/Building/Components/Weather/BaseClasses/Sun.mo @@ -1,4 +1,4 @@ -within AixLib.Building.Components.Weather.BaseClasses; +within AixLib.Building.Components.Weather.BaseClasses; model Sun "Computes the sun's altitude of the current site" import Modelica.SIunits.Conversions.from_deg; @@ -45,7 +45,7 @@ equation "the difference between the UTC and the time standard is given by DiffWeatherDataTime and Diff_lokalStandardTime Longitude"; // hour angle of sun, first term calculates local time of day from continuous time signal - HourAngleSun = (SolarTime-12) * 360/24 "HourAngleSun=0° means sun peak"; + HourAngleSun = (SolarTime-12) * 360/24 "HourAngleSun=0 deg means sun peak"; if (HourAngleSun > 180) then OutHourAngleSun = HourAngleSun - 360; elseif (HourAngleSun < -180) then diff --git a/AixLib/Building/Components/Weather/RadiationOnTiltedSurface/RadOnTiltedSurf_Perez.mo b/AixLib/Building/Components/Weather/RadiationOnTiltedSurface/RadOnTiltedSurf_Perez.mo index 2283feaadb..39cc4c1c39 100644 --- a/AixLib/Building/Components/Weather/RadiationOnTiltedSurface/RadOnTiltedSurf_Perez.mo +++ b/AixLib/Building/Components/Weather/RadiationOnTiltedSurface/RadOnTiltedSurf_Perez.mo @@ -1,4 +1,4 @@ -within AixLib.Building.Components.Weather.RadiationOnTiltedSurface; +within AixLib.Building.Components.Weather.RadiationOnTiltedSurface; model RadOnTiltedSurf_Perez "Calculates solar radiation on tilted surfaces according to Perez" extends RadiationOnTiltedSurface.BaseClasses.PartialRadOnTiltedSurf; @@ -20,7 +20,7 @@ model RadOnTiltedSurf_Perez //constants protected constant Real a_rho=0.45 - "estimated on measured Albedo from NREL USA (Latitude=39.742°)"; + "estimated on measured Albedo from NREL USA (Latitude=39.74 deg)"; constant Real b_rho=0.013 "estimated on measured Albedo from NREL USA"; constant Real c_rho=0.2 "estimated on measured Albedo from NREL USA"; constant Real rho_avg=1/0.27055 @@ -176,7 +176,7 @@ equation cos_theta = (cos_theta_help + abs(cos_theta_help))/2; theta_out = to_deg(acos(cos_theta)); - // calculation of R factor [Duffie/Beckman, p.25], but in order not to divide by zero it is determined like a/b in the Model of Perez [Duffie/Beckman, p.94] where the minimum b is set to cos(85°); + // calculation of R factor [Duffie/Beckman, p.25], but in order not to divide by zero it is determined like a/b in the Model of Perez [Duffie/Beckman, p.94] where the minimum b is set to cos(85 deg); // R is manually set to 0 for theta_z_pos >= 80 degrees (-> 90 degrees means sunset)__old solution for the numerical problems of dividing by zero; //if noEvent(cos_theta_z <= 0.08715574274) then // R_help = cos_theta_z*cos_theta; diff --git a/AixLib/HVAC/AirHandlingUnit/AHU.mo b/AixLib/HVAC/AirHandlingUnit/AHU.mo index 41ffc512ce..4a473cab3a 100644 --- a/AixLib/HVAC/AirHandlingUnit/AHU.mo +++ b/AixLib/HVAC/AirHandlingUnit/AHU.mo @@ -1,4 +1,4 @@ -within AixLib.HVAC.AirHandlingUnit; +within AixLib.HVAC.AirHandlingUnit; model AHU "Air Handling Unit with Heat Recovery System, Cooling, Heating, Humidification (adiabatic), Dehumidification" /* @@ -117,7 +117,7 @@ model AHU constant Modelica.SIunits.SpecificHeatCapacityAtConstantPressure c_pL_iG=1E3; constant Modelica.SIunits.SpecificHeatCapacityAtConstantPressure c_pW_iG=1.86E3; constant Modelica.SIunits.SpecificEnthalpy r_0=2465E3 - "enthalpy of vaporization at temperature between T_dew(X_sup=0.008)=11 °C and T_sup = 22 °C"; + "enthalpy of vaporization at temperature between T_dew(X_sup=0.008)=11 degC and T_sup = 22 degC"; constant Modelica.SIunits.Density rho=1.2; constant Modelica.SIunits.Pressure p_0=101325; constant Modelica.SIunits.SpecificEnthalpy dhV=2501.3E3; @@ -303,14 +303,14 @@ model AHU X_surface, 0.00001); p_sat_surface = 611.2*exp(17.62*(T_surface - T_0)/(243.12 + T_surface - T_0)); - //Magnus formula over water, improved by Sonntag (1990), Range: -45 °C to +60 °C + //Magnus formula over water, improved by Sonntag (1990), Range: -45 degC to +60 degC /* 2 Alternatives for calculation of water vapor pressure, which are not so stable during simulation: p_sat_surface = 10^(-7.90298*(373.15/T_surface - 1) +5.02808*log10(373.15/T_surface) -1.3816*10^(-7)*(10^(11.344*(1 - T_surface/373.15))-1) +8.1328*10^(-3)*(10^(-3.49149*(373.15/T_surface - 1))-1) - +log10(1013.246))*100; //The Goff Gratch equation for the vapor pressure over liquid water covers a region of -50 °C to +102 °C. + +log10(1013.246))*100; //The Goff Gratch equation for the vapor pressure over liquid water covers a region of -50 degC to +102 degC. p_sat_surface = Modelica.Media.Air.MoistAir.saturationPressure(T_surface); */ X_surface = molarMassRatio*p_sat_surface/(p_0 - p_sat_surface); @@ -383,14 +383,14 @@ p_sat_surface = Modelica.Media.Air.MoistAir.saturationPressure(T_surface); X_surface, 0.00001); p_sat_surface = 611.2*exp(17.62*(T_surface - T_0)/(243.12 + T_surface - T_0)); - //Magnus formula over water, improved by Sonntag (1990), Range: -45 °C to +60 °C + //Magnus formula over water, improved by Sonntag (1990), Range: -45 degC to +60 degC /* 2 Alternatives for calculation of water vapor pressure, which are not so stable during simulation: p_sat_surface = 10^(-7.90298*(373.15/T_surface - 1) +5.02808*log10(373.15/T_surface) -1.3816*10^(-7)*(10^(11.344*(1 - T_surface/373.15))-1) +8.1328*10^(-3)*(10^(-3.49149*(373.15/T_surface - 1))-1) - +log10(1013.246))*100; //The Goff Gratch equation for the vapor pressure over liquid water covers a region of -50 °C to +102 °C. + +log10(1013.246))*100; //The Goff Gratch equation for the vapor pressure over liquid water covers a region of -50 degC to +102 degC. p_sat_surface = Modelica.Media.Air.MoistAir.saturationPressure(T_surface); */ X_surface = molarMassRatio*p_sat_surface/(p_0 - p_sat_surface); From 66621330f98afd83ae5d1a51feb07011e8a0ed5f Mon Sep 17 00:00:00 2001 From: marcusfuchs Date: Tue, 16 Feb 2016 10:50:11 +0100 Subject: [PATCH 3/3] Increase version number for bugfix to 0.2.4 --- AixLib/package.mo | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AixLib/package.mo b/AixLib/package.mo index 2313bea4b7..ae287bc819 100644 --- a/AixLib/package.mo +++ b/AixLib/package.mo @@ -1,6 +1,6 @@ within ; package AixLib - annotation(uses(Modelica(version = "3.2.1")), version = "0.2.3", Documentation(info = " + annotation(uses(Modelica(version = "3.2.1")), version = "0.2.4", Documentation(info = "

The free open-source AixLib library is being developed for research and teaching purposes. It aims at dynamic simulations of thermal and hydraulic systems to develop control strategies for HVAC systems and analyse interactions in complex systems. It is used for simulations on component, building and city district level. As this library is developed mainly for academic purposes, user-friendliness and model robustness is not a main task. This research focus thus influences the layout and philosophy of the library.

Various connectors of the Modelica Standard Library are used, e.g. Modelica.Fluid and Modelica.HeatTransfer. These are accompanied by own connectors for simplified hydraulics (no fluid.media, incompressible, one phase) , shortwave radiation (intensity), longwave radiation (heat flow combined with a virtual temperature) and combined longwave radiation and thermal. The pressure in the connectors is the total pressure. The used media models are simplified from the Modelica.Media library. If possible and necessary, components use continuously differentiable equations. In general, zero mass flow rate and reverse flow are supported.

Most models have been analytically verified. In addition, hydraulic components are compared to empirical data such as performance curves. High and low order building models have been validated using a standard test suite provided by the ANSI/ASHRAE Standard 140 and VDI 6007 Guideline. The library has only been tested with Dymola.

diff --git a/README.md b/README.md index cf8ea1af40..e966f0a008 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Parts of **AixLib** have been developed within public funded projects and with f ### Version -The current version 0.2.3 is a pre-release. +The current version 0.2.4 is a pre-release. ### How to contribute to the development of AixLib