Trimming with thrust #558
Replies: 4 comments 2 replies
-
You'll need to be more specific. In general e.g. the full trim option and others, as I showed in the following comment will vary the thrust in order to reach a trim condition. Are you trying to ask whether you can specify for example that no elevator is used for trimming and that the engine thrust needs to be used to generate the required pitching moment assuming the engine(s) are either above or below the cg? |
Beta Was this translation helpful? Give feedback.
-
Ok, I don't think you can do that with the current JSBSim trim options. What you can do is specify a gamma value as part of the initial conditions that the trim routine will trim for. So what you could then do is write a loop which varies the gamma value, executes a trim and compares the thrust value set by the trim routine until you get the thrust value you're interested in. |
Beta Was this translation helpful? Give feedback.
-
@seanmcleod, do you know what I should modify to implement the logic of determine throttle/thrust and vary flight path in JSBSim's trim? |
Beta Was this translation helpful? Give feedback.
-
Here is a very initial outline of what you could use. So for example let's say you're trying to determine the flight path angle for some specific amount of climb thrust, e.g. 20,000lbf of thrust at an altitude of 1,000ft and at an airspeed of 200KIAS. import jsbsim
fdm = jsbsim.FGFDMExec('..\\') # The path supplied to FGFDMExec is the location of the folders "aircraft", "engines", "systems"
fdm.load_model('737') # Load the 737 aircraft
# Set engines running
fdm['propulsion/engine[0]/set-running'] = 1
fdm['propulsion/engine[1]/set-running'] = 1
fdm['ic/h-sl-ft'] = 1000
fdm['ic/vc-kts'] = 200
outputs = []
for gamma in range(0, 11):
fdm['ic/gamma-deg'] = gamma
fdm.run_ic() # Initialize the aircraft with initial conditions
# Trim
try:
fdm['simulation/do_simple_trim'] = 1
thrust = fdm['propulsion/engine[0]/thrust-lbs'] + fdm['propulsion/engine[1]/thrust-lbs']
outputs.append((gamma, thrust))
except RuntimeError as e:
# The trim cannot succeed. Just make sure that the raised exception
# is due to the trim failure otherwise rethrow.
if e.args[0] != 'Trim Failed':
raise
for gamma, thrust in outputs:
print(f"Gamma - {gamma} Thrust - {thrust}") Output: Gamma - 0 Thrust - 11388.46930424586
Gamma - 1 Thrust - 13237.487054522639
Gamma - 2 Thrust - 15082.898142957658
Gamma - 3 Thrust - 16924.139865791898
Gamma - 4 Thrust - 18760.669327620806
Gamma - 5 Thrust - 20591.942493003775
Gamma - 6 Thrust - 22417.418530443698
Gamma - 7 Thrust - 24236.560320804077
Gamma - 8 Thrust - 26048.83448987249
Gamma - 9 Thrust - 27853.71169664789
Gamma - 10 Thrust - 29650.666512283737 So you can adapt the code above to work out the gamma for your specified thrust to some specific degree of resolution/accuracy. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I'd like to trim my aircraft using the thrust. Is it possible?
Thank you,
Beta Was this translation helpful? Give feedback.
All reactions