CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   Coefficient of Pressure Distribution (http://www.cfd-online.com/Forums/cfx/109960-coefficient-pressure-distribution.html)

Umberto December 1, 2012 09:12

Coefficient of Pressure Distribution
 
Hi,
I am working on a flow simulation over a sail. In order to validate my results I need to plot the coefficient of pressure distribution along the sails which I will compare to some experimental data.
I've entered the following expression in CFX-Pre:

(Pressure - areaAve(Pressure)@OUTLET)/
(0.5*Density*(areaAve(Velocity)@INLET)^2)

then when I go to CFX post and I want to plot tha expression, i need to specifi a location for the data series. Is there any way to create a line, or better a surface, exactly coincident with my geometry so that I can get the pressure distridution along that line or surface? I can create a straight line, but what I want is a line following the profile of my sail. Thank you.

umberto

ghorrocks December 1, 2012 14:48

Draw contours of x, y or z (or any function you like to generate other shapes) on the sail surface. Then draw your function on these contour lines.

Umberto December 1, 2012 17:35

What do you mean by draw your functions on these line? do you mean select those lines as where the expression should be computed?

ghorrocks December 2, 2012 17:06

Here's a more complete explanation:

* Create a contour object. Make its "Locations" the sail surface, and the "Variable" such that it creates contours on surface you wish to view - X, Y or Z; or a more complex function if you want it angled or curved or whatever.
* Create a Polyline object. Method is "From Contour", and select the contour level you want.
* You now have a line object you can do "stuff" with, plot your variable, export data, put vectors on it, anything you like.

Crank-Shaft December 7, 2012 19:57

I encountered a related problem so I would like to share it on this thread. The Coefficient of Pressure and Skin-Friction Coefficient were defined in CFX Post using the following expressions -
Total Pressure/(0.5*DensityFreeStream*VelocityFreeStream^2)
Wall Shear/(0.5*DensityFreeStream*VelocityFreeStream^2)

where, the denominator contains the areaAve(Density)@Inlet and areaAve(velocity)@Inlet respectively.

These are the problems I have encountered when trying to plot these as scalar variables on wall-based polylines -
  • I need to use the Static Pressure values relative to ambient or atmospheric. My Reference domain pressure is 0 Pa and the Absolute Pressure is quoted as 101325 Pa in CFX however, I need to implement the expression P_static-P_ambient. Does the Total Pressure variable provide for this? Since the global range of values is 0-15 Pa I imagined this to be a relative to the ambient conditions. Can you please suggest an alternative?
  • The Cf values were expected to help identify the location of separation and reattachment as the stream-wise velocity vector changes direction. However, the when using the above formula on several simulations involving steady state in addition to various transient settings, the value never falls below 0. I was only able to produce this when choosing Wall Shear X as the main numerator. Can you please provide some guidance on how to implement this and what I may be doing wrong?
Appreciate all the comments guys and girls.

ghorrocks December 8, 2012 04:57

By the way, I think you will find areaAve(Density)@Inlet * areaAve(Velocity)@Inlet ^2 does not equal areaAve(Density*Velocity^2)@Inlet. Be careful how you write expressions like this - I suspect the second form is what you want, not the first.

Why are you using 0 reference pressure? This is just introducing numerical round off errors. Use a reference pressure representative of the static pressure in the domain to reduce round off.

Total pressure is offset by the reference pressure, just as all other pressure quantities are.

Quote:

Since the global range of values is 0-15 Pa I imagined this to be a relative to the ambient conditions. Can you please suggest an alternative?
I do not understand this question. Can you explain it a bit more clearly?

Crank-Shaft December 8, 2012 06:13

Quote:

Originally Posted by ghorrocks (Post 396383)
By the way, I think you will find areaAve(Density)@Inlet * areaAve(Velocity)@Inlet ^2 does not equal areaAve(Density*Velocity^2)@Inlet. Be careful how you write expressions like this - I suspect the second form is what you want, not the first.

Why are you using 0 reference pressure? This is just introducing numerical round off errors. Use a reference pressure representative of the static pressure in the domain to reduce round off.

Total pressure is offset by the reference pressure, just as all other pressure quantities are.



I do not understand this question. Can you explain it a bit more clearly?

Well I initially had the outlet pressure as 0 Pa and this is why I left the Reference Pressure as 0. I think I will retry the simulation with 101325 Pa as the reference pressure, representing ambient or atmospheric conditions. I was also concerned that setting the Pressure values to the relatively high non-zero values would lead to unrealistically high Cp values however, does it make sense if I rewrite the numerator as Pressure-Reference Pressure or Total Pressure-Reference Pressure? In the above quote I thought that since the Total Pressure values were relatively small in magnitude they already represented the difference between the static and reference pressure.

Also, please share some ideas regarding the reattachment location.

Crank-Shaft December 9, 2012 00:38

Hey Glenn,

Yes thanks for that reminder about the areaAve(Velocity^2)@Inlet. I actually defined it correctly in the CFD Post expression but had a typo on the forum post.

I now have to change the reference pressure and the gauge pressure so that my expression Pressure-Reference Pressure or Total Pressure is valid in the numerator of my Cp expression. The main problem is that when the Reference Pressure is defined as atmospheric with a value of 101325 Pa, the outlet definition of gauge pressure of 0 Pa leads to unrealistic Cd values >> 1. I don't really think changing the outlet boundary conditions to 101325 Pa would help since they are specified as gauge pressure, which obviously is the difference between the absolute and atmospheric or reference.

Is it still possible to define a 0 gauge pressure at the outlet while avoiding the numerical rounding errors you mentioned? If the application uses Gauge Pressure = Total Pressure-Reference Pressure then it should be acceptable and I will change the outlet BC values. Please share some suggestions on how to correct the issues with large Cp values.

ghorrocks December 9, 2012 04:42

Can you explain what you are modelling? Or if you have already explained it post a link to the thread which explains it? You probably have explained it before but there are so many threads on the forum I cannot remember them all.

Crank-Shaft December 12, 2012 18:40

The flow domain represents an open-flow with standard atmospheric air properties flowing over a backward facing ramp. The geometry is essentially a 2 m long tunnel with a 5 deg. leading ramp and 16 deg. trailing, backward ramp. The ramp is there to induce separation and also provide a benchmark test case, which will be compared to results after the application of vortex generators on the top. The side walls have been modelled as symmetric boundary conditions and the top face was treated as a zero-shear wall. The inlet is at 4.5 m/s with a 0 gauge pressure outlet.

My attempts at blocking and meshing the geometry is summarised in the forum thread - http://www.cfd-online.com/Forums/ans...generator.html

Please let me know whether the geometry, the flow conditions and the overall aims are clear and I look forward to your reply.

ghorrocks December 13, 2012 05:49

You forgot to mention the most important bit - the relevant non-dimensional numbers. I will assume this flow is low Ma number (so incompressible) and moderate Re number (so fully turbulent, but with boundary layers of a significant thickness). I also assume the flow is at atmospheric pressure or close to it.

If my assumptions are correct then you should:
* Set a reference pressure of atmospheric pressure
* Set the outlet as 0 pressure, inlet as the desired velocity
* I think a previous post then says the pressure range is 0-15Pa
* Your post #5 is talking about pressure and skin friction coeffs. I would write these as:
(pressure or wall shear at that point)/(0.5*FlowDensity*InletVelocity^2), and FlowDensity is set to the density you are using and InletVelocity to the flow velocity, and these CEL expressions used to set the fluid density and inlet velocity. Then you do not need to use callback functions to calculate these values.

Crank-Shaft December 13, 2012 21:28

Quote:

Originally Posted by ghorrocks (Post 397316)
You forgot to mention the most important bit - the relevant non-dimensional numbers. I will assume this flow is low Ma number (so incompressible) and moderate Re number (so fully turbulent, but with boundary layers of a significant thickness). I also assume the flow is at atmospheric pressure or close to it.

If my assumptions are correct then you should:
* Set a reference pressure of atmospheric pressure
* Set the outlet as 0 pressure, inlet as the desired velocity
* I think a previous post then says the pressure range is 0-15Pa
* Your post #5 is talking about pressure and skin friction coeffs. I would write these as:
(pressure or wall shear at that point)/(0.5*FlowDensity*InletVelocity^2), and FlowDensity is set to the density you are using and InletVelocity to the flow velocity, and these CEL expressions used to set the fluid density and inlet velocity. Then you do not need to use callback functions to calculate these values.

Yeah sorry that was fairly stupid indeed. The Reynolds number calculated for the domain was Re_x=80 000 based on the length ahead of the inlet ramp. The Mach number is definitely < 0.2-0.3 and the incompressible fluid assumptions were applied. The energy equations were not used in the solution since isothermal conditions were assumed.

Regarding the user expressions you wrote above, I can confirm that my new ones are very similar.

The default reference value was 0 Pa for the domain pressure. When my Fluent results are exported into CFX Post I found a coefficient of pressure and skin-friction as result variables. When considering the mathematical definition as Cp=P_s-P_ref/(0.5*rho*Vel^2) the Total Pressure variable in the results file should be already calculating the numerator. Hence, I have used this so far and it is matching my manual calculations. It is still fairly unclear what the differences are between each of the variables such as Total Pressure, Relative Total Pressure, Static Pressure, Relative Static Pressure and so on.

For the Cf values I have been using Wall Shear X in the stream-wise direction, since this matches my mean flow direction and is the only way I get a dataset with negative and positive results. My intention was to use these results and the streamwise velocity plots to determination separation points and reattachment lengths amongst other flow features.

Thanks for your guidance Glenn.

ghorrocks December 14, 2012 04:30

Total pressure and Static pressure are reported in CFX as gauge pressures, that is they are offset by the reference pressure. The Absolute pressure is exactly that - the absolute pressure with no reference pressure. I do not know what relative static/total pressure is - where is that coming from?

Crank-Shaft December 15, 2012 00:01

Quote:

Originally Posted by ghorrocks (Post 397497)
Total pressure and Static pressure are reported in CFX as gauge pressures, that is they are offset by the reference pressure. The Absolute pressure is exactly that - the absolute pressure with no reference pressure. I do not know what relative static/total pressure is - where is that coming from?

Yes the gauge pressure is exactly what I need and I have been using to to generate all the graphical plots so far. The wall shear stress seems to have x,y,z directional components and I have used the stream-wise direction and normalised x-axis velocity for Cf.

I am not sure about the Relative pressures and will try not be too concerned with this.

I will share some comparative plots here for further discussion. Thanks everyone for the input.

Crank-Shaft December 17, 2012 03:39

4 Attachment(s)
Correction to previous quote - The Reynolds Number is 500 000. I conducted a very basic time-step and also boundary condition sensitivity study with this flow domain.

The optimal time-step was calculated with the Courant number of 1 and 0.5t Optimal represents Courant number of 0.5. The characteristic distance delta_x was taken from average cell size within the domain.

The boundary condition characteristic Length and Turbulence Intensity were calculated based on the boundary layer thickness and these were set for the inlet and the pressure outlets.

Attached images are available for discussion. I really need to try and interpret the results and would really appreciate if you can help draw some insights from this. Please ignore the title of the charts since they were not recently updated.

ghorrocks December 17, 2012 04:36

The recommended approach is to use adaptive time stepping homing in on 3-5 coeff loops per iteration. Courant Number time stepping is not recommended as Courant number is not a fundamental parameter for an implicit CFD code like CFX.

Crank-Shaft December 18, 2012 18:59

Quote:

Originally Posted by ghorrocks (Post 397869)
The recommended approach is to use adaptive time stepping homing in on 3-5 coeff loops per iteration. Courant Number time stepping is not recommended as Courant number is not a fundamental parameter for an implicit CFD code like CFX.

Well the Post-processing was done in CFX however, the results were extracted from Fluent using a implicit, SIMPLE coupling algorithm with all transport variables discretised with 2nd order approximation. I remember that you mentioned the adaptive time-stepping previously however, my simulation converges within 20-30 iterations for each time-step, which I believe is reasonably good for this solver.

For the first 50-70 time-steps the number of iterations are greater however, based on my limited knowledge this is to be expected. Please correct me if I am mistaken here.

Another issue is the blocking and meshing of this geometry and the link is provided here - http://www.cfd-online.com/Forums/ans...generator.html


All times are GMT -4. The time now is 19:59.