Board index FlightGear Development Aircraft Flight dynamics model

JSB N1 N2 spinnup speed

Good sims require good FDMs (the "thing" that makes an aircraft behave like an aircraft).

JSB N1 N2 spinnup speed

Postby Octal450 » Wed Apr 05, 2017 10:37 pm

Hi
While working the new engine system in my A320, I find a flaw:

I have an issue where JSB spins the engines up to n1-spinnup and n2-spinnup values WAY to quickly, and where N2 takes alot longer to reach IDLE than N1. Can I resolve this in JSB? or Do I need to take a Yasim approach and make custom interpolates to startup to cover up this flaw?

Thanks
J

Here is my XML:

Code: Select all
<?xml version="1.0"?>
<!--
  File:     V2522_A5.xml
  Author:   Aero-Matic v 0.81

  Inputs:
    name:           V2522_A5
    type:           turbine
    thrust:         26600 lb
    augmented?      no
    injected?       no
-->

<turbine_engine name="V2527_A5">
  <milthrust>     26600 </milthrust>
  <bypassratio>     2.0 </bypassratio>
  <tsfc>            0.8 </tsfc>
  <bleed>          0.03 </bleed>
  <idlen1>         23.4 </idlen1>
  <idlen2>         63.7 </idlen2>
  <n1spinup>        5.1 </n1spinup>
  <n2spinup>       22.8 </n2spinup>
  <maxn1>         105.8 </maxn1>
  <maxn2>         102.1 </maxn2>
  <augmented>         0 </augmented>
  <injected>          0 </injected>

  <function name="IdleThrust">
   <table>
    <independentVar lookup="row">velocities/mach</independentVar>
    <independentVar lookup="column">atmosphere/density-altitude</independentVar>
    <tableData>
         -10000     0     10000   20000   30000   40000   50000
     0.0  0.0430  0.0488  0.0528  0.0694  0.0899  0.1183  0.1467
     0.2  0.0500  0.0501  0.0335  0.0544  0.0797  0.1049  0.1342
     0.4  0.0040  0.0047  0.0020  0.0272  0.0595  0.0891  0.1203
     0.6  0.0     0.0     0.0     0.0     0.0276  0.0718  0.1073
     0.8  0.0     0.0     0.0     0.0     0.0474  0.0868  0.0900
     1.0  0.0     0.0     0.0     0.0     0.0     0.0552  0.0800
    </tableData>
   </table>
  </function>

  <function name="MilThrust">
   <table>
    <independentVar lookup="row">velocities/mach</independentVar>
    <independentVar lookup="column">atmosphere/density-altitude</independentVar>
    <tableData>
          -10000       0   10000   20000   30000   40000   50000
     0.0   1.2600  1.0000  0.7400  0.5340  0.3720  0.2410  0.1490
     0.2   1.1710  0.9340  0.6970  0.5060  0.3550  0.2310  0.1430
     0.4   1.1500  0.9210  0.6920  0.5060  0.3570  0.2330  0.1450
     0.6   1.1810  0.9510  0.7210  0.5320  0.3780  0.2480  0.1540
     0.8   1.2580  1.0200  0.7820  0.5820  0.4170  0.2750  0.1700
     1.0   1.3690  1.1200  0.8710  0.6510  0.4750  0.3150  0.1950
     1.2   1.4850  1.2300  0.9750  0.7440  0.5450  0.3640  0.2250
     1.4   1.5941  1.3400  1.0860  0.8450  0.6280  0.4240  0.2630
    </tableData>
   </table>
  </function>

</turbine_engine>
Skillset: JSBsim Flight Dynamics, Systems, Canvas, Autoflight/Control, Instrumentation, Animations
Aircraft: A320-family, MD-11, MD-80, Contribs in a few others

Octal450's GitHub|Launcher Catalog
|Airbus Dev Discord|Octal450 Hangar Dev Discord
User avatar
Octal450
 
Posts: 5601
Joined: Tue Oct 06, 2015 1:51 pm
Location: Huntsville, AL
Callsign: WTF411
Version: next
OS: Windows 11

Re: JSB N1 N2 spinnup speed

Postby Alant » Wed Apr 05, 2017 11:33 pm

Look at the documentation http://jsbsim.sourceforge.net/JSBSim/classJSBSim_1_1FGTurbine.html, in particular the section about bypass ratio.

It is a simplified model of a jet engine, but is surprisinglng acurate.
Alant
 
Posts: 1223
Joined: Wed Jun 23, 2010 6:58 am
Location: Portugal
Callsign: Tarnish99
Version: latest Git
OS: Windows 10/11

Re: JSB N1 N2 spinnup speed

Postby Octal450 » Wed Apr 05, 2017 11:45 pm

OK... Thanks
I tried changing from 2.0 to 5.0 and 0.04... no difference...?
Skillset: JSBsim Flight Dynamics, Systems, Canvas, Autoflight/Control, Instrumentation, Animations
Aircraft: A320-family, MD-11, MD-80, Contribs in a few others

Octal450's GitHub|Launcher Catalog
|Airbus Dev Discord|Octal450 Hangar Dev Discord
User avatar
Octal450
 
Posts: 5601
Joined: Tue Oct 06, 2015 1:51 pm
Location: Huntsville, AL
Callsign: WTF411
Version: next
OS: Windows 11

Re: JSB N1 N2 spinnup speed

Postby Alant » Thu Apr 06, 2017 1:40 pm

Have you also experimented with n1spinup and n2spinup ?

Alan
Alant
 
Posts: 1223
Joined: Wed Jun 23, 2010 6:58 am
Location: Portugal
Callsign: Tarnish99
Version: latest Git
OS: Windows 10/11

Re: JSB N1 N2 spinnup speed

Postby erik » Thu Apr 06, 2017 2:51 pm

This is the link I put in every AeromatiC++ generated file for reference:
http://wiki.flightgear.org/JSBSim_Engines#FGTurbine

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2248
Joined: Thu Nov 01, 2007 2:41 pm

Re: JSB N1 N2 spinnup speed

Postby Richard » Thu Apr 06, 2017 3:09 pm

erik wrote in Thu Apr 06, 2017 2:51 pm:This is the link I put in every AeromatiC++ generated file for reference:
http://wiki.flightgear.org/JSBSim_Engines#FGTurbine


I've just amended this to cover details on how the acceleration works at the different phases. Hopefully it makes sense, can you check it please.
Richard
 
Posts: 810
Joined: Sun Nov 02, 2014 11:17 pm
Version: Git
OS: Win10

Re: JSB N1 N2 spinnup speed

Postby erik » Thu Apr 06, 2017 3:43 pm

The code shows this:
Code: Select all
N2 = Seek(&N2, 25.18, N2_spinup, N2/2.0);
  N1 = Seek(&N1, 5.21, N1_spinup, N1/2.0);


The second parameter is the target;
The third the acceleration per time step(*)
The fourth is the deceleration per time step(*).

So deceleration is basically exponential and acceleration is a time-step factor.
Since the FDM runs at 120 Hz most of the time it spools 120 RPM per second faster if spinup is 1.0

Acceleration starts below the target value and deceleration below the target value.

Erik

(*) this makes it model-hz dependent.
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2248
Joined: Thu Nov 01, 2007 2:41 pm

Re: JSB N1 N2 spinnup speed

Postby Richard » Thu Apr 06, 2017 3:58 pm

erik wrote in Thu Apr 06, 2017 3:43 pm:(*) this makes it model-hz dependent.


Unless I'm reading the code in Seek wrong I don't think it is. The equation uses TotalDeltaT (which is in seconds) and is set to dt - which is the (fractional) amount of seconds elapsed since the last frame.

Code: Select all
v += in.TotalDeltaT * accel;


and therefore accel is in percent/sec
Richard
 
Posts: 810
Joined: Sun Nov 02, 2014 11:17 pm
Version: Git
OS: Win10

Re: JSB N1 N2 spinnup speed

Postby erik » Thu Apr 06, 2017 5:48 pm

Ah ok, that would make sense.
I was wrong indeed, forget my previous post.

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2248
Joined: Thu Nov 01, 2007 2:41 pm

Re: JSB N1 N2 spinnup speed

Postby Octal450 » Thu Apr 06, 2017 6:52 pm

Solved, thanks Richard!!!
I thought the N1 N2spinup value was for the spinup max RPM, not for the amount per sec... silly me! :D

Josh

PS: Still working on the N2 Startup speed
Skillset: JSBsim Flight Dynamics, Systems, Canvas, Autoflight/Control, Instrumentation, Animations
Aircraft: A320-family, MD-11, MD-80, Contribs in a few others

Octal450's GitHub|Launcher Catalog
|Airbus Dev Discord|Octal450 Hangar Dev Discord
User avatar
Octal450
 
Posts: 5601
Joined: Tue Oct 06, 2015 1:51 pm
Location: Huntsville, AL
Callsign: WTF411
Version: next
OS: Windows 11


Return to Flight dynamics model

Who is online

Users browsing this forum: No registered users and 2 guests