Thrust and moments #547
Replies: 9 comments 10 replies
-
What are you basing your statement on? Have you tried a model where the engines are above or below the cg and checked to see what happens when thrust is increased or decreased? Or what about a twin engine aircraft, what happens if the thrust is changed on the 1 engine? Do you not see a yawing moment? For example take a look at the JSBSim 737 model and the pitch rate when the throttles are retarded, see graph - 'Control Inputs - Flare' https://seanmcleod.github.io/2018/02/landing-ground-effect-flare-jsbsim/ |
Beta Was this translation helpful? Give feedback.
-
We need more details. Why are you expecting the elevator deflection to change? Do you have some automatic control system controlling the elevator which you expect to make changes with changes in thrust moment? |
Beta Was this translation helpful? Give feedback.
-
Okay, so you're trimming. So show us the trim inputs and the trim results for the 2 different z positions for the engine. Are you sure the trim solution isn't coming up with a different thrust setting which counters the change in thrust arm? |
Beta Was this translation helpful? Give feedback.
-
In terms of moments due to propulsion JSBSim exposes the following properties which you can view to see how they change as the thrust is changed etc. PropertyManager->Tie("moments/l-prop-lbsft", this, eX, &FGPropulsion::GetMoments);
PropertyManager->Tie("moments/m-prop-lbsft", this, eY, &FGPropulsion::GetMoments);
PropertyManager->Tie("moments/n-prop-lbsft", this, eZ, &FGPropulsion::GetMoments); |
Beta Was this translation helpful? Give feedback.
-
Please don't be shy to show us some of the output like the trim results, how you changed the z location of the thruster etc. We may spot something, otherwise it's a lot of guessing back and forwards. So take a look at my test and results, I've included the code so you can try it out yourself and confirm you see the same results. So first off here is the code I use to test. 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
fdm.run_ic() # Initialize the aircraft with initial conditions
# Trim
try:
fdm['simulation/do_simple_trim'] = 1
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
print(f"moments/m-prop-lbsft - {fdm['moments/m-prop-lbsft']}") I then ran that code with the default <thruster file="direct">
<location unit="IN">
<x> 540 </x>
<y> -193 </y>
<z> -40 </z>
</location> Then I ran the code again after changing the z coordinate to -60 for both. Results for Trim successful
Trim Results:
Angle of Attack: 6.46 wdot: 8.95e-05 Tolerance: 1.000000e-03 Passed
Throttle: 0.56 udot: -8.97e-05 Tolerance: 1.000000e-03 Passed
Pitch Trim: -0.41 qdot: -1.24e-10 Tolerance: 1.000000e-04 Passed
Roll Angle: 0.00 vdot: -3.04e-16 Tolerance: 1.000000e-03 Passed
Ailerons: 0.00 pdot: 2.50e-18 Tolerance: 1.000000e-04 Passed
Rudder: 0.00 rdot: -1.91e-33 Tolerance: 1.000000e-04 Passed
moments/m-prop-lbsft - 4683.108872773994 Results for Trim successful
Trim Results:
Angle of Attack: 6.43 wdot: 3.60e-05 Tolerance: 1.000000e-03 Passed
Throttle: 0.55 udot: -5.36e-05 Tolerance: 1.000000e-03 Passed
Pitch Trim: -0.38 qdot: -5.00e-11 Tolerance: 1.000000e-04 Passed
Roll Angle: 0.00 vdot: -2.28e-15 Tolerance: 1.000000e-03 Passed
Ailerons: 0.00 pdot: 1.20e-16 Tolerance: 1.000000e-04 Passed
Rudder: 0.00 rdot: -8.94e-32 Tolerance: 1.000000e-04 Passed
moments/m-prop-lbsft - 23474.563308847126 So show us what you're doing and maybe we'll spot the issue. |
Beta Was this translation helpful? Give feedback.
-
The location and orient element for the thruster specify exactly where and at what angle the force generated by the engine will be applied. A thruster definition is a requirement. // Locate the thruster definition
Element* thruster_element = engine_element->FindElement("thruster");
if (!thruster_element || !ModelLoader.Open(thruster_element))
throw("No thruster definition supplied with engine definition."); Whereas the location element for the engine appears optional. // Find and set engine location
local_element = parent_element->FindElement("location");
if (local_element) location = local_element->FindElementTripletConvertTo("IN");
// else cerr << "No engine location found for this engine." << endl;
// Jon: The engine location is not important - the nozzle location is. My guess is this is a historical artifact probably required and used before the concept of a thruster was introduced, but once the thruster was introduced it's no longer required or used, and probably just causes confusion. @jonsberndt, @bcoconni, @agodemar can any of you confirm? As a quick test I commented out the following members in FGEngine.h. //double X, Y, Z;
//double EnginePitch;
//double EngineYaw; And commented out their only use in FGEngine.cpp, initialization to 0 in the constructor and being set in the So unless there is a good reason to keep the location and orientation for the engine itself I'll submit a pull request to remove the unused code, and a separate pull request to remove it from the aircraft model files. |
Beta Was this translation helpful? Give feedback.
-
I seem to recall there was a reason for this code. Can you hold off for a few days? I'll see if I can find an example, or concur with it's removal.
|
Beta Was this translation helpful? Give feedback.
-
Correct, I thought there may be a derived class that exposed them via a getter etc. so I did a test compile to confirm there weren't as opposed to inspecting all the derived classes. |
Beta Was this translation helpful? Give feedback.
-
@jonsberndt have you been able to find an example where the position and orientation of the engine as opposed to the thruster might be useful? |
Beta Was this translation helpful? Give feedback.
-
Hello everyone,
it looks like JSBSim does not consider pitch, roll and yaw moments due to thrust automatically.
I will have to add it manually. Right?
Beta Was this translation helpful? Give feedback.
All reactions