Rocket engine gimballing - torque and angular acceleration question

In summary, a final year computer science student is working on a rocket simulation application for their thesis. They are struggling with converting the gimbal of a rocket engine into angular acceleration. The code provided is not accurate and the student is looking for help with the equations and units used. They are also pressed for time and may revisit the problem later.
  • #1
ryanie
9
0
Hello

Firstly i just registered, I am a final year computer science student and I am busy working on my thesis (the deadline is fast approaching) I am working this application of a rocket going into orbit and physics is not my forte. I need some help on converting the gimbal of a rocket engine into angular acceleration. The application I am writing only works on a 2d plane. It doesn't need to be exact but I am really struggling with this problem.

I have a basic rocket.
A rocket has a payload with set dimensions but specified mass.
Then any number of stages below that. A stage has
-mass
-1 to 15 rocket engines each producing a variable amount of thrust in kN
-length
-diameter

The payload is cone shaped and all the stages below that are cylindrical and all can be thought of as uniformly solid (except each stage can have different dimensions)

A rocket engine can be gimballed either left or right by a certain number of degrees.

This is the piece of code I have at the moment but it wrong because the rocket spins about to about half the speed of light immediatley when the simulation starts.

Code:
    private void updateRocketRotation(double deltaT) {

        double totalLength = 750;

        for (Stage stage : stages) {
            totalLength += stage.getLength();
        }
        
        System.out.println("adjacent thrust = " + stages.get(stages.size() - 1).getAdjacentThrust() + " kN");
        double torque = (stages.get(stages.size() - 1).getAdjacentThrust() * 1000) * (totalLength - centerOfMass / 100);
        
        System.out.println("torque = " + torque + " kN");

        //payload distance from center of mass, payload has constant dimensions
        double distCenterOfMass = centerOfMass - 375;
        double momentOfIntertia = payload.mass * (distCenterOfMass / 100);

        double distanceFromTop = 375;
        for (Stage stage : stages) {
            distanceFromTop += stage.getLength();
            distCenterOfMass = centerOfMass - distanceFromTop;
            if (distCenterOfMass < 0) {
                distCenterOfMass = distanceFromTop - centerOfMass;
            }
            momentOfIntertia += payload.mass * (distCenterOfMass / 100);
        }

        System.out.println("final moment of intertia = " + momentOfIntertia + " kg/m^2");

        double angularAcceleration = torque / momentOfIntertia;
        rotation += angularAcceleration * deltaT;
        
        System.out.println("set rocket rotation = " + rotation + " °");
    }

Basically what this code does is calculates the torque the engine are producing by multiplying the thrust the engine are producing perpedicular to the rocket (i just did some trigonometry to figure that out) by the center of mass (i could also be calculating that wrong) this is spiting out and extremely large amount of torque and i just don't know if its correct.

then its works out moments of interia which i use the method from this paper - http://www.philsrockets.org.uk/forces.pdf

I take the payload and each stage and multiply its mass from the distance from the center of mass then divide the torque by the final moment of inertia.

Theres a lot more code i can supply if you need to see where I am going wrong

Forgive me if I seem lazy but I afford to spend anymore time research physics, i feel i have bitten off more than i can chew with my dissertation and I am getting desperate to figure this out
 
Last edited:
Science news on Phys.org
  • #2
Hi ryanie,

It's hard to identify the problem just from that piece of code(not to mention programming is not my forte ;) ).

Can you give us
1. the equations you used to calculate the torque
2. the units and range of values for mass, thrust and the dimensions of the rocket/stages that you use
3. the range of values for the torque that the program is outputting(that you say are too high)?
 
  • #3
Hi Bandersnatch

Thanks for the reply. Unfortunatley i don't have time at the moment to give an in depth reply. The solution I am using seems be working but its almost undoubtly incorrect.

I will be in touch later tonight
 
  • #4
A few things I noticed at first glance:

Moment of inertia has units of mass times length squared. So this line:

momentOfIntertia += payload.mass * (distCenterOfMass / 100);

is wrong, you probably want to be squaring the distance to the centre of mass. Also in your debug text you might want to change the units displayed to kg.m^2.

Why are you adding the payload mass to the moment of inertia for every stage, you only have one payload right? I think you want to be adding the mass of the stage rather than the mass of the payload in that line.

And this line:

rotation += angularAcceleration * deltaT;

You are doing a simple numerical integration of the angular acceleration, which will give you angular velocity. You need to integrate again to get the angular rotation, something like this:

angularVelocity += angularAcceleration * deltaT;
angularRotation += angularVelocity * deltaT;
 
  • #5
sjb27 and Bandersnatch.

I do really appreciate you guys taking the effort to help, alas I have run out of time and cannot afford to work on the problem any longer.

My thesis is not graded on the 'correctness' of the application rather the things you learned along the way kinda thing.

I want to focus my attention else where on the application, the current implementation will suffice. Maybe in a couple of week ill come back and correct it and share my lovely little simulation with you...and then you can scoff...

:) Thanks again
 

Related to Rocket engine gimballing - torque and angular acceleration question

1. What is rocket engine gimballing and why is it important?

Rocket engine gimballing is the process of tilting a rocket engine during flight to control the direction of thrust. This is important because it allows the rocket to steer and maintain its intended trajectory.

2. How does the gimballing of a rocket engine generate torque?

The gimballing of a rocket engine generates torque by changing the direction of thrust, which creates a rotational force on the rocket. This torque allows the rocket to change its orientation in space.

3. What factors affect the amount of torque generated by the gimballing of a rocket engine?

The amount of torque generated by the gimballing of a rocket engine is affected by the angle of the gimbal, the mass of the rocket, and the rate of change of the gimbal angle. Additionally, any external forces acting on the rocket, such as air resistance, can also affect the torque.

4. How does angular acceleration relate to the gimballing of a rocket engine?

Angular acceleration is the rate of change of angular velocity, and it describes how quickly the direction of the rocket's thrust is changing. The gimballing of a rocket engine can cause angular acceleration, as it changes the direction of the thrust and results in a change in the rocket's rotational speed.

5. How is the gimballing of a rocket engine controlled and adjusted during flight?

The gimballing of a rocket engine is controlled and adjusted during flight by a system of sensors, actuators, and control algorithms. These systems monitor the rocket's orientation and make adjustments to the gimbal angle to maintain the desired trajectory. Additionally, the rocket's computer system can also make real-time adjustments to the gimbal angle based on flight data.

Similar threads

  • Classical Physics
Replies
17
Views
2K
  • Introductory Physics Homework Help
2
Replies
42
Views
3K
  • Introductory Physics Homework Help
Replies
7
Views
379
  • Introductory Physics Homework Help
Replies
3
Views
1K
  • Classical Physics
Replies
8
Views
2K
  • Introductory Physics Homework Help
Replies
10
Views
2K
  • Classical Physics
Replies
6
Views
2K
  • Introductory Physics Homework Help
Replies
5
Views
192
Replies
4
Views
736
Replies
7
Views
2K
Back
Top