| | | 1 | | using Morpho25.IO; |
| | | 2 | | using Morpho25.Management; |
| | | 3 | | |
| | | 4 | | |
| | | 5 | | namespace Morpho25.Settings |
| | | 6 | | { |
| | | 7 | | /// <summary> |
| | | 8 | | /// FullForcing class. |
| | | 9 | | /// </summary> |
| | | 10 | | public class FullForcing |
| | | 11 | | { |
| | | 12 | | /// <summary> |
| | | 13 | | /// File name of simulation file. |
| | | 14 | | /// </summary> |
| | 0 | 15 | | public string FileName { get; } |
| | | 16 | | |
| | | 17 | | public const string INTERPOLATION_METHOD = "linear"; |
| | | 18 | | public const string NUDGING = "1"; |
| | | 19 | | public const string NUNDGING_FACTOR = "1.00000"; |
| | | 20 | | public const string Z_0 = "0.10000"; |
| | | 21 | | |
| | | 22 | | /// <summary> |
| | | 23 | | /// Limit of wind speed at 2500 meters. |
| | | 24 | | /// </summary> |
| | 0 | 25 | | public double LimitWind2500 { get; set; } |
| | | 26 | | /// <summary> |
| | | 27 | | /// Max wind speed at 2500 meter. |
| | | 28 | | /// </summary> |
| | 0 | 29 | | public double MaxWind2500 { get; set; } |
| | | 30 | | |
| | | 31 | | /// <summary> |
| | | 32 | | /// Adjust the minimum interal for updating |
| | | 33 | | /// the Full Forcing inflow. |
| | | 34 | | /// </summary> |
| | 0 | 35 | | public uint MinFlowsteps { get; set; } |
| | | 36 | | |
| | | 37 | | /// <summary> |
| | | 38 | | /// Use temperature values of EPW as boundary condition. |
| | | 39 | | /// </summary> |
| | 0 | 40 | | public Active ForceTemperature { get; set; } |
| | | 41 | | |
| | | 42 | | /// <summary> |
| | | 43 | | /// Use wind speed and direction values of EPW |
| | | 44 | | /// as boundary condition. |
| | | 45 | | /// </summary> |
| | 0 | 46 | | public Active ForceWind { get; set; } |
| | | 47 | | |
| | | 48 | | /// <summary> |
| | | 49 | | /// Use relative humidity values |
| | | 50 | | /// of EPW as boundary condition. |
| | | 51 | | /// </summary> |
| | 0 | 52 | | public Active ForceRelativeHumidity { get; set; } |
| | | 53 | | |
| | | 54 | | /// <summary> |
| | | 55 | | /// Use precipitation values |
| | | 56 | | /// of EPW as boundary condition. |
| | | 57 | | /// </summary> |
| | 0 | 58 | | public Active ForcePrecipitation { get; set; } |
| | | 59 | | |
| | | 60 | | /// <summary> |
| | | 61 | | /// Use radiation and cloudiness |
| | | 62 | | /// values of EPW as boundary condition. |
| | | 63 | | /// </summary> |
| | 0 | 64 | | public Active ForceRadClouds { get; set; } |
| | | 65 | | |
| | | 66 | | /// <summary> |
| | | 67 | | /// Create a new FullForcing settings. |
| | | 68 | | /// Force boundary condition using EPW file. |
| | | 69 | | /// </summary> |
| | | 70 | | /// <param name="epw">EPW file to use.</param> |
| | | 71 | | /// <param name="workspace">Inx Workspace object of your current project.</param> |
| | 0 | 72 | | public FullForcing(string epw, Workspace workspace) |
| | 0 | 73 | | { |
| | 0 | 74 | | FileName = FoxBatch.GetFoxFile(epw, workspace); |
| | 0 | 75 | | LimitWind2500 = 0; |
| | 0 | 76 | | MaxWind2500 = 999.00000; |
| | 0 | 77 | | MinFlowsteps = 30; |
| | 0 | 78 | | ForceTemperature = Active.YES; |
| | 0 | 79 | | ForceWind = Active.YES; |
| | 0 | 80 | | ForceRelativeHumidity = Active.YES; |
| | 0 | 81 | | ForcePrecipitation = Active.NO; |
| | 0 | 82 | | ForceRadClouds = Active.YES; |
| | 0 | 83 | | } |
| | | 84 | | |
| | | 85 | | /// <summary> |
| | | 86 | | /// Title of the XML section |
| | | 87 | | /// </summary> |
| | 0 | 88 | | public string Title => "FullForcing"; |
| | | 89 | | |
| | | 90 | | /// <summary> |
| | | 91 | | /// Values of the XML section |
| | | 92 | | /// TODO: It will be updated soon |
| | | 93 | | /// </summary> |
| | 0 | 94 | | public string[] Values => new[] { |
| | 0 | 95 | | FileName, |
| | 0 | 96 | | ((int)ForceTemperature).ToString(), |
| | 0 | 97 | | ((int)ForceRelativeHumidity).ToString(), |
| | 0 | 98 | | ((int)ForceWind).ToString(), |
| | 0 | 99 | | ((int)ForcePrecipitation).ToString(), |
| | 0 | 100 | | ((int)ForceRadClouds).ToString(), |
| | 0 | 101 | | INTERPOLATION_METHOD, |
| | 0 | 102 | | NUDGING, |
| | 0 | 103 | | FullForcing.NUNDGING_FACTOR, |
| | 0 | 104 | | MinFlowsteps.ToString(), |
| | 0 | 105 | | LimitWind2500.ToString(), |
| | 0 | 106 | | MaxWind2500.ToString("n5"), |
| | 0 | 107 | | Z_0 |
| | 0 | 108 | | }; |
| | | 109 | | |
| | | 110 | | /// <summary> |
| | | 111 | | /// Tags of the XML section |
| | | 112 | | /// </summary> |
| | 0 | 113 | | public string[] Tags => new[] { |
| | 0 | 114 | | "fileName", |
| | 0 | 115 | | "forceT", |
| | 0 | 116 | | "forceQ", |
| | 0 | 117 | | "forceWind", |
| | 0 | 118 | | "forcePrecip", |
| | 0 | 119 | | "forceRadClouds", |
| | 0 | 120 | | "interpolationMethod", |
| | 0 | 121 | | "nudging", |
| | 0 | 122 | | "nudgingFactor", |
| | 0 | 123 | | "minFlowsteps", |
| | 0 | 124 | | "limitWind2500", |
| | 0 | 125 | | "maxWind2500", |
| | 0 | 126 | | "z_0" |
| | 0 | 127 | | }; |
| | | 128 | | |
| | | 129 | | /// <summary> |
| | | 130 | | /// String representation of tthread object. |
| | | 131 | | /// </summary> |
| | | 132 | | /// <returns>String representation.</returns> |
| | 0 | 133 | | public override string ToString() => $"Config::FullForcing::{FileName}"; |
| | | 134 | | } |
| | | 135 | | |
| | | 136 | | } |