Discussion ClosedThis 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.

Failed to evaluate variable: freq

Please login with a confirmed email address before reporting spam

Hi COMSOL Users,

I'm new to using the v4.x series of COMSOL, so perhaps I've missed something simple, but I get an error when trying to plot body volume force variables. The error message states:
"Cannot evaluate expression.
Failed to evaluate variable.
- Variable: freq
- Geometry: 1
- Domain: 1
Failed to evaluate variable.
- Variable: mod1.acpr.freq
- Defined as: freq
..."
and continues down to mod1.spf.Fx which I am trying to plot (see attached image).

I have used the Pressure Acoustics module along with the Laminar Flow module. I set the solver to first solve Pressure Acoustics in the frequency domain (Step 1), then a combination of parameters from Pressure Acoustics is used to calculate body forces in the Laminar Flow module. Stationary analysis is used to solve for the Laminar Flow physics (Step 2).

Has anyone had this problem before? Is there an easy way to fix this problem?

Thanks in advance,
Ian


8 Replies Last Post 2016年2月27日 GMT+1 22:41
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年12月21日 GMT+1 06:48
Hi

Have you defined the frequency in the first tab in the frequency solver node ? I suspect your field is blank

--
Good luck
Ivar
Hi Have you defined the frequency in the first tab in the frequency solver node ? I suspect your field is blank -- Good luck Ivar

Sergei Yushanov Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年12月21日 GMT+1 14:22
Ian,

Try the following:

Under Global Definitions>Parameters, define variable “freq” and assign the same numerical value of the frequency you are using in the Study Step.
Update the model and plot your results again.

Regards,
Sergei
Ian, Try the following: Under Global Definitions>Parameters, define variable “freq” and assign the same numerical value of the frequency you are using in the Study Step. Update the model and plot your results again. Regards, Sergei

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年1月3日 GMT+1 03:02
Hi Ivar, Sergei,

Thanks for your help and apologies for the delayed reply. The trick of defining a new parameter "freq" under Global Parameters worked.

Regards,
Ian
Hi Ivar, Sergei, Thanks for your help and apologies for the delayed reply. The trick of defining a new parameter "freq" under Global Parameters worked. Regards, Ian

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年1月3日 GMT+1 08:31
Hi

probably the same effect as when you run a stationary sover before a time series, with BC equations depending on "t" the time, but "t" is defined only when the time dependent solver is active not during the stationary solver, therefore one must add the variable name as a Parameter (typically t=0[s]).
For the frequency domain, "freq" is defined when that solver is active, but not for any other solver, so you need to add it in the Parameter list too.

A Parameter might be overwritten later by COMSOL as a parameter is loaded once at first solver run and only updated via a "Parameter sweep" or "Continuation sweep" sovler node

--
Good luck
Ivar
Hi probably the same effect as when you run a stationary sover before a time series, with BC equations depending on "t" the time, but "t" is defined only when the time dependent solver is active not during the stationary solver, therefore one must add the variable name as a Parameter (typically t=0[s]). For the frequency domain, "freq" is defined when that solver is active, but not for any other solver, so you need to add it in the Parameter list too. A Parameter might be overwritten later by COMSOL as a parameter is loaded once at first solver run and only updated via a "Parameter sweep" or "Continuation sweep" sovler node -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2014年6月2日 GMT+2 19:07
Hi, Sergei,

I think I have the pretty similar trouble as the one you solved. Could you take a quick look at the attached file and help me fix the problems.

Thanks in advance on your comment.

Best,
Ji
Hi, Sergei, I think I have the pretty similar trouble as the one you solved. Could you take a quick look at the attached file and help me fix the problems. Thanks in advance on your comment. Best, Ji


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2014年6月20日 GMT+2 21:55
Thank you Sergei,
This bug still exists in 4.4!


Ian,

Try the following:

Under Global Definitions>Parameters, define variable “freq” and assign the same numerical value of the frequency you are using in the Study Step.
Update the model and plot your results again.

Regards,
Sergei


Thank you Sergei, This bug still exists in 4.4! [QUOTE] Ian, Try the following: Under Global Definitions>Parameters, define variable “freq” and assign the same numerical value of the frequency you are using in the Study Step. Update the model and plot your results again. Regards, Sergei [/QUOTE]

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 2015年9月12日 GMT+2 05:49
And 5.1 too.

Thank you Sergei,
This bug still exists in 4.4!


Ian,

Try the following:

Under Global Definitions>Parameters, define variable “freq” and assign the same numerical value of the frequency you are using in the Study Step.
Update the model and plot your results again.

Regards,
Sergei



And 5.1 too. [QUOTE] Thank you Sergei, This bug still exists in 4.4! [QUOTE] Ian, Try the following: Under Global Definitions>Parameters, define variable “freq” and assign the same numerical value of the frequency you are using in the Study Step. Update the model and plot your results again. Regards, Sergei [/QUOTE] [/QUOTE]

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 2016年2月27日 GMT+1 22:41
Has anyone figured out how to deal with this problem when you are running a study with two steps, each of which uses frequency domain RF, but at different frequencies?

When doing the last step, it seems to want to update the solution of the previous step using the new frequency that it sees when I don't want it to do that.

Update: never mind, I figured out how to do it in COMSOL 5.2. If you go to the topmost list (i.e Electromagnetic waves (emw) ), then go to the equation tab, there are now options to choose from. The default seems to be "study controlled", but if you change it to frequency domain, it gives you the option to enter any frequency you want with a different variable name.
Has anyone figured out how to deal with this problem when you are running a study with two steps, each of which uses frequency domain RF, but at different frequencies? When doing the last step, it seems to want to update the solution of the previous step using the new frequency that it sees when I don't want it to do that. Update: never mind, I figured out how to do it in COMSOL 5.2. If you go to the topmost list (i.e Electromagnetic waves (emw) ), then go to the equation tab, there are now options to choose from. The default seems to be "study controlled", but if you change it to frequency domain, it gives you the option to enter any frequency you want with a different variable name.

Note that while COMSOL employees may participate in the discussion forum, COMSOL®software users who are on-subscription should submit their questions via theSupport Centerfor a more comprehensive response from the Technical Support team.

Baidu
map