Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Can't use variable defined in 'Global Definitions' within a Waveform definition

Please login with a confirmed email address before reporting spam

I have defined 'tau' in Global Definitions as a variable = 40000*3600*24*365.25[s]

I have created a Waveform also in Global Definitions (and in local definitions just to check), with angular frequency = 2*pi/tau.
It does not like it: 'Unknown variable name' when I try to plot my Waveform.

If instead I substitute '2*pi/( 40000*3600*24*365.25)', then it's fine.
Why is this?

Ben.

3 Replies Last Post 12.11.2012, 17:47 GMT-5
Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12.11.2012, 04:12 GMT-5
Hi,

You can define 'tau' as a global parameter (Global Definitions>Parameters) instead. The use of variables in function definitions is not supported because in general, variables can depend on time and space variables.

Best regards,
Magnus Ringh, COMSOL
Hi, You can define 'tau' as a global parameter (Global Definitions>Parameters) instead. The use of variables in function definitions is not supported because in general, variables can depend on time and space variables. Best regards, Magnus Ringh, COMSOL

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 12.11.2012, 14:19 GMT-5
Hi

you can also use better the internal units as you seem to have 40'000 years there and there should be a unit for time in seconds, minutes, hours, days, ... check the doc

--
Good luck
Ivar
Hi you can also use better the internal units as you seem to have 40'000 years there and there should be a unit for time in seconds, minutes, hours, days, ... check the doc -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12.11.2012, 17:47 GMT-5
Thank you Magnus, I see it now.

Ivar, yes it seems I can enter 40000[yr] instead, thanks.

Ben.
Thank you Magnus, I see it now. Ivar, yes it seems I can enter 40000[yr] instead, thanks. Ben.

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.