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.
Defining a Piecewise function of two variables
Posted Dec 3, 2012, 1:03 p.m. EST 2 Replies
Please login with a confirmed email address before reporting spam
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
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
2 Replies Last Post Dec 3, 2012, 4:17 p.m. EST