Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit e205d160 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

transient behavior of engine (PT1) respects simulation step

parent 946e67d8
Branches
Tags
No related merge requests found
......@@ -312,16 +312,14 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
protected void ComputeFullLoadPower(uint gear, RadianPerSecond angularFrequency, TimeSpan dt)
{
Contract.Requires(dt.Ticks != 0);
// TODO @@@quam: handle dynamic timesteps
Contract.Requires(dt.TotalSeconds.IsSmallerOrEqual(1), "simulation steps other than 1s can not be handled ATM");
Contract.Ensures(_currentState.DynamicFullLoadPower <= _currentState.StationaryFullLoadPower);
//_currentState.StationaryFullLoadPower = _data.GetFullLoadCurve(gear).FullLoadStationaryPower(rpm);
_currentState.StationaryFullLoadTorque = _data.GetFullLoadCurve(gear).FullLoadStationaryTorque(angularFrequency);
_currentState.StationaryFullLoadPower = Formulas.TorqueToPower(_currentState.StationaryFullLoadTorque,
angularFrequency);
var pt1 = _data.GetFullLoadCurve(gear).PT1(angularFrequency);
var pt1 = _data.GetFullLoadCurve(gear).PT1(angularFrequency) / dt.TotalSeconds;
var dynFullPowerCalculated = ((1 / (pt1 + 1)) * (_currentState.StationaryFullLoadPower + pt1 * _previousState.EnginePower)).To<Watt>();
_currentState.DynamicFullLoadPower = dynFullPowerCalculated < _currentState.StationaryFullLoadPower
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment