I am an fourth undergraduate aerospace engineering student. I need to find the rocket center of pressure by using CFD programs for my thesis. Now I have some experiences fluent and OpenFoam. How can I make this analysis?

If your CFD software has the tools, the easiest way to do this is to integrate the drag over the entire rocket and determine the total drag and center of drag at a given speed. You will also need to do this at one or more angles of attack (say 1-3 degrees) to capture how the CP shifts when the airflow is not directly along the axis of the rocket. If you don't have the tools to calculate the center of drag, you will likely have to make some assumptions. For example, you could model half of the rocket on an impermeable boundary on centerline. If you then then assume that the drag is centered on the center of area of the remaining half, you can use statics of resultant forces and moments at your origin to determine the center of drag. That is not very fun and less accurate than if your CFD program can give you the center of drag.

If you have a Fluent license, you call a consultant at Fluent to find if there is button to calculate this. If not, perhaps a Fluent consultant could write a user defined function to calculate CP. Otherwise, you will need to find the CP on your own using theory.

You can use either code, you need to compute the forces and moments for a couple AoA. Resolve the forces into the body coordinate system then divide the moment by the normal force. The resulting distance will be the distance alone the body center line from the point you calculated the moment about. I typically choose the tip of the nose cone.

This is the method I use for quick and dirty personal models (in solidworks flow toolbox) I'm still fiddling to try and get better results ala Boatgeek's first method (which is more physically representative)

When you get this working, let us know some details of your CFD model - speed, mesh, boundary layer resolution, turbulence models...

Uh, what is "center of drag?" Never heard of such a thing, nor has Google. The method that djkingsley mentioned makes sense to me.

Actually the main purpose my thesis is how the fins(2 fins,3fins,4fins or fins location) effect center of pressure. So i try to make an algorithm, according your answers i will indicate the solution methods. But now there are two section of this thesis. First one is subsonic airspeeds and second one is supersonic.

Assuming you ignore hypersonic, you still may need a third section for transonic roughly m0.8 to m1.2 A lot of what I read just points to that regime as difficult to model accurately and then moves on.

You are right the most complicated section is transonic, i have some ideas about that but I want to calculate center of pressure location aproximately , it can be enough for me if the results aproximate Open Rocket program results.

L Unfourtunately i have not licence Fluent because of that I want to prefer the open search cfd program OpenFoam. It has a lot of solvers and I can intervene in when the results are bad.

In OpenFoam, you use a function object to calculate the lift, drag, and moment, the function object will integrate the pressures for you on the specified wall boundary.

Does anyone have a working OpenFoam tutorial for rocketry? I haven't looked in a year or so, keep wanting to run tubefin models but haven't found a way to get started.

I ran a systematic series of tube fin rockets in OF several years ago, I used Pointwise ($$$) to generate the grids instead of the OF grid tools. Those input files are way out of sync with the current OF distribution. I had intended to boil the data down for use in OpenRocket but real life got in the way. I may get to revisit the project this summer using StarCCM+.