public ActionResult Simulation(VGeneralProperties model) { ViewBag.Title = "Input | Wake Simulation II | Offwind"; lock (_model) { model.WindFarm = _model.WindFarm; ObjectMapperManager.DefaultInstance.GetMapper<VGeneralProperties, VGeneralProperties>().Map(model, _model); } var dWindFarm = _ctx.DWindFarms.First(e => _model.WindFarm == e.Name); _model.NTurbines = dWindFarm.DWindFarmTurbines.Count(); var input = new Simulation() { Tstart = (double)_model.StartTime, Tend = (double)_model.StopTime, DT = (double)_model.TimeStep, NTurbines = _model.NTurbines, RatedPower = 5, EnablePowerDistribution = true, EnableTurbineDynamics = true, PowerRefInterpolation = true, Pdemand = 3 * 5e6, PRefSampleTime = 5 }; input.LoadNREL5MW_MatFile(WebConfigurationManager.AppSettings["WakeFarmControlNREL5MW"]); input.LoadWind_MatFile(WebConfigurationManager.AppSettings["WakeFarmControlWind"]); _simulation = FarmControl2.Simulation(input); return RedirectToAction("Results"); }
public ActionResult Simulation() { ViewBag.Title = "Input | Wake Simulation II | Offwind"; if (_model == null) { _model = new VGeneralProperties(); _wfl = new List<string>(); _simulation = null; } var model = new VGeneralProperties(); ObjectMapperManager.DefaultInstance.GetMapper<VGeneralProperties, VGeneralProperties>().Map(_model, model); return View(model); }