mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 04:19:19 +02:00
Working retarder for DieselEngine
This commit is contained in:
committed by
tmj-fstate
parent
4ca55d7b2b
commit
32ca2b76ff
@@ -1544,6 +1544,7 @@ public:
|
||||
bool dizel_AutoGearCheck(void);
|
||||
double dizel_fillcheck(int mcp);
|
||||
double dizel_Momentum(double dizel_fill, double n, double dt);
|
||||
double dizel_MomentumRetarder(double n, double dt); // moment hamowania retardera
|
||||
void dizel_HeatSet( float const Value );
|
||||
void dizel_Heat( double const dt );
|
||||
bool dizel_StartupCheck();
|
||||
|
||||
@@ -4750,6 +4750,8 @@ double TMoverParameters::TractionForce( double dt ) {
|
||||
{
|
||||
Mm = dmoment; //bylo * dizel_engage
|
||||
Mw = Mm * dtrans; // dmoment i dtrans policzone przy okazji enginerotation
|
||||
if ((hydro_R) && (hydro_R_Placement == 0))
|
||||
Mw -= dizel_MomentumRetarder(nrot * Transmision.Ratio, dt) * Transmision.Ratio;
|
||||
Fw = Mw * 2.0 / WheelDiameter / NPoweredAxles;
|
||||
Ft = Fw * NPoweredAxles; // sila trakcyjna
|
||||
Ft = Ft * DirAbsolute; // ActiveDir*CabNo;
|
||||
@@ -6500,6 +6502,8 @@ double TMoverParameters::dizel_Momentum(double dizel_fill, double n, double dt)
|
||||
|
||||
if( enrot > 0 ) {
|
||||
Moment = ( dizel_Mmax - ( dizel_Mmax - dizel_Mnmax ) * square( ( enrot - dizel_nMmax ) / ( dizel_nMmax - dizel_nmax ) ) ) * dizel_fill - dizel_Mstand;
|
||||
if ((hydro_R) && (hydro_R_Placement == 2))
|
||||
Moment -= dizel_MomentumRetarder(enrot, dt);
|
||||
}
|
||||
else {
|
||||
Moment = -dizel_Mstand;
|
||||
@@ -6619,6 +6623,8 @@ double TMoverParameters::dizel_Momentum(double dizel_fill, double n, double dt)
|
||||
double enrot_max = enrot + (Min0R(TorqueC, TorqueL + abs(hydro_TC_TorqueIn)) + Moment) / dizel_AIM * dt;
|
||||
enrot = clamp(n,enrot_min,enrot_max);
|
||||
}
|
||||
if ((hydro_R) && (hydro_R_Placement == 1))
|
||||
gearMoment -= dizel_MomentumRetarder(hydro_TC_nOut, dt);
|
||||
|
||||
|
||||
if( ( enrot <= 0 ) && ( false == dizel_spinup ) ) {
|
||||
@@ -6631,6 +6637,40 @@ double TMoverParameters::dizel_Momentum(double dizel_fill, double n, double dt)
|
||||
return gearMoment;
|
||||
}
|
||||
|
||||
double TMoverParameters::dizel_MomentumRetarder(double n, double dt)
|
||||
{
|
||||
double RetarderRequest = (Mains ? std::max(0.0, -eimic_real) : 0);
|
||||
if (Vel < hydro_R_MinVel)
|
||||
RetarderRequest = 0;
|
||||
if ((hydro_R_Placement == 2) && (enrot < dizel_nmin))
|
||||
{
|
||||
RetarderRequest = 0;
|
||||
}
|
||||
|
||||
hydro_R_n = n * 60;
|
||||
|
||||
if (hydro_R_Fill < RetarderRequest) //gdy zadane hamowanie
|
||||
{
|
||||
hydro_R_Fill = std::min(hydro_R_Fill + hydro_R_FillRateInc*dt, RetarderRequest);
|
||||
}
|
||||
else
|
||||
{
|
||||
hydro_R_Fill = std::max(hydro_R_Fill - hydro_R_FillRateDec*dt, RetarderRequest);
|
||||
}
|
||||
|
||||
double Moment = hydro_R_MaxTorque;
|
||||
double pwr = Moment * n * M_PI * 2 * 0.001;
|
||||
if (pwr > hydro_R_MaxPower)
|
||||
Moment = Moment * hydro_R_MaxPower / pwr;
|
||||
double moment_in = n*n*hydro_R_TorqueInIn;
|
||||
Moment = std::min(moment_in, Moment * hydro_R_Fill);
|
||||
|
||||
hydro_R_Torque = Moment;
|
||||
|
||||
return Moment;
|
||||
|
||||
}
|
||||
|
||||
// sets component temperatures to specified value
|
||||
void TMoverParameters::dizel_HeatSet( float const Value ) {
|
||||
|
||||
|
||||
@@ -806,7 +806,11 @@ debug_panel::update_section_engine( std::vector<text_line> &Output ) {
|
||||
{ "hTCTI: ", mover.hydro_TC_TorqueIn },
|
||||
{ "hTCTO: ", mover.hydro_TC_TorqueOut },
|
||||
{ "hTCfl: ", mover.hydro_TC_Fill },
|
||||
{ "hTCLR: ", mover.hydro_TC_LockupRate } };
|
||||
{ "hRtFl: ", mover.hydro_R_Fill } ,
|
||||
{ " hRtn: ", mover.hydro_R_n } ,
|
||||
{ "hRtTq: ", mover.hydro_R_Torque }
|
||||
|
||||
};
|
||||
for( auto const ¶meter : hydrovalues ) {
|
||||
parameterstext += "\n" + parameter.first + to_string( parameter.second, 2, 9 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user