|
From: Erik H. <eh...@us...> - 2015-10-24 22:05:02
|
Update of /cvsroot/jsbsim/JSBSim/utils/aeromatic++/Systems In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv5326/Systems Modified Files: Propulsion.cpp Propulsion.h Log Message: Estimate tsfc for turbine engines Index: Propulsion.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/utils/aeromatic++/Systems/Propulsion.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** Propulsion.cpp 24 Oct 2015 11:51:13 -0000 1.16 --- Propulsion.cpp 24 Oct 2015 22:04:59 -0000 1.17 *************** *** 474,478 **** --- 474,480 ---- + // http://web.mit.edu/16.unified/www/SPRING/propulsion/UnifiedPropulsion3/UnifiedPropulsion3.htm TurbineEngine::TurbineEngine(Aeromatic *a, Propulsion *p) : Engine(a, p), + _bypass_ratio(1.0f), _injected(false), _augmented(false) *************** *** 480,483 **** --- 482,486 ---- _description.push_back("Turbine Engine"); _inputs.push_back(new Param("Engine Thrust", 0, _power, _aircraft->_metric, THRUST)); + _inputs.push_back(new Param("Bypass ratio", 0, _bypass_ratio)); _thruster = new Direct(this); } *************** *** 493,496 **** --- 496,505 ---- } + // Figure 3.10 + float tsfc = 1.4f - 0.109f * (4.6 + logf(_bypass_ratio)); + + file.precision(1); + file.flags(std::ios::right); + file << std::fixed << std::showpoint; file << "<!--" << std::endl; file << " File: " << _propulsion->_engine_name << ".xml" << std::endl; *************** *** 502,506 **** file << " name: " << _propulsion->_engine_name << std::endl; file << " type: " << _description[0] << std::endl; ! file << " thrust: " << _power << " lb" << std::endl; file << " augmented? " << (_augmented ? "yes" : "no") << std::endl; file << " injected? " << (_injected ? "yes" : "no") << std::endl; --- 511,516 ---- file << " name: " << _propulsion->_engine_name << std::endl; file << " type: " << _description[0] << std::endl; ! file << " thrust: " << _power << " lbf" << std::endl; ! file << " bypass ratio: " << _bypass_ratio << ":1" << std::endl; file << " augmented? " << (_augmented ? "yes" : "no") << std::endl; file << " injected? " << (_injected ? "yes" : "no") << std::endl; *************** *** 512,519 **** file << " <maxthrust> " << max_thrust << " </maxthrust>" << std::endl; } ! file << " <bypassratio> 1.0 </bypassratio>" << std::endl; ! file << " <tsfc> 0.8 </tsfc>" << std::endl; if (_augmented) { ! file << " <atsfc> 1.7 </atsfc>" << std::endl; } file << " <bleed> 0.03</bleed>" << std::endl; --- 522,529 ---- file << " <maxthrust> " << max_thrust << " </maxthrust>" << std::endl; } ! file << " <bypassratio> " << _bypass_ratio << " </bypassratio>" << std::endl; ! file << " <tsfc> " << std::setprecision(3) << tsfc << " </tsfc>" << std::endl; if (_augmented) { ! file << " <atsfc> " << (tsfc + 0.9f) << " </atsfc>" << std::endl; } file << " <bleed> 0.03</bleed>" << std::endl; *************** *** 624,628 **** _inputs.push_back(new Param("Maximum Engine RPM", 0, _max_rpm)); _inputs.push_back(new Param("Overall pressure ratio", Aeromatic::_estimate, _oapr)); ! _inputs.push_back(new Param("Inlet Turbine Temperature", Aeromatic::_estimate, _itt)); _thruster = new Propeller(this); } --- 634,638 ---- _inputs.push_back(new Param("Maximum Engine RPM", 0, _max_rpm)); _inputs.push_back(new Param("Overall pressure ratio", Aeromatic::_estimate, _oapr)); ! _inputs.push_back(new Param("Turbine Inlet Temperature", "in degrees Celcius", _itt)); _thruster = new Propeller(this); } *************** *** 646,650 **** _thruster->set_thruster(_max_rpm); float max_rpm = propeller->max_rpm(); - float Cp0 = propeller->Cp0(); float psfc = 0.5f; --- 656,659 ---- *************** *** 672,686 **** file << std::endl; file << " Inputs:" << std::endl; ! file << " name: " << _propulsion->_engine_name << std::endl; ! file << " type: " << _description[0] << std::endl; ! file << " power: " << _power << " hp" << std::endl; file << "-->" << std::endl; file <<std::endl; file << "<turboprop_engine name=\"" << _propulsion->_engine_name << "\">" << std::endl; ! file << " <milthrust unit=\"LBS\"> " << thrust << " </milthrust>" << std::endl; file << " <idlen1> 60.0 </idlen1>" << std::endl; file << " <maxn1> 100.0 </maxn1>" << std::endl; - file << " <idlen2> 60.0 </idlen2>" << std::endl; - file << " <maxn2> 100.0 </maxn2>" << std::endl; file << " <maxpower unit=\"HP\"> " << std::setw(6) << _power << " </maxpower>" << std::endl; file << " <psfc unit=\"LBS/HR/HP\"> " << std::setprecision(3) << psfc << std::setprecision(1) << " </psfc>" << std::endl; --- 681,695 ---- file << std::endl; file << " Inputs:" << std::endl; ! file << " name: " << _propulsion->_engine_name << std::endl; ! file << " type: " << _description[0] << std::endl; ! file << " power: " << _power << " hp" << std::endl; ! file << " inlet temperature: " << _itt << " degrees C"<< std::endl; ! file << " overall pressure ratio: " << _oapr << ":1" << std::endl; file << "-->" << std::endl; file <<std::endl; file << "<turboprop_engine name=\"" << _propulsion->_engine_name << "\">" << std::endl; ! file << " <milthrust unit=\"LBS\"> " << thrust << " </milthrust>" << std::endl; file << " <idlen1> 60.0 </idlen1>" << std::endl; file << " <maxn1> 100.0 </maxn1>" << std::endl; file << " <maxpower unit=\"HP\"> " << std::setw(6) << _power << " </maxpower>" << std::endl; file << " <psfc unit=\"LBS/HR/HP\"> " << std::setprecision(3) << psfc << std::setprecision(1) << " </psfc>" << std::endl; *************** *** 714,718 **** file << " <tableData>" << std::endl; ! file << " 0 5 60 86 94 95 96 97 98 99 100 101" << std::endl; for (unsigned i=0; i<6; ++i) { --- 723,727 ---- file << " <tableData>" << std::endl; ! file << " 0 5 60 86 94 95 96 97 98 99 100 101" << std::endl; for (unsigned i=0; i<6; ++i) { Index: Propulsion.h =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/utils/aeromatic++/Systems/Propulsion.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** Propulsion.h 24 Oct 2015 11:51:13 -0000 1.6 --- Propulsion.h 24 Oct 2015 22:04:59 -0000 1.7 *************** *** 111,114 **** --- 111,115 ---- private: + float _bypass_ratio; bool _injected; bool _augmented; |