Scramjet engine design #395
Replies: 22 comments 19 replies
-
I suggest you take a look at the source code for the existing engine models in |
Beta Was this translation helpful? Give feedback.
-
Thank you for your reply. Thanks in advance |
Beta Was this translation helpful? Give feedback.
-
I was suggesting more that you look at the engine models to get an idea of the classes involved and the methods you need to implement. I wouldn't try and start will all of the What is the model (set of equations) you have for a scramjet, what are the inputs required including configuration options to then run through your equations to calculate the amount of thrust given the inputs? |
Beta Was this translation helpful? Give feedback.
-
Please don't do that. I would recommend against using
You can't. There are no compressor/turbine/nozzle in As @seanmcleod said, your best course of action is to build a new model from the ground up using the set of equations you have. Basically, you need to:
|
Beta Was this translation helpful? Give feedback.
-
Thank you so much @bcoconni, @seanmcleod. I will consider your suggestion to design a scramjet engine. However, at first, I want to clarify something for myself. As you know, the
So, how the trust force of PW125B has been defined in JSBSim? I wanted to apply the trust equation of scramjet, but I do not know where can I define the equation and parameters (for instance, mass flow rate, pressure, velocity, and area for stream and exit conditions). I thought that if I find the source files of turbojet and try to change the trust equation of turbojet to the equation of scramjet, I will have an initial result for scramjet engine design. Thanks in advance |
Beta Was this translation helpful? Give feedback.
-
As @bcoconni mentioned use Looking at the NASA example you linked to: At a minimum you would need to read in configuration parameters for the area of the exit nozzle Ae and area of the inlet nozzle etc. Here is an example showing how jsbsim/src/models/propulsion/FGTurbine.cpp Lines 435 to 436 in 33d429e Then in your The throttle command and atmospheric inputs are available via: jsbsim/src/models/propulsion/FGEngine.h Lines 117 to 142 in 33d429e Then in thrust = NASA equation;
Thruster->Calculate(thrust); |
Beta Was this translation helpful? Give feedback.
-
Thank you so much for your detailed response.
As you mentioned, I applied the codes that were related to the bypass ratio configuration to the FGSceamjet. However, when I want to use the atmospheric properties in the thrust equation, I have the error: the properties are undefined. Is there any suggestion on how to read these properties? Should be added specific library to the FGScramjet? Thanks in advance |
Beta Was this translation helpful? Give feedback.
-
Could you please show us the lines of code that cause the compilation errors ? |
Beta Was this translation helpful? Give feedback.
-
Thank you for your reply. I only applied some changes in the FGElectric file that you mentioned to implement FGScramjet. if (Thruster->GetType() == FGThruster::ttPropeller) { RPM = Thruster->GetRPM() * Thruster->GetGearRatio(); LoadThrusterInputs(); RunPostFunctions(); |
Beta Was this translation helpful? Give feedback.
-
FGElectric::FGElectric(FGFDMExec* exec, Element *el, int engine_number, struct FGEngine::Inputs& input)
: FGEngine(engine_number, input)
{ Which is then passed to the constructor of struct Inputs& in; You'll see this member variable Why have you copied the propeller related code into your scramjet model? |
Beta Was this translation helpful? Give feedback.
-
@Jacki43 I had mentioned in my first response -
The idea being to understand how engine models are structured, what base classes to inherit from, where and how they get their configuration data, where and how they get their required input parameters from etc. |
Beta Was this translation helpful? Give feedback.
-
Thank you so much for your response. I got the point.
I just wanted to try to apply the thrust equation, so I did not check all of the things. As you mentioned, I should go through the sample engine codes and make sure I am designing the scramjet engine in the right way. It will be great if this issue stays open so that I can ask my questions and get your opinions that are very useful for me. |
Beta Was this translation helpful? Give feedback.
-
Thank you so much for your help. I am trying to implement the scramjet NASA thrust equation as I mentioned. However, all of the variables that I need, do not exist in Thanks in advance |
Beta Was this translation helpful? Give feedback.
-
Yes at some point in most cases you won't have every single variable available but will need to calculate and derive the variables you need from the existing variables. So for example how would you derive the incoming mass flow rate? |
Beta Was this translation helpful? Give feedback.
-
Thank you for your reply.
Consequently, we have |
Beta Was this translation helpful? Give feedback.
-
Did you search through the code to see where and how they're set? Lines 501 to 525 in 193d28c So they're the free stream values, the 0 subscript values in the NASA equation. Also, think about it, how would the generic base class |
Beta Was this translation helpful? Give feedback.
-
Thank you for your quick response.
I did not find |
Beta Was this translation helpful? Give feedback.
-
This issue (#392) has been moved to Support requests and questions are now resolved in This change is only motivated by project organization and will not affect the support provided. We'll gladly continue to answer your questions 😄. |
Beta Was this translation helpful? Give feedback.
-
I was also going to mention that a number of the parameter calculations didn't seem to make sense, but my main question is what sort of debugging have you tried? In particular if you set a breakpoint on line 120 where the thrust is calculated what value do you see calculated? If it is 0 then that answers your question below. If it is 0 then go back and check the parameters you use to calculate thrust, do they make sense, are there calculation bugs?
If your thrust calculation isn't 0 then step into What thruster do you have connected in your model? I'm a bit suspicious that you've added your code to |
Beta Was this translation helpful? Give feedback.
-
Thank you so much for your detailed answer @bcoconni. My assumption was wrong and you are right. I applied some new equations with the help of this website and this one, so the value of thrust has not been zero. However, when I apply this scramjet model to X15 (instead of the XLR99 that it is already used), the value of thrust in the "climb" event is: I changed the engine and thruster type as follows: <propulsion>
<engine file="scramjet">
<location unit="IN">
<x> 600 </x>
<y> 0 </y>
<z> 0 </z>
</location>
<orient unit="DEG">
<roll> 0.0 </roll>
<pitch> 0 </pitch>
<yaw> 0 </yaw>
</orient>
<feed>0</feed>
<feed>1</feed>
<thruster file="direct">
<location unit="IN">
<x> 600 </x>
<y> 0 </y>
<z> 0 </z>
</location>
<orient unit="DEG">
<roll> 0.0 </roll>
<pitch> 0.0 </pitch>
<yaw> 0.0 </yaw>
</orient>
</thruster>
</engine>
<tank type="FUEL"> <!-- Tank number 0 for Main engine -->
<location unit="IN">
<x> 282.3 </x>
<y> 0 </y>
<z> 0 </z>
</location>
<capacity unit="LBS"> 9470 </capacity>
<contents unit="LBS"> 0 </contents>
</tank>
<tank type="FUEL"> <!-- Tank number 1 for Main engine -->
<location unit="IN">
<x> 408.3 </x>
<y> 0 </y>
<z> 0 </z>
</location>
<capacity unit="LBS"> 8236 </capacity>
<contents unit="LBS"> 6 </contents>
</tank>
<tank type="FUEL"> <!-- Tank number 2 for RCS -->
<location unit="IN">
<x> 140 </x>
<y> 0 </y>
<z> 0 </z>
</location>
<capacity unit="LBS"> 12 </capacity>
<contents unit="LBS"> 0 </contents>
</tank>
</propulsion> The content of scramjet.xml engine file is: <electric_engine name="scramjet">
<augmented> 0 </augmented>
<injected> 0 </injected>
</electric_engine> Finally, the equations that I applied for thrust are: |
Beta Was this translation helpful? Give feedback.
-
So when you set a breakpoint on |
Beta Was this translation helpful? Give feedback.
-
When the breakpoint is hit, the line hasn't been executed yet. The debugger is stopping the program before it executes the line, so the value you're seeing for the local variable Execute the line, in Visual Studio hit F-10 which will execute the line and then stop on the next line. But as you can see, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello all,
I want to model a scramjet engine with c++ software, and I am a beginner with JSBSIm. I wanted to ask you is it possible in JSBSim to model a scramjet engine?
Can you please give me a brief guide on how can I do that?
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions