| | 1 | | using System; |
| | 2 | |
|
| | 3 | |
|
| | 4 | | namespace Morpho25.Settings |
| | 5 | | { |
| | 6 | | /// <summary> |
| | 7 | | /// Configuration class. |
| | 8 | | /// </summary> |
| | 9 | | public class Configuration |
| | 10 | | { |
| | 11 | | /// <summary> |
| | 12 | | /// Check if value is positive. |
| | 13 | | /// </summary> |
| | 14 | | /// <param name="value">Value to check.</param> |
| | 15 | | /// <exception cref="ArgumentException">Negative.</exception> |
| | 16 | | protected void ItIsPositive(double value) |
| 34 | 17 | | { |
| 34 | 18 | | if (value < 0) |
| 2 | 19 | | throw new ArgumentException("You cannot insert negative numbers"); |
| 32 | 20 | | } |
| | 21 | | /// <summary> |
| | 22 | | /// Check if relative humidity value is between 0% and 100%. |
| | 23 | | /// </summary> |
| | 24 | | /// <param name="value">Value to check.</param> |
| | 25 | | /// <exception cref="ArgumentException">Wrong value.</exception> |
| | 26 | | protected void IsHumidityOk(double value) |
| 84 | 27 | | { |
| 84 | 28 | | if (value < 0 || value > 100) |
| 2 | 29 | | throw new ArgumentException("Relative humidity go from 0 to 100."); |
| 82 | 30 | | } |
| | 31 | | } |
| | 32 | |
|
| | 33 | | /// <summary> |
| | 34 | | /// Active enum. |
| | 35 | | /// </summary> |
| | 36 | | public enum Active |
| | 37 | | { |
| | 38 | | NO = 0, |
| | 39 | | YES = 1 |
| | 40 | | } |
| | 41 | | /// <summary> |
| | 42 | | /// Pollutant enum. |
| | 43 | | /// </summary> |
| | 44 | | public enum Pollutant |
| | 45 | | { |
| | 46 | | PM = 0, |
| | 47 | | CO = 1, |
| | 48 | | CO2 = 2, |
| | 49 | | NO = 3, |
| | 50 | | NO2 = 4, |
| | 51 | | SO2 = 5, |
| | 52 | | NH3 = 6, |
| | 53 | | H2O2 = 7, |
| | 54 | | SPRAY = 8, |
| | 55 | | } |
| | 56 | | /// <summary> |
| | 57 | | /// Turbulence enum. |
| | 58 | | /// </summary> |
| | 59 | | public enum TurbolenceType |
| | 60 | | { |
| | 61 | | MellorAndYamada = 0, |
| | 62 | | KatoAndLaunder = 1, |
| | 63 | | Lopez = 2, |
| | 64 | | Bruse = 3, |
| | 65 | | } |
| | 66 | |
|
| | 67 | | /// <summary> |
| | 68 | | /// Wind at facade settings enum. |
| | 69 | | /// </summary> |
| | 70 | | public enum FacadeMod |
| | 71 | | { |
| | 72 | | MO = 0, |
| | 73 | | DIN6946 = 1, |
| | 74 | | } |
| | 75 | |
|
| | 76 | | /// <summary> |
| | 77 | | /// Lateral Boundary Condition enum. |
| | 78 | | /// </summary> |
| | 79 | | public enum BoundaryCondition |
| | 80 | | { |
| | 81 | | Open = 1, |
| | 82 | | Forced = 2, |
| | 83 | | Cyclic = 3, |
| | 84 | | } |
| | 85 | | } |