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.

Integral in COMSOL

Please login with a confirmed email address before reporting spam

Hi, I have a question regarding integral code in COMSOL. In 1D this equation works for taking integral: intop1(cm)-(cref*L) How can I write this for a 2D model? I do have all these parameters (cm, cref, and L) in my 2D model as well but this code does not work for that. I appriciate any help you can provide! I wanna use this definition in the global constraint tab. Thannks!


1 Reply Last Post Sep 28, 2021, 2:03 p.m. EDT
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 3 years ago Sep 28, 2021, 2:03 p.m. EDT
Updated: 3 years ago Sep 28, 2021, 2:12 p.m. EDT

Hello Shirin,

By all appearances, intop1 is the integration operator, which here is applied to the quantity cm. From that, you are subtracting cref times L, and I imagine that L is the length of the 1D domain on which you set up the integration operator and that cref is some reference value for cm. If those guesses are correct, your formula is computing not the integral of cm but that of cm minus cref, and you could have achieved the same by intop1(cm-cref); that formula would hold in 2D and 3D as well.

If you have not worked with coupling operators before, you can read about them in the Reference Manual for COMSOL Multiphysics, version 5.6, page 360.

Best,

Jeff

-------------------
Jeff Hiller
Hello Shirin, By all appearances, intop1 is the integration operator, which here is applied to the quantity cm. From that, you are subtracting cref times L, and I imagine that L is the length of the 1D domain on which you set up the integration operator and that cref is some reference value for cm. If those guesses are correct, your formula is computing not the integral of cm but that of cm minus cref, and you could have achieved the same by intop1(cm-cref); that formula would hold in 2D and 3D as well. If you have not worked with coupling operators before, you can read about them in the Reference Manual for COMSOL Multiphysics, version 5.6, page 360. Best, Jeff

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.