Cross-section average as function of position

Please login with a confirmed email address before reporting spam

Hi everyone,

I have a simple system where I have a freely flowing tube depositing some concentration into a porous medium surrounding that tube. The tube is straight along a single axis and has regular dimensions.

I would like to calculate (and plot) the cross-sectional average of concentration as a function of length along the pipe (C_avg vs x). I only want data for the pipe, not the surrounding medium. However, I've had some trouble in locating the correct method/function to do this.

Any help would be greatly appreciated! Thank you in advance.

Best, Carl


1 Reply Last Post 2026年1月27日 GMT+8 11:02

Please login with a confirmed email address before reporting spam

Posted: 2 hours ago 2026年1月27日 GMT+8 11:02

Although I would love to hear what the ideal solution is, I came up with this:

-Make a second study with an auxiliary sweep of a position parameter "xp = range(start,step,end)" -Make a cut line in Results>Datasets>Cut Line 3D and set... x1 = x2 = xp, y1 = y2 = 0, z1 = 0 and z2 = radius_of_tube -Evaluated two line integrals in Results>Derived Values>Line Integration with expressions 2.pi.z.concentration and 2.pi.z. -I divided by the first integral results by the second, resulting in the average along that line (due to my symmetry, this is equivalent to avg of x-section)

Although I would love to hear what the ideal solution is, I came up with this: -Make a second study with an auxiliary sweep of a position parameter "xp = range(start,step,end)" -Make a cut line in Results>Datasets>Cut Line 3D and set... x1 = x2 = xp, y1 = y2 = 0, z1 = 0 and z2 = radius_of_tube -Evaluated two line integrals in Results>Derived Values>Line Integration with expressions 2.pi.z.concentration and 2.pi.z. -I divided by the first integral results by the second, resulting in the average along that line (due to my symmetry, this is equivalent to avg of x-section)

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.