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.

Switching conditions on/off with Step or Rectangle

Please login with a confirmed email address before reporting spam

Hi !

I'm using Comsol Version 4.0a

I have a heat source for a domain that I want to switch on for some milliseconds and then switch off.
In Parameters I have defined a constant called Heat and given it the correct value and denomination (W/m^3)

When using the step function I get the temperature of the domain to the correct temperature, but ot turned off the heat.
I defined the heat source as step(t)*Heat

Tried to use the Rectangle function, but now the temperature of the particle will not rise, using the following equation as heat source Rect(t)*Heat

Also I get the yellow text in the heat source field with the "Unexpected unit of input" even though this should be correct.

Any tips would be greatly appreciated

Thanks
Nils Eivind

3 Replies Last Post 18 sept. 2016, 06:06 UTC−4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 9 nov. 2010, 08:45 UTC−5
"Case closed"

Got it solved it by "thinking opposite" - turn off heat source instead off turning it on and then off again.
"Case closed" Got it solved it by "thinking opposite" - turn off heat source instead off turning it on and then off again.

Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 9 nov. 2010, 09:39 UTC−5
Great!

Just a note about the unit warning: Functions expect dimensionless inputs and outputs, so you can eliminate the orange color and the "unexpected unit of input" warning by making t dimensionless using [1/s]:

Rect(t[1/s])*Heat

Magnus Ringh, COMSOL
Great! Just a note about the unit warning: Functions expect dimensionless inputs and outputs, so you can eliminate the orange color and the "unexpected unit of input" warning by making t dimensionless using [1/s]: Rect(t[1/s])*Heat Magnus Ringh, COMSOL

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 18 sept. 2016, 06:06 UTC−4
Hi
using the version 5.2, in the variable expression i try to use sinh(phi) or cosh(phi) and give them a name , the unit of (phi) is the volt wich is the variable of electrostatic module, but the color is orange and show ''unexpected unit of input'' so i can't use it in boundary condition ad i can't solve my problem
Appreciate much for your help!!
Hi using the version 5.2, in the variable expression i try to use sinh(phi) or cosh(phi) and give them a name , the unit of (phi) is the volt wich is the variable of electrostatic module, but the color is orange and show ''unexpected unit of input'' so i can't use it in boundary condition ad i can't solve my problem Appreciate much for your help!!

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.