Jump to content

Numerical Diff Eq problems.


mardlamock

Recommended Posts

To compare euler, euler-cromer, and RK, i used simple mass-on-spring system, since the point was to show that euler eventually diverges regardless of time step, while euler-cromer and RK are unconditionally stable (regardless of timestep).

I have created a few flight models (in excel and Matlab), but am having trouble deciding what the correct form of the equations should be... perhaps i should just bother ferram...

He told me he used information he found on regular aerodynamics books. What are you building your model for? I have to say, as hard as it may be, thinking about what goes into the behaviour of a rocket or any object in the atmosphere is extremly fun. And its not that hard even, it just takes (like everything) a bit of time to work things out, I mean, three1415 and I are still in high school but we seem to be doing pretty well.

Edited by mardlamock
Link to comment
Share on other sites

Yes, Forward Euler is notorious for causing energy buildup in harmonic problems. For small deflections, Implicit Euler or pretty much any 2nd order or higher RK method will conserve energy. For large deflections, where dynamics becomes non-linear, you will have energy fluctuations, but they should be random, so simulation should remain stable.

Link to comment
Share on other sites

He told me he used information he found on regular aerodynamics books. What are you building your model for? I have to say, as hard as it may be, thinking about what goes into the behaviour of a rocket or any object in the atmosphere is extremly fun. And its not that hard even, it just takes (like everything) a bit of time to work things out, I mean, three1415 and I are still in high school but we seem to be doing pretty well.

I was building my model mostly for fun, to help you, and to potentially optimize ascent trajectory with FAR installed.

It's not "difficult" its just that I couldnt find a reference to the general form of the momentum conservation equations with with non-zero AoA and non-horizontal velocity vector.

My frustration with just deriving the equations myself stems from my uncertainty regarding the definition/use of C_D and C_L I.e. is lift always vertical and drag always horizontal regardless of velocity vector?

I also wasnt sure if reference area changed with AoA, or if C_D and C_L values changed accordingly such to keep reference area constant.

After looking into C_D and C_L for a flat plate, it seems that reference area is always constant i.e. C_D and C_L are adjusted rather than adjusting reference area, and i am fairly certain that lift and drag always point perpendicular and parallel to velocity vector, respectively.

Link to comment
Share on other sites

I was building my model mostly for fun, to help you, and to potentially optimize ascent trajectory with FAR installed.

It's not "difficult" its just that I couldnt find a reference to the general form of the momentum conservation equations with with non-zero AoA and non-horizontal velocity vector.

My frustration with just deriving the equations myself stems from my uncertainty regarding the definition/use of C_D and C_L I.e. is lift always vertical and drag always horizontal regardless of velocity vector?

I also wasnt sure if reference area changed with AoA, or if C_D and C_L values changed accordingly such to keep reference area constant.

After looking into C_D and C_L for a flat plate, it seems that reference area is always constant i.e. C_D and C_L are adjusted rather than adjusting reference area, and i am fairly certain that lift and drag always point perpendicular and parallel to velocity vector, respectively.

The drag coefficient is always constant, but the reference area should change as a function of the angle of attack. I was going to include that in the model, but the problem is that if the center of the area (or the center of drag if you want to call it that way) is misalligned from the center of mass, then you wouldnt be getting translational acceleration, but rather angular acceleration. And that just seemed wrong to me. On the other hand, the Coefficient of lift varies as a function of the angle of attack, according to thin airfoil theory, you can approximate it linearly by saying it is equal to 0,0111*AoA. Thats what i did.

Link to comment
Share on other sites

The drag coefficient is always constant, but the reference area should change as a function of the angle of attack. On the other hand, the Coefficient of lift varies as a function of the angle of attack, according to thin airfoil theory, you can approximate it linearly by saying it is equal to 0,0111*AoA. Thats what i did.

Do you have a reference for this? Why should C_D be constant but not C_L w.r.t. AoA? According to this reference, C_D and C_L are a function of AoA for a flat plate (though i dont see any good reason why this wouldnt be the case for other shapes as well).

I was going to include that in the model, but the problem is that if the center of the area (or the center of drag if you want to call it that way) is misalligned from the center of mass, then you wouldnt be getting translational acceleration, but rather angular acceleration. And that just seemed wrong to me.

There would be translation and rotation (btw, this would happen for lift as well...). Once again, if that is what the physics predicts will happen, then imposing "corrections" will cause the model to depart from reality, which is usually bad (unless that is what you are going after).

Link to comment
Share on other sites

Because doing an actual analysis on the Cd is a lot harder and would probably require CFD to do properly, whereas thin airfoil theory is decent enough for Cl. The Cd also changes with respect to the Mach number, but that should also be done with CFD. How would there be translational acceleration when the center of drag is offset from the CoM?

Link to comment
Share on other sites

Because doing an actual analysis on the Cd is a lot harder and would probably require CFD to do properly, whereas thin airfoil theory is decent enough for Cl. The Cd also changes with respect to the Mach number, but that should also be done with CFD.

Both C_D and C_L are complicated and require CFD to get accurate results for all AoA and Mach numbers, but this is irrelevant to our definition of them. We can choose to define them however we want, based on whatever way is most convenient. It would make sense, that their definitions should be analogous to each other i.e. area is constant, but you are suggesting area is parallel (i.e. frontal) for drag and varies with AoA, while it is constant and perpendicular (i.e. wing) area for lift.

Meanwhile, the reference ive shown implies for a horizontal flat plate, lift and drag coefficient always use wing area and wing area is held constant with AoA... so something is inconsistent...

How would there be translational acceleration when the center of drag is offset from the CoM?

F=m*a... It will still have translational acceleration even drag/lift force(s) act off center of mass.

I think you are confused because you imagine it spinning around wildly (in which case, it will have no net translational acceleration). However, this isnt necessarily the case: how wildly/fast it rotates depends on how offset force is from center of mass as well as how large/small moment of inertia is. If moment of inertia is large, rocket will translate more than it rotates.

Just because there is no counter torque to arrest rotation, doesnt mean the craft cannot have translational acceleration. You can push tall objects significantly off-CoM, and still accelerate them horizontally (though they will always rotate as well).

Besides, in reality, spacecraft have control surfaces, reaction wheels, RCS, and thrust vectoring to provide counter-torques to arrest rotation. If these counter torques are applied with forces far offset from CoM, then they will negligibly cancel out horizontal acceleration.

Edited by arkie87
Link to comment
Share on other sites

Both C_D and C_L are complicated and require CFD to get accurate results for all AoA and Mach numbers, but this is irrelevant to our definition of them. We can choose to define them however we want, based on whatever way is most convenient. It would make sense, that their definitions should be analogous to each other i.e. area is constant, but you are suggesting area is parallel (i.e. frontal) for drag and varies with AoA, while it is constant and perpendicular (i.e. wing) area for lift.

Meanwhile, the reference ive shown implies for a horizontal flat plate, lift and drag coefficient always use wing area and wing area is held constant with AoA... so something is inconsistent...

F=m*a... It will still have translational acceleration even drag/lift force(s) act off center of mass.

I think you are confused because you imagine it spinning around wildly (in which case, it will have no net translational acceleration). However, this isnt necessarily the case: how wildly/fast it rotates depends on how offset force is from center of mass as well as how large/small moment of inertia is. If moment of inertia is large, rocket will translate more than it rotates.

Just because there is no counter torque to arrest rotation, doesnt mean the craft cannot have translational acceleration. You can push tall objects significantly off-CoM, and still accelerate them horizontally (though they will always rotate as well).

Besides, in reality, spacecraft have control surfaces, reaction wheels, RCS, and thrust vectoring to provide counter-torques to arrest rotation. If these counter torques are applied with forces far offset from CoM, then they will negligibly cancel out horizontal acceleration.

I think you might if what you mean is that I shouldnt use a projected area for lift, that I should keep it constant. As for the drag, it will be area calculated as a function of the angle of attack, im pretty sure of that. Here on wikipedia basically says that the area used in the lift equation is held constant, so yeah I might have ....ed up there. http://en.wikipedia.org/wiki/Drag_(physics)#Drag_at_high_velocity.

As for the translational motion, I really hadnt pictured it like that, but the way you put it makes me rethink it. I just intuitively though that it would not produce any translation. I will probably have to change the equations to account for the added area from the airframe as a function of the AoA, whilst removing just that from the lift equation. I ve been comparing the model as it is right now to OpenRocket and it seems to be holding up pretty well, around 3% error in height and 5% in velocity, which is not that bad comparing all the mistakes I have to fix and the fact that that is still using euler's method. Anyways, thanks for the comment dude, you cleared up a few misconceptions.

Link to comment
Share on other sites

I think you might if what you mean is that I shouldnt use a projected area for lift, that I should keep it constant. As for the drag, it will be area calculated as a function of the angle of attack, im pretty sure of that. Here on wikipedia basically says that the area used in the lift equation is held constant, so yeah I might have ....ed up there. http://en.wikipedia.org/wiki/Drag_(physics)#Drag_at_high_velocity.

As for the translational motion, I really hadnt pictured it like that, but the way you put it makes me rethink it. I just intuitively though that it would not produce any translation. I will probably have to change the equations to account for the added area from the airframe as a function of the AoA, whilst removing just that from the lift equation. I ve been comparing the model as it is right now to OpenRocket and it seems to be holding up pretty well, around 3% error in height and 5% in velocity, which is not that bad comparing all the mistakes I have to fix and the fact that that is still using euler's method. Anyways, thanks for the comment dude, you cleared up a few misconceptions.

Yeah, this whole exercise has made me seriously think about lift and drag, but i think using the exact solution for a flat plate has helped me to understand the corrected definitions.

Since a flat plate has no projection (at zero angle of attack), there is only drag and lift for non-zero angle of attack (AoA). As far as i can tell, the analytical (?) solutions for C_D and C_l are known to be:

C_D = 1- cos(2*AoA)

C_L = sin(2*AoA)

which looks like this.

I can derive these equations if i make the following assumptions:

(1) The magnitude of the force on the flat plate is proportional to 2 times the dynamic pressure and the projected area i.e. A*sin(AoA) and not reference area (A)

(2) The direction of the force is always parallel to area normal vector

#2 is pretty self intuitive since the force, resulting from stagnation pressure, is applied perpendicular to the surface which it acts upon i.e. parallel to the surface normal vector.

#1, on the other hand, is a bit trickier. At first glance, you might assume that the magnitude of the force must be proportional to the reference area, and not the projected area, since the pressure acts upon the whole reference area and not just the projected area. However, for the case of zero AoA, there is zero force, and this wouldnt be the case if we used reference area (since force would be constant with AoA). Thus, using projected area seems better suited.

Furthermore, the reason for taking two times the dynamic pressure is since it is assumed that on the side of the plate facing the flow, the pressure is equal to positive the dynamic pressure, whereas on the side of the plate away from the flow, the pressure is negative the dynamic pressure. Thus, the pressure difference is 2 times the dynamic pressure.

Thus, from #1:

F = 1/2 rho V^2 * 2 A sin(AoA)

And #2:

Drag = F*sin(AoA)

Lift = F*cos(AoA)

We find that:

Drag = 1/2 rho V^2 * 2 A (sin(AoA))^2 = 1/2 rho V^2 A C_D

And:

Lift = 1/2 rho V^2 * 2 A cos(AoA)*sin(AoA) = 1/2 rho V^2 A C_L

Comparing this result to the definitions of drag and lift coefficients:

Drag = 1/2 rho V^2 A C_D

Lift = 1/2 rho V^2 A C_L

We find:

C_D = 2 (sin(AoA))^2 ==> 1 - cos(2*AoA) via trig. identity

And:

C_L = 2 cos(AoA)*sin(AoA) ==> sin(2*AoA) via trig. identity

Thus, it is apparent that reference area is held constant in lift and drag formulas and it is the C_D and C_L that change with AoA (rather than area).

However, this definition makes sense for wings only, since area facing flow at zero AoA is very small compared to area perpendicular to the flow. Furthermore, the reference you supplied mentioned that it is convenient to use the same reference area for wings since then the ratio of lift-to-drag force (which is often of interest to aerospace engineers) is proportional to the ratio of the lift-to-drag coefficients.

For non-wings, the definitions of C_D and C_L might use difference reference areas.

However, i would be surprised if any body required calculation of projected area-- even for drag; instead, i would think C_D would be adjusted accordingly for convenience (i.e. whats the point of defining C_D such that when AoA changes, you must calculate a new C_D and a new area when you can define C_D such that it takes new area into consideration so that when AoA changes, you only need a new C_D?)

Edited by arkie87
Link to comment
Share on other sites

Yeah, this whole exercise has made me seriously think about lift and drag, but i think using the exact solution for a flat plate has helped me to understand the corrected definitions.

Since a flat plate has no projection (at zero angle of attack), there is only drag and lift for non-zero angle of attack (AoA). As far as i can tell, the analytical (?) solutions for C_D and C_l are known to be:

C_D = 1- cos(2*AoA)

C_L = sin(2*AoA)

which looks like this.

I can derive these equations if i make the following assumptions:

(1) The magnitude of the force on the flat plate is proportional to 2 times the dynamic pressure and the projected area i.e. A*sin(AoA) and not reference area (A)

(2) The direction of the force is always parallel to area normal vector

#2 is pretty self intuitive since the force, resulting from stagnation pressure, is applied perpendicular to the surface which it acts upon i.e. parallel to the surface normal vector.

#1, on the other hand, is a bit trickier. At first glance, you might assume that the magnitude of the force must be proportional to the reference area, and not the projected area, since the pressure acts upon the whole reference area and not just the projected area. However, for the case of zero AoA, there is zero force, and this wouldnt be the case if we used reference area (since force would be constant with AoA). Thus, using projected area seems better suited.

Furthermore, the reason for taking two times the dynamic pressure is since it is assumed that on the side of the plate facing the flow, the pressure is equal to positive the dynamic pressure, whereas on the side of the plate away from the flow, the pressure is negative the dynamic pressure. Thus, the pressure difference is 2 times the dynamic pressure.

Thus, from #1:

F = 1/2 rho V^2 * 2 A sin(AoA)

And #2:

Drag = F*sin(AoA)

Lift = F*cos(AoA)

We find that:

Drag = 1/2 rho V^2 * 2 A (sin(AoA))^2 = 1/2 rho V^2 A C_D

And:

Lift = 1/2 rho V^2 * 2 A cos(AoA)*sin(AoA) = 1/2 rho V^2 A C_L

Comparing this result to the definitions of drag and lift coefficients:

Drag = 1/2 rho V^2 A C_D

Lift = 1/2 rho V^2 A C_L

We find:

C_D = 2 (sin(AoA))^2 ==> 1 - cos(2*AoA) via trig. identity

And:

C_L = 2 cos(AoA)*sin(AoA) ==> sin(2*AoA) via trig. identity

Thus, it is apparent that reference area is held constant in lift and drag formulas and it is the C_D and C_L that change with AoA (rather than area).

However, this definition makes sense for wings only, since area facing flow at zero AoA is very small compared to area perpendicular to the flow. Furthermore, the reference you supplied mentioned that it is convenient to use the same reference area for wings since then the ratio of lift-to-drag force (which is often of interest to aerospace engineers) is proportional to the ratio of the lift-to-drag coefficients.

For non-wings, the definitions of C_D and C_L might use difference reference areas.

However, i would be surprised if any body required calculation of projected area-- even for drag; instead, i would think C_D would be adjusted accordingly for convenience (i.e. whats the point of defining C_D such that when AoA changes, you must calculate a new C_D and a new area when you can define C_D such that it takes new area into consideration so that when AoA changes, you only need a new C_D?)

So basically what you are proposing is getting rid of the changing area term on the drag equations and replace it with a simple Cd or Cl that changes as a function of AoA? I understood the first derivation and how it may be useful for a plane (math sense) estimation of the Cd or Cl, but I dont see how it may apply to a more complex shape such as a large tube with a cone on top (aka. rocket). Check this out and tell me what you think, I think it goes along the lines of what you are saying http://www.aerospaceweb.org/question/aerodynamics/q0184.shtml.

Link to comment
Share on other sites

So basically what you are proposing is getting rid of the changing area term on the drag equations and replace it with a simple Cd or Cl that changes as a function of AoA? I understood the first derivation and how it may be useful for a plane (math sense) estimation of the Cd or Cl, but I dont see how it may apply to a more complex shape such as a large tube with a cone on top (aka. rocket). Check this out and tell me what you think, I think it goes along the lines of what you are saying http://www.aerospaceweb.org/question/aerodynamics/q0184.shtml.

There probably arent analytical methods for more complex shapes (at least not without simplifying assumptions). The purpose of that exercise was to figure out, in general, how we define drag and lift coefficient, which area we use, and whether area or coefficient changes with AoA.

Edited by arkie87
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...