16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 17:09:19 +02:00

Add braking resistor ventilator sound and simple simulation

This commit is contained in:
2025-01-03 17:39:54 +01:00
parent 63a7fa55eb
commit a01a63c8bf
4 changed files with 40 additions and 2 deletions

View File

@@ -6408,6 +6408,19 @@ double TMoverParameters::TractionForce( double dt ) {
0.007 * (std::abs(EngineVoltage) - (EnginePowerSource.CollectorParameters.MaxV - 100)));
Itot = eimv[eimv_Ipoj] * (0.01 + std::min(0.99, 0.99 - Vadd));
// Uproszczona symulacja rezystora hamowania
if (eimv[eimv_Ipoj] < 0)
{
// Prad oddawany na rezystor
double Irh = abs(eimv[eimv_Pe]) - abs(eimv[eimv_Ipoj]);
// Wlacz wentylator jesli prad przekroczy maksymalny dla pasywnego chlodzenia
BRVentilators = Irh > Imaxrpc;
}
else
BRVentilators = false;
EnginePower = abs(eimv[eimv_Ic] * eimv[eimv_U] * NPoweredAxles) / 1000;
// power inverters
auto const tmpV { std::abs( eimv[ eimv_fp ] ) };
@@ -11019,7 +11032,7 @@ void TMoverParameters::LoadFIZ_Engine( std::string const &Input ) {
extract_value( EIMCLogForce, "eimclf", Input, "" );
extract_value( InvertersNo, "InvNo", Input, "" );
extract_value( InverterControlCouplerFlag, "InvCtrCplFlag", Input, "" );
extract_value(Imaxrpc, "Imaxrpc", Input, "");
extract_value( Flat, "Flat", Input, "");
if (eimc[eimc_p_Pmax] > 0 && Power > 0 && InvertersNo == 0) {