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.

Area Calculation in a results graph

Please login with a confirmed email address before reporting spam

Hi,

I want to calculate the ratio of blue area over the red area. How is it possible to get the surface area of this kind of plots from results.

Thanks in advance, Reza



1 Reply Last Post 21.04.2020, 15:32 GMT-4
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 5 years ago 21.04.2020, 15:32 GMT-4

You can use the integration tools available under Derived Values. For the expression to integrate, specify a boolean expression along the lines of

quantity>cutoff_value1

or

quantity<cutoff_value2

Best,

Jeff

PS: If you even want COMSOL to compute the ratio of the two integrals without having to pull out your calculator, you can instead define a Nonlinear Coupling (found under Definitions in the model tree) of the integration type. If it's the first one in your model it will be called intop1 and in derived values you'd ask COMSOL to return, in essence, intop1(quantity>cutoff_value1)/intop1(quantity<cutoff_value2)

-------------------
Jeff Hiller
You can use the integration tools available under Derived Values. For the expression to integrate, specify a boolean expression along the lines of quantity>cutoff_value1 or quantitycutoff_value1)/intop1(quantity

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.