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 0c63afb8 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

fix calculation of E_<x>_off_loss

parent 5b2e0fc2
No related branches found
No related tags found
No related merge requests found
......@@ -407,13 +407,14 @@ namespace TUGraz.VectoCore.OutputData
var selected = Data.AsEnumerable().Select(r => {
var dt = r.Field<Second>(ModalResultField.simulationInterval.GetName());
return new {
P_em = r.Field<Watt>(string.Format(ModalResultField.P_EM_electricMotor_el_.GetCaption(),
emPos.GetName())),
E_mech = r.Field<Watt>(string.Format(ModalResultField.P_EM_electricMotorLoss_.GetCaption(),
EM_off = r.Field<Scalar>(string.Format(ModalResultField.EM_Off_.GetCaption(), emPos.GetName())),
//P_em = r.Field<Watt>(string.Format(ModalResultField.P_EM_electricMotor_el_.GetCaption(),
// emPos.GetName())),
E_mech = r.Field<Watt>(string.Format(ModalResultField.P_EM_mech_.GetCaption(),
emPos.GetName())) * dt,
};
});
return selected.Where(x => x.P_em.IsEqual(0)).Sum(x => x.E_mech) ?? 0.SI<WattSecond>();
return selected.Where(x => !x.EM_off.IsEqual(0)).Sum(x => x.E_mech) ?? 0.SI<WattSecond>();
}
public WattSecond ElectricMotorLosses(PowertrainPosition emPos)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment