Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

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

Pull request #107: fix calculation of E_<x>_off_loss

Merge in VECTO/vecto-dev from VECTO/mq_vecto-dev:bugfix/VECTO-1470-076.2463-em-drag-torque-questions-findings to develop

* commit '0c63afb8':
  fix calculation of E_<x>_off_loss
parents 5b2e0fc2 0c63afb8
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.
Finish editing this message first!
Please register or to comment