Quantcast
Channel: Latest Discussions - COMSOL Forums
Viewing all articles
Browse latest Browse all 26527

Defining a Piecewise function of two variables

$
0
0
Hello,

I am trying to model NMR diffusion in COMSOL 4.3 and need to define a function beta at three different time intervals as follows:

beta = gyro*(g*x) (0 < t < 0.016s)
beta = 0 (0.016s < t < 0.040s)
beta = gyro*(-g*x) (0.040s < t < 0.056s)

x is the displacement in (m) and gyro and g are constants

I have defined three analytic functions for beta as functions of x. I am not sure how to use this to define a piecewise function for the three different time intervals. I am new to COMSOL and would be really grateful for any help with this.

Thank you,

Caroline

Viewing all articles
Browse latest Browse all 26527

Trending Articles