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.

Changing Material Properties during transient runs (COMSOL Livelink)

Please login with a confirmed email address before reporting spam

Hello all,

I am currently working on a script in COMSOL Livelink and while I have everything working, I was wondering....

Is there a way that I can start up a transient run for say 10ns, pause the run and change the material parameters (i.e. the conductivity of one segment), and pick right back up from the 10ns point using the new parameter for the system? This is specifically using a COMSOL Livelink script that is being run in MATLAB.


4 Replies Last Post 10.10.2022, 13:41 GMT-4
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 10.10.2022, 11:57 GMT-4

Hi William,

Why not make the material property(ies) function(s) of time (t) instead of using parameters? This way you wouldn't even ned to pause the run at 10[ns].

Jeff

-------------------
Jeff Hiller
Hi William, Why not make the material property(ies) function(s) of time (t) instead of using parameters? This way you wouldn't even ned to pause the run at 10[ns]. Jeff

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 10.10.2022, 12:06 GMT-4

Hi William,

Why not make the material property(ies) function(s) of time (t) instead of using parameters? This way you wouldn't even ned to pause the run at 10[ns].

Jeff

Hi Jeff, I thought of this idea but I run into two proiblems. 1) I don't have an analytical expression of what the conductivity should be at various points. The change is dependent on the results of the system. 2) I don't necessarily know WHEN the properties should change.

>Hi William, > >Why not make the material property(ies) function(s) of time (t) instead of using parameters? This way you wouldn't even ned to pause the run at 10[ns]. > >Jeff Hi Jeff, I thought of this idea but I run into two proiblems. 1) I don't have an analytical expression of what the conductivity should be at various points. The change is dependent on the results of the system. 2) I don't necessarily know WHEN the properties should change.

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 10.10.2022, 13:25 GMT-4
Updated: 2 years ago 10.10.2022, 13:42 GMT-4

OK, but you could still define your conductivity using a single expression that switches between two different expressions (which don't have to be analytical - could be interpolation functions) depending on whether your particular criterion (which does not need to be explicitly defined as a time) is reached. Something conceptually like this:

expression1+(expression2-expression1)*criterion

In any case, as an alternative approach, you may also want to look into Events, see this blog for an example.

Best,

Jeff

-------------------
Jeff Hiller
OK, but you could still define your conductivity using a single expression that switches between two different expressions (which don't have to be analytical - could be interpolation functions) depending on whether your particular criterion (which does not need to be explicitly defined as a time) is reached. Something conceptually like this: expression1+(expression2-expression1)*criterion In any case, as an alternative approach, you may also want to look into Events, see [this blog](https://www.comsol.com/blogs/implementing-a-thermostat-with-the-events-interface/) for an example. Best, Jeff

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 10.10.2022, 13:41 GMT-4

OK, but you could still define your conductivity using a single expression that switches between two different expressions (which don't have to be analytical - could be interpolation functions) depending on whether your particular criterion (which does not need to be explicitly defined as a time) is reached.

In any case, as an alternative approach, you may also want to look into Events, see this blog for an example.

Best,

Jeff

Jeff, This looks like a promising potential tool and may be exactly what I'm looking for. Thank you for this!!!

>OK, but you could still define your conductivity using a single expression that switches between two different expressions (which don't have to be analytical - could be interpolation functions) depending on whether your particular criterion (which does not need to be explicitly defined as a time) is reached. > >In any case, as an alternative approach, you may also want to look into Events, see [this blog](https://www.comsol.com/blogs/implementing-a-thermostat-with-the-events-interface/) for an example. > >Best, > >Jeff Jeff, This looks like a promising potential tool and may be exactly what I'm looking for. Thank you for this!!!

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.