CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Integration along a line (https://www.cfd-online.com/Forums/cfx/90771-integration-along-line.html)

 zcesd47 July 20, 2011 08:19

Integration along a line

Hi all friends,

I have a problem which required the Z coordinate at a polyline and integrate it with respected to x . eg. Z^2dx

How can I create variable which gives me the Z^2 value at the polyline?

Dijun

 ghorrocks July 20, 2011 19:24

Two ideas:

1) Generate a user variable defined as z^2, and integrate that alone the polyline.
2) use a CEL expression like lineInt(z^2)@polyline and calculate it directly. This can be done in the table view.

 zcesd47 July 21, 2011 06:01

Quote:
 Originally Posted by ghorrocks (Post 316846) Two ideas: 1) Generate a user variable defined as z^2, and integrate that alone the polyline. 2) use a CEL expression like lineInt(z^2)@polyline and calculate it directly. This can be done in the table view.
Hi， Ghorrocks，

But if I use lengthInt()@Polyline 1, the result will be the integration with respected to polyline. I try to use the z^2 in the polyline but integrate it with respected to x.

Regards

Dijun

 ghorrocks July 21, 2011 08:13

I see. You might be able to transform the integral into a with respect to length (dl) integral using a chain rule or something like that. Been so long since I have done that sort of stuff I can't remember off the top of my head.

Otherwise export the points of your polyline including XYZ values of the points and then you can do the integration in another package like excel, tecplot or matlab.

 zcesd47 July 22, 2011 14:12

Quote:
 Originally Posted by ghorrocks (Post 316923) I see. You might be able to transform the integral into a with respect to length (dl) integral using a chain rule or something like that. Been so long since I have done that sort of stuff I can't remember off the top of my head. Otherwise export the points of your polyline including XYZ values of the points and then you can do the integration in another package like excel, tecplot or matlab.
Thank you very much! I didn't figure out the way you said but I did the integration by using areaInt_z at the surface then divided by the width of the surface

 All times are GMT -4. The time now is 16:47.