Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Averaging line graph

Please login with a confirmed email address before reporting spam

Hello there!

I'm kinda confused with averaging of the temperature.

I have a certain surface heat distribution in a disk cross-section - see Pic1.png.

1) I created 2D Cut Line in Data Set with additional parallel lines [range(1,1,25)]
2) I plotted Temperature dependance along red-arrow for these 'parameters' (see Pic2.png).

All works fine. However, I would like to plot average temperature along red-arrow for every 2D Cut Line, literally - average temperature distribution along the radius of the disk.

I tried some solutions from previous threads, tried some google tips but I'm still here... ;).

Any ideas, hints, tips?
Will appreciate any feedback. Kindest regards!


4 Replies Last Post 3 oct. 2016, 07:29 UTC−4
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 3 déc. 2015, 11:58 UTC−5
Hello Matt,

If I understand correctly, you want to get 25 averages each corresponding to a separate line.

The tedious way is to manually create 25 Cut Line 2D data sets, and manually using Derived Values>Average 25 times to compute the averages.

The easy way is to create a small app that does all the repetitive work for you. See the attached file. Run the application; it should be pretty self descriptive. All it takes is a single method that consists of 3 commands within a for loop, and a single form with two form objects (a button and a table to which the values are sent).
Of course, you will want to prettify it, but it should put you on the right track.

Best,
Jeff
Hello Matt, If I understand correctly, you want to get 25 averages each corresponding to a separate line. The tedious way is to manually create 25 Cut Line 2D data sets, and manually using Derived Values>Average 25 times to compute the averages. The easy way is to create a small app that does all the repetitive work for you. See the attached file. Run the application; it should be pretty self descriptive. All it takes is a single method that consists of 3 commands within a for loop, and a single form with two form objects (a button and a table to which the values are sent). Of course, you will want to prettify it, but it should put you on the right track. Best, Jeff


Please login with a confirmed email address before reporting spam

Posted: 9 years ago 4 déc. 2015, 06:57 UTC−5
Dear Jeff,

Yeah, I did it by averaging step-by-step derived values, but it broke my heart... :).

Thanks for reply! I will come back later with the feedback :).
Dear Jeff, Yeah, I did it by averaging step-by-step derived values, but it broke my heart... :). Thanks for reply! I will come back later with the feedback :).

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 4 déc. 2015, 09:17 UTC−5
Hi again, Matt,
There is another approach, one that does not use an application but adding an extra study instead: see steps 1-5 at this link www.comsol.com/blogs/maximum-e...luations-on-parallel-sections/ . In your case it's an average rather than a maximum that you want to compute, but the idea is the exactly same.
I am attaching a model that demonstrates this.
Best,
Jeff
Hi again, Matt, There is another approach, one that does not use an application but adding an extra study instead: see steps 1-5 at this link www.comsol.com/blogs/maximum-e...luations-on-parallel-sections/ . In your case it's an average rather than a maximum that you want to compute, but the idea is the exactly same. I am attaching a model that demonstrates this. Best, Jeff


Please login with a confirmed email address before reporting spam

Posted: 8 years ago 3 oct. 2016, 07:29 UTC−4

Hi again, Matt,
There is another approach, one that does not use an application but adding an extra study instead: see steps 1-5 at this link www.comsol.com/blogs/maximum-e...luations-on-parallel-sections/ . In your case it's an average rather than a maximum that you want to compute, but the idea is the exactly same.
I am attaching a model that demonstrates this.
Best,
Jeff


Dear Jeff,

I have the same issue as Matt, but in my case much more 2D Cut lines!
My model is in 2d axisymmetric in V4.4.

I follow the steps at the link (although i dont understand how parametrized surface is the correct way for lines..but for planes) and in Step 3.. in ''data set'' option, the solution from Step 2 doesnt appear!(only ''revolution 2d'' data sets from my original studies(not step 2 study).
Also, could u upload the ForMK2.mph compatible to V4.4 model?

Thanks in advance
[QUOTE] Hi again, Matt, There is another approach, one that does not use an application but adding an extra study instead: see steps 1-5 at this link www.comsol.com/blogs/maximum-e...luations-on-parallel-sections/ . In your case it's an average rather than a maximum that you want to compute, but the idea is the exactly same. I am attaching a model that demonstrates this. Best, Jeff [/QUOTE] Dear Jeff, I have the same issue as Matt, but in my case much more 2D Cut lines! My model is in 2d axisymmetric in V4.4. I follow the steps at the link (although i dont understand how parametrized surface is the correct way for lines..but for planes) and in Step 3.. in ''data set'' option, the solution from Step 2 doesnt appear!(only ''revolution 2d'' data sets from my original studies(not step 2 study). Also, could u upload the ForMK2.mph compatible to V4.4 model? Thanks in advance

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.