How to use sens.v for switch

Please login with a confirmed email address before reporting spam

Hi,

I am currently using the subcircuit definition in the Electrical Circuit (cir) module and I am confused as to how I am supposed to define the on and off conditions for the "switch" component. To define it, COMSOL says to define the condition as a function of 'sens.v' but when I try to state a condition as the following (without any quotations),

"sens.v"

, it states that there is an "unknown variable sens.v". Can anyone show me an example of how to state the function so that sens.v is the measured node where measure(+) is a and measure(-) is b?

Thanks in advance!



6 Replies Last Post 24.09.2024, 12:58 GMT-4
COMSOL Moderator

Hello Kiran Seetala

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.


Please login with a confirmed email address before reporting spam

Posted: 3 months ago 13.09.2024, 14:19 GMT-4

Did you figure this out?

I find the comsol electric circuit module pretty brutal and not a lot of people using it it seems

I can't get a switch to open and it seems I am not the only one. However all comsol posts with this issue have no replies

Did you figure this out? I find the comsol electric circuit module pretty brutal and not a lot of people using it it seems I can't get a switch to open and it seems I am not the only one. However all comsol posts with this issue have no replies

Please login with a confirmed email address before reporting spam

Posted: 3 months ago 22.09.2024, 23:19 GMT-4

I encounter the same problem, have you solved it?

I encounter the same problem, have you solved it?

Please login with a confirmed email address before reporting spam

Posted: 3 months ago 23.09.2024, 09:13 GMT-4

I wonder if one of the comsol reps here would be willing to share how the setup the v.sens function in order to get the switch to work (assuming using the switch as voltage controlled)? What does one put in for the line "On condition as a function of sens.v". Do both On and Off need to be filled in? I would think that if the initial state is selected as either on or off you would only need to fill in one of these but the documentation seems limited.

I wonder if one of the comsol reps here would be willing to share how the setup the v.sens function in order to get the switch to work (assuming using the switch as voltage controlled)? What does one put in for the line "On condition as a function of sens.v". Do both On and Off need to be filled in? I would think that if the initial state is selected as either on or off you would only need to fill in one of these but the documentation seems limited.

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 3 months ago 23.09.2024, 09:55 GMT-4

Hello Dennis,

While COMSOL employees occasionally post in the Discussion Forum, to request technical support users eligible for the service are invited to contact support@comsol.com .

Best regards,

Jeff

-------------------
Jeff Hiller
Hello Dennis, While COMSOL employees occasionally post in the Discussion Forum, to request technical support users eligible for the service are invited to contact support@comsol.com . Best regards, Jeff

Magnus Olsson COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 3 months ago 24.09.2024, 07:04 GMT-4
Updated: 3 months ago 24.09.2024, 08:17 GMT-4

Hi,

The unknown variable indication/message is a glitch in the user interface that we will correct. The model will still solve correctly. The documentation can indeed be improved. The way the switch works is that the on/off Boolean expressions trigger the state of the switch to change when going from false to true (but not the other way around).

The state of the switch (on/off) is changed only when a condition goes from false to true and not when going from true to false. Thus, if the state is off and the on condition goes from false to true, the state will shift from off to on. On the other hand, if the state of the switch is on and the on condition goes from true to false, nothing will happen.

We will amend the documentation accordingly.

The attached example illustrates how to trigger switching by a sine wave. Note that we have tweaked the time-dependent solver to use more densely spaced output times and also changed the time stepping to use the Strict method to make sure that no switch triggering events are missed.

Best regards,

-------------------
Magnus
Hi, The unknown variable indication/message is a glitch in the user interface that we will correct. The model will still solve correctly. The documentation can indeed be improved. The way the switch works is that the on/off Boolean expressions trigger the state of the switch to change when going from false to true (but not the other way around). The state of the switch (on/off) is changed only when a condition goes from false to true and not when going from true to false. Thus, if the state is off and the on condition goes from false to true, the state will shift from off to on. On the other hand, if the state of the switch is on and the on condition goes from true to false, nothing will happen. We will amend the documentation accordingly. The attached example illustrates how to trigger switching by a sine wave. Note that we have tweaked the time-dependent solver to use more densely spaced output times and also changed the time stepping to use the Strict method to make sure that no switch triggering events are missed. Best regards,


Please login with a confirmed email address before reporting spam

Posted: 3 months ago 24.09.2024, 12:58 GMT-4

I just want to say thanks for posting a sample file for using the switch element.

I just want to say thanks for posting a sample file for using the switch element.

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

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.