Managing different thrust maps according to engine ratings #389
Replies: 6 comments 3 replies
-
Use a <table>
<independentVar lookup="row"> fcs/row-value </independentVar>
<independentVar lookup="column"> fcs/column-value </independentVar>
<independentVar lookup="table"> fcs/engine-rating-value </independentVar>
<tableData breakPoint="1">
-1.0 1.0
0.0 1.0000 2.0000
1.0 3.0000 4.0000
</tableData>
<tableData breakPoint="2">
0.0 10.0
2.0 1.0000 2.0000
3.0 3.0000 4.0000
</tableData>
<tableData breakPoint="3">
0.0 10.0 20.0
2.0 1.0000 2.0000 3.0000
3.0 4.0000 5.0000 6.0000
10.0 7.0000 8.0000 9.0000
</tableData>
</table> |
Beta Was this translation helpful? Give feedback.
-
Or what about using From an example @djlinse posted on the mailing list in 2013. If you replaced <function name="bigWhatever1">
<interpolate1d>
<p> aero/qbar-psf </p>
<v> 0 </v> <interpolate1d>
<p> velocities/mach </p>
<v> 0.00 </v> <table> ... table 1 definition ...
<v> 0.80 </v> <table> ... table 2 definition ...
<v> 0.90 </v> <table> ... table 3 definition ...
</interpolate1d>
<v> 65 </v> <interpolate1d>
<p> velocities/mach </p>
<v> 0.00 </v> <table> ... table 1 definition ...
<v> 0.80 </v> <table> ... table 2 definition ...
<v> 0.90 </v> <table> ... table 3 definition ...
</interpolate1d>
<v> 90 </v> <interpolate1d>
<p> velocities/mach </p>
<v> 0.00 </v> <table> ... table 1 definition ...
<v> 0.80 </v> <table> ... table 2 definition ...
<v> 0.90 </v> <table> ... table 3 definition ...
</interpolate1d>
</interpolate1d>
</function> |
Beta Was this translation helpful? Give feedback.
-
Actually here is @jonsberndt's originally posting to the mailing list (I've just added the xml formatting) explaining how to use -----Original Message----- It has long been the case that 3-dimensional tables are the limit of what we Some lookup tables in simulation - particularly for aerodynamic data - can <interpolate1d>
{property, value, table, function}
{property, value, table, function} {property, value, table, function}
...
</interpolate1d> Example: If mach is 0.4, the interpolation will return 0.375. If mach is 1.5, the interpolation will return 0.60. <interpolate1d>
<p> velocities/mach </p>
<v> 0.00 </v> <v> 0.25 </v>
<v> 0.80 </v> <v> 0.50 </v>
<v> 0.90 </v> <v> 0.60 </v>
</interpolate1d> The above example is very simplistic. A more involved example would use a <function name="whatever">
<interpolate1d>
<p> velocities/mach </p>
<v> 0.00 </v> <table> ... table definition ... </table>
<v> 0.80 </v> <table> ... table definition ... </table>
<v> 0.90 </v> <table> ... table definition ... </table>
</interpolate1d>
</function> Carrying this further: <function name="bigWhatever1">
<interpolate1d>
<p> aero/qbar-psf </p>
<v> 0 </v> <interpolate1d>
<p> velocities/mach </p>
<v> 0.00 </v> <table> ... table 1 definition ... </table>
<v> 0.80 </v> <table> ... table 2 definition ... </table>
<v> 0.90 </v> <table> ... table 3 definition ... </table>
</interpolate1d>
<v> 65 </v> <interpolate1d>
<p> velocities/mach </p>
<v> 0.00 </v> <table> ... table 1 definition ... </table>
<v> 0.80 </v> <table> ... table 2 definition ... </table>
<v> 0.90 </v> <table> ... table 3 definition ... </table>
</interpolate1d>
<v> 90 </v> <interpolate1d>
<p> velocities/mach </p>
<v> 0.00 </v> <table> ... table 1 definition ... </table>
<v> 0.80 </v> <table> ... table 2 definition ... </table>
<v> 0.90 </v> <table> ... table 3 definition ... </table>
</interpolate1d>
</interpolate1d>
</function> The above effectively gives a five dimensional lookup table. It would be big There is more, though. For very, very large aero databases there might be If the value of the first immediate child element is 1, then the value of <ifthen>
{property, value, table, or other function element}
{property, value, table, or other function element}
{property, value, table, or other function element}
</ifthen> Example: if flight-mode is greater than 2, then a value of 0.00 is returned, otherwise the value of the property <ifthen>
<gt> <p> executive/flight-mode </p> <v> 2 </v> </gt>
<v> 0.00 </v>
<p> control/pitch-lag </p>
</ifthen> In our case, we could write the 5-dimensional table lookup as follows, returning a zero unless the gear is down: <function name="propertyname">
<ifthen>
<lt> <p> position/altitudeMSL </p> <v> 90 </v> </lt>
<interpolate1d>
<p> aero/qbar-psf </p>
<v> 0 </v> <interpolate1d>
<p> velocities/mach </p>
<v> 0.00 </v> <table> ... table 1 definition ... </table>
<v> 0.80 </v> <table> ... table 2 definition ... </table>
<v> 0.90 </v> <table> ... table 3 definition ... </table>
</interpolate1d>
<v> 65 </v> <interpolate1d>
<p> velocities/mach </p>
<v> 0.00 </v> <table> ... table 1 definition ... </table>
<v> 0.80 </v> <table> ... table 2 definition ... </table>
<v> 0.90 </v> <table> ... table 3 definition ... </table>
</interpolate1d>
<v> 90 </v> <interpolate1d>
<p> velocities/mach </p>
<v> 0.00 </v> <table> ... table 1 definition ... </table>
<v> 0.80 </v> <table> ... table 2 definition ... </table>
<v> 0.90 </v> <table> ... table 3 definition ... </table>
</interpolate1d>
</interpolate1d>
<v> 0 </v>
</ifthen>
</function> The above example is non-sensical in a way, but the format is correct. I Jon |
Beta Was this translation helpful? Give feedback.
-
@seanmcleod How the file |
Beta Was this translation helpful? Give feedback.
-
So your So the 1st dimension is indexed on Although you had previously also mentioned having another data dimension, i.e. <function name="MilThrust">
<interpolate1d>
<p> fcs/engine-rating-value </p>
<v> 1 </v> <interpolate1d>
<p> velocities/mach </p>
<v> 0.00 </v> <table> ... table 1 definition ... </table>
<v> 0.80 </v> <table> ... table 2 definition ... </table>
<v> 0.90 </v> <table> ... table 3 definition ... </table>
</interpolate1d>
<v> 2 </v> <interpolate1d>
<p> velocities/mach </p>
<v> 0.00 </v> <table> ... table 1 definition ... </table>
<v> 0.80 </v> <table> ... table 2 definition ... </table>
<v> 0.90 </v> <table> ... table 3 definition ... </table>
</interpolate1d>
<v> 3 </v> <interpolate1d>
<p> velocities/mach </p>
<v> 0.00 </v> <table> ... table 1 definition ... </table>
<v> 0.80 </v> <table> ... table 2 definition ... </table>
<v> 0.90 </v> <table> ... table 3 definition ... </table>
</interpolate1d>
</interpolate1d>
</function> Then you would have the equivalent for |
Beta Was this translation helpful? Give feedback.
-
So assuming the dimensions, So it first indexes based on the discrete <function name="MilThrust">
<interpolate1d>
<p> fcs/engine-rating-value </p>
<v> 1 </v> <interpolate1d>
<p> temp-delta-ISA </p>
<v> -10 </v>
<table>
<independentVar lookup="row">velocities/mach</independentVar>
<independentVar lookup="column">atmosphere/density-altitude</independentVar>
<tableData>
-10000 0 10000 20000 30000 40000 50000 60000
0.0 1.2600 1.0000 0.7400 0.5340 0.3720 0.2410 0.1490 0.0
0.2 1.1710 0.9340 0.6970 0.5060 0.3550 0.2310 0.1430 0.0
0.4 1.1500 0.9210 0.6920 0.5060 0.3570 0.2330 0.1450 0.0
0.6 1.1810 0.9510 0.7210 0.5320 0.3780 0.2480 0.1540 0.0
0.8 1.2580 1.0200 0.7820 0.5820 0.4170 0.2750 0.1700 0.0
1.0 1.3690 1.1200 0.8710 0.6510 0.4750 0.3150 0.1950 0.0
1.2 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0
</tableData>
</table>
<v> 0 </v> <table> ... table 2 definition ... </table>
<v> 10 </v> <table> ... table 3 definition ... </table>
</interpolate1d>
<v> 2 </v> <interpolate1d>
<p> temp-delta-ISA </p>
<v> -10 </v> <table> ... table 1 definition ... </table>
<v> 0 </v> <table> ... table 2 definition ... </table>
<v> 10 </v> <table> ... table 3 definition ... </table>
</interpolate1d>
<v> 3 </v> <interpolate1d>
<p> temp-delta-ISA </p>
<v> -10 </v> <table> ... table 1 definition ... </table>
<v> 0 </v> <table> ... table 2 definition ... </table>
<v> 10 </v> <table> ... table 3 definition ... </table>
</interpolate1d>
</interpolate1d>
</function> |
Beta Was this translation helpful? Give feedback.
-
Referring to the discussion #381 on "Accurate TSFC - Thrust Specific Fuel Consumption", the following is a request regarding thrust modelling.
I have in my model a selector function that picks one of the available engine ratings (i.e. engine states). Ratings range from Maximum Takeoff thrust (MTO), to Maximum Climb thrust (MCL), Cruise, Flight Idle, etc. For each rating I have tables that map thrust T versus Mach number M, altitude (ASL) h, and ISA Delta-Temperature ISA-DT. Similarly, I have maps of TSFC as functions of the same variables.
I have such models for both turbofan engines and turboprop engines.
How can this be modelled in JSBSim?
I can have a config file for a
<turbine_engine>
where I can define a<function name="MilThrust">
or a<function name="IdleThrust">
. But how all available ratings can be included in a model?Beta Was this translation helpful? Give feedback.
All reactions