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.

Using step functions as initial values

Please login with a confirmed email address before reporting spam

Hi all

I am unable to implement a step function in my model. I have two domains, and the initial value in domain 1 is V and domain 2 is 0. How can i smooth the initial value from V to 0 at the interface of the two domains. I realize it is quite simple but I am unable to find out how to do this. Thanks


2 Replies Last Post 24 janv. 2011, 16:25 UTC−5
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 24 janv. 2011, 01:05 UTC−5
Hi

have you tried to implement the "Definitions - Funtions - step", you might need to add/subtract a little offset and change the slope defined on the second tab (closed by default)

--
Good luck
Ivar
Hi have you tried to implement the "Definitions - Funtions - step", you might need to add/subtract a little offset and change the slope defined on the second tab (closed by default) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 24 janv. 2011, 16:25 UTC−5
Hi Ivar


I did not implement the step function the right way. After some research i figured it out. The step function has 4 inputs. The location (in my case a certain radial distance), the start value and end value ( for a variable, say, concentration) and then the interval where the variable is taken from the start value to the end value. Now when the step function is declared say as an initial value the syntax is step(argument). Since the argument i have chose is radical distance, it should be declared as step(r). It works out
Hi Ivar I did not implement the step function the right way. After some research i figured it out. The step function has 4 inputs. The location (in my case a certain radial distance), the start value and end value ( for a variable, say, concentration) and then the interval where the variable is taken from the start value to the end value. Now when the step function is declared say as an initial value the syntax is step(argument). Since the argument i have chose is radical distance, it should be declared as step(r). It works out

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.