Borrar filtros
Borrar filtros

Trapezoidal integration for pressure

2 visualizaciones (últimos 30 días)
Robert Wake
Robert Wake el 7 de Ag. de 2021
Comentada: Robert Wake el 7 de Ag. de 2021
Hi guys, I have a set of streamlines made up from coordinates in the z-x axis like in the picture shown. Each blue line represents a separate streamline made up of coordinates in z and x. Along each of these streamlines I know the exact coordinates and also the pressure at each corresponding z-x and coordinate. Hence for each streamline I have a seperate matrix made up of the columns z, x and pressure. I need to now integrate the pressure distribution across the surface using the 'composite trapezoid rule' however i'm having no luck in this. An example of one of the streamline matrices is like so, in which i've tried to use the trapz function but the surface pressure is very wrong.
x = [0.025 0.0233 0.0243 0.02477 0.0254]
z = [0.3658 0.3722 0.3991 0.433 0.477]
P = [24460 24690 25005 25101 25512]
Streamline1 = [x(:) z(:) P(:)]
this is just a small segment of one of the streamlines, and i have 31 of them. Is there a way i can integrate each streamline to find the pressure distribution across every streamline, so i can then calculate the pressure across the entire surface? The fact that the streamlines are changing in both the z and x axis make the integration even more confusing for me. Any help would greatly be appreciated, thanks!

Respuestas (1)

Alan Stevens
Alan Stevens el 7 de Ag. de 2021
Do you mean something like this?
x = [0.025 0.0233 0.0243 0.02477 0.0254];
z = [0.3658 0.3722 0.3991 0.433 0.477];
P = [24460 24690 25005 25101 25512];
% Streamline coordinates
s = sqrt(x.^2 + z.^2);
% figure(1)
% plot(s,P,'o-'),grid
% xlabel('s'),ylabel('P')
pressure = @(S) interp1(s,P,S);
dS = (max(s)-min(s))/100;
S = min(s):dS:max(s);
p = pressure(S);
% figure(2)
% plot(S,p),grid
I = trapz(p)*dS;
  1 comentario
Robert Wake
Robert Wake el 7 de Ag. de 2021
Sorry Alan I haven't explained properly. But i don't think this is correct as there is a rather large over prediction in the total pressure. I'm integrating the pressure distribution over the planform of a wing (in cartesian coordinates) in order to get total lift.
However pressure = f(x,z) and x=f(z) so I need to use some sort of double integral. I know the coordinates of every streamline and the corresponding pressure at that point such that x(i), z(i) and pressure(i) are all related; the pressure at coordinates x(i)-z(i) = pressure(i) in the matrices I defined earlier.
So i'm looking to then integrate the pressure across the surface area in carteesian coordinates. thanks again

Iniciar sesión para comentar.


Más información sobre Spline Postprocessing en Help Center y File Exchange.



Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by