Meteorology Windfield
Meteorology windfield module.
Version of the meteorology class that deals with spatial wind fields and can calculate the wind field around cylindrical obstacles.
MeteorologyWindfield
dataclass
Bases: Meteorology
Represents a spatially resolved wind field based on meteorological measurements and the presence of obstacles.
This class extends the base Meteorology class by providing methods to compute the local wind vector (u and v
components) at every grid point, factoring in obstacle perturbations using an analytical method. It accounts for
spatial rotation to align with the instantaneous wind direction at each time step.
Attributes:
| Name | Type | Description |
|---|---|---|
static_wind_field |
Meteorology
|
The static wind field used for calculations. |
site_layout |
SiteLayout
|
The layout of the site, including cylinder coordinates and radii. |
Source code in src/pyelq/meteorology/meteorology_windfield.py
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 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | |
calculate_spatial_wind_field(grid_coordinates, time_index=None)
Calculates the spatial wind field over a grid considering obstacles.
Computes the full spatial wind field from a time series stored in self.static_wind_field at grid locations provided in grid_coordinates considering distortion effects due to flow around cylindrical obstacles.
The method:
- Rotates grid coordinates into the wind-aligned frame based on mathematical wind direction.
- Calculates the distorted wind field due to the presence of cylindrical obstacles.
- Rotates the resulting local wind field back into the original frame.
- Updates the object's u_component and v_component accordingly.
- If w_component is present in the static wind field, it is broadcasted to match the grid points.
- If no site layout is provided, the wind field remains undisturbed and is simply broadcasted across the grid.
Output: The method updates the following properties in place: - u_component np.ndarray: (n_grid x n_time) The x-component of the wind field at the grid points. - v_component np.ndarray: (n_grid x n_time) The y-component of the wind field at the grid points. - w_component np.ndarray: (n_grid x n_time) The z-component of the wind field at the grid points.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
grid_coordinates
|
ENU
|
The coordinates of the grid points. |
required |
time_index
|
int
|
The time index for the meteorological data. |
None
|
Source code in src/pyelq/meteorology/meteorology_windfield.py
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 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | |