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.

Spatial volume integration in partial 3D domain from Derived values?

Please login with a confirmed email address before reporting spam

Hi, guys,

I intend to obtain data using volume integration from Derived Values. The thing is that i only can get the data of whole 3D domain (such as -10mm=<z<=10mm) instead of partion of that (such as middle half -5mm=<z<=5mm). I have read several blogs, with suggestions by using integration coupling components or adding another physical interface. Besides, most of them are based on 2D model and i couldnt find videos or files to learn. Perhaps there exsit some simple or quick ways to do this calculation, has anyone had this experience?


2 Replies Last Post Mar 11, 2024, 8:47 a.m. EDT
Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 9 months ago Mar 10, 2024, 5:08 p.m. EDT
Updated: 9 months ago Mar 10, 2024, 5:06 p.m. EDT

If all you want is to employ simple constraints on x, y, or z during evaluation, then simple Booleans are very easy to apply. Just multiply your integrand by the appropriate Boolean expression. A true expression evaluates to 1 and a false expression evaluates to 0. For example, suppose you want to integrate a quantity f but only where x<7. Then integrate the quantity f*(x<7). You can combine Boolean expressions to create more complicated logical constraints. Look up the available "operators" in the Help system. Use "&&" for the logical and operation and "||" for logical or. For example, (x>3)&&(x<7) will evaluate to one if x is between 3 and 7, but will evaluate to zero otherwise.

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
If all you want is to employ simple constraints on *x*, *y*, or *z* during evaluation, then simple Booleans are very easy to apply. Just multiply your integrand by the appropriate Boolean expression. A *true* expression evaluates to 1 and a *false* expression evaluates to 0. For example, suppose you want to integrate a quantity *f* but only where x

Gunnar Andersson COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 months ago Mar 11, 2024, 8:47 a.m. EDT

An alternative is to use one or more Filter datasets. This usually gives a more accurate result than multiplying the integrand by a Boolean expression.

An alternative is to use one or more Filter datasets. This usually gives a more accurate result than multiplying the integrand by a Boolean expression.

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.