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.

Global Variable using Local Variable

Please login with a confirmed email address before reporting spam

I want to define a global variable using some local variables which were computed by the simulation. How can I do that.

Thank you.


3 Replies Last Post Oct 29, 2019, 3:41 a.m. EDT
Lars Gregersen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 5 years ago Oct 24, 2019, 7:52 a.m. EDT
Updated: 5 years ago Oct 24, 2019, 5:35 a.m. EDT

Use Components->Definitions->Component Couplings (from version 5.5: Components->Definitions->Nonlocal Couplings) to add a coupling operator from whatever place you wish to have something available globally. An Integration operator is commonly used for this, but the other operators are also useful depending on your needs.

You can use the generated operator where you wish to use it since they are global.

Note that there are other nonlocal couplings available that "copies" data from one part of the model to another part.

-------------------
Lars Gregersen
Comsol Denmark
Use **Components->Definitions->Component Couplings** (from version 5.5: **Components->Definitions->Nonlocal Couplings**) to add a coupling operator from whatever place you wish to have something available globally. An Integration operator is commonly used for this, but the other operators are also useful depending on your needs. You can use the generated operator where you wish to use it since they are global. Note that there are other nonlocal couplings available that "copies" data from one part of the model to another part.

Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 5 years ago Oct 28, 2019, 7:41 p.m. EDT
Updated: 5 years ago Oct 28, 2019, 3:42 p.m. EDT

Hello, Lars. What is this "version 5.5" of which you speak? :-)

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
Hello, Lars. What is this "version 5.5" of which you speak? :-)

Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 5 years ago Oct 29, 2019, 3:41 a.m. EDT
Updated: 5 years ago Oct 29, 2019, 4:23 a.m. EDT

Hi Robert,

That is the version to be released soon. Those who visited the user conferences already have a pre-release.

From version 5.5, this menu entry has changed its name in order to make it more clear what you will actually find under it.

Regards,
Henrik

-------------------
Henrik Sönnerlind
COMSOL
Hi Robert, That is the version to be released soon. Those who visited the user conferences already have a pre-release. From version 5.5, this menu entry has changed its name in order to make it more clear what you will actually find under it. Regards, Henrik

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.