You may want to define loads, material properties, or boundary conditions that vary abruptly with respect to the solution, or with respect to time. This can, however, lead to a solution which is discontinuous in space and/or time, which can be difficult to solve.
The resolution here is to use smoothed step functions. There are several built-in functions that include a smoothing option. This smoothing can be either first-order or second-order continuous. Second-order is the default and is appropriate in most cases. The functions that include smoothing are: Ramp, Rectangle, Step, Triangle, Waveform (of type Sawtooth, Square, or Rectangle) and Piecewise. The interfaces for the Step and Piecewise functions, as well as a visualization of the resultant smoothed functions, are shown in the screenshots below.
The Step Function interface and the resultant Smoothed Step function.
The Piecewise Function Interface.
The Resultant Smoothed Piecewise Function.
Smoothed step functions, as well as other functions, can be defined at the Global level, within the Definitions branch of a Component within the model, or within the Materials property definitions depending upon the desired scope of the function.
COMSOL makes every reasonable effort to verify the information you view on this page. Resources and documents are provided for your information only, and COMSOL makes no explicit or implied claims to their validity. COMSOL does not assume any legal liability for the accuracy of the data disclosed. Any trademarks referenced in this document are the property of their respective owners. Consult your product manuals for complete trademark details.