Link part of model to experimental temperature data

Please login with a confirmed email address before reporting spam

Hi All,

I am trying to have one part of my model follow some temperature data I have from a test. I have the data as a .csv with one column as time and the other as temperature in Kelvin. I created a global interpolation function and imported the data. When I plot the function it looks as expected.

I created a parameter and set its value as the function (I called the function temp so I put temp(t)). I then created a Temperature boundary condition in the Heat Transfer section of the model builder and set the temperature value there to that of the parameter.

When I run the model (I have it as being time dependent), the boundaries I selected remain the temperature of the first entry in the data for the whole simulation. The default initial temperature I have set for the entire domain is different, so I know that it is somehow reading in the first value, just not stepping through the rest of them. I ran a smaller time step set sometime in the middle of the data I have and the boundary temperature was still the temperature in the first time step, not even the temperature at the beginning of the smaller temperature range.

Thus far I have tried setting the temperature in my boundary to the function directly (i.e. not using the parameter) which had no discernible effect. I also tried using a .txt file instead of a .csv with the same data, and nothing changed.

Any advice/help would be greatly appreciated! Thanks


1 Reply Last Post 04.03.2025, 17:07 GMT-5
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 month ago 04.03.2025, 17:07 GMT-5
Updated: 1 month ago 05.03.2025, 08:16 GMT-5

Not sure why you used a parameter. Parameters can't change with time (or in space).

Why you don't get the behavior you expect when you enter temp(t) directly is less obvious. One possibility is that you have very different timescales for your data and computational time. Please consider posting the mph file in question if that does not resolve it.

Best,

Jeff

-------------------
Jeff Hiller
Not sure why you used a parameter. Parameters can't change with time (or in space). Why you don't get the behavior you expect when you enter temp(t) directly is less obvious. One possibility is that you have very different timescales for your data and computational time. Please consider posting the mph file in question if that does not resolve it. Best, Jeff

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

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.