Main Document
This is the main document file that calls the model and controls the GUI.
Contents
Prepare Workspace
Before the model can be loaded, all memory is cleared and the right dependencies are loaded.
Clear Memory
In order to avoid data confusion between several runs of the model, all memory is cleared and figures are closed.
clear all; close all; clc;
Load Libraries and Classes
Several external libararies are used, like converting GPS coordinates to a 2D grid. These are loaded into the memory of MATLAB together with the classes that make up the program.
addpath('libraries'); addpath('classes'); addpath('classes/interfaces');
Initiate Model
Here the model object is created and the configuration file is loaded. Note that the configuration of the model can be overwritten by the GUI. The turbine type is set to the Siemens Wind Turbine 3.0 MW 108m, like the turbines installed at Westermeerwind. For more information on the model, see the documentation of the Model object.
model = Model(); model.turbineType = SWTurbineType(); model.layout = WMWLayout(); model.mesh = model.layout.getMesh();
Build GUI and Start Modelling
A GUI is launched that takes control over displaying the plots of the model and optionally add slider controls to manipulated the model. For more information see the documention of the SimpelGUI object.
gui = SimpleGUI(model);
