State variables

Please login with a confirmed email address before reporting spam

Hi,

I am currently using State Variables to model the permanent change in boundary conditions (BCs). In the global parameters, I have defined Switch = 1 and utilized the following expression in State Variables definition to model the permanent change:

State: Switch Initial Value: 0 Update Expression: if(ps > pt, 1, Switch)

Additionally, I have set up the following condition for the BC transition:

Name: E_a Expression: if(Switch == 1, Ea, Ec)

The model converges. However, when I plot the Switch parameter, it displays values between 0 and 1 instead of just 0 or 1. This has caused me to question whether the BC switch is functioning correctly and if the results are accurate. I would appreciate any insights or advice you could provide.

Thank you in advance for your help!

Best regards,

Kedar


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.