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.

How to call an analytical function for a boundary condition

Please login with a confirmed email address before reporting spam

Hello,

I'm studying the thermal evolution of a "mass stove". I considered a hollow cylinder with r_i and r_e as inner and outer radius, respectively. I would like to have a temporal dependent boudary condition on r_i which represent the heat flux due to the combustion. This function is : 1750*t*exp(-0.002*t)/100 . I define this analytical function in the component section. And my question is : how to call this function when I set the heat flux on the boudary. It seems only accept a Value and not an analytical expression as input.

Thank you for your answers !



2 Replies Last Post 29.02.2024, 10:29 GMT-5
Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 months ago 29.02.2024, 08:57 GMT-5

Salut Bertrand,

This sounds strange to me. Either you could just type the expression directly as a general inward heat flux:

1750[W/m^2]*t*exp(-0.002[1/s]*t)/100[s]

(here I have assigned some units to avoid unit warnings, but I'm not sure if it's correct.)

Or you could also define an analytic function, say an1, as the expression

1750[W/m^2]*x*exp(-0.002[1/s]*x)/100[s]

and an argument x with the unit s. Then call it in the text field for the heat flux as an1(t) in a time-dependent simulations.

Both cases should work.

Best regards,

Magnus

Salut Bertrand, This sounds strange to me. Either you could just type the expression directly as a general inward heat flux: `1750[W/m^2]*t*exp(-0.002[1/s]*t)/100[s]` (here I have assigned some units to avoid unit warnings, but I'm not sure if it's correct.) Or you could also define an analytic function, say `an1`, as the expression `1750[W/m^2]*x*exp(-0.002[1/s]*x)/100[s]` and an argument `x` with the unit `s`. Then call it in the text field for the heat flux as `an1(t)` in a time-dependent simulations. Both cases should work. Best regards, Magnus

Please login with a confirmed email address before reporting spam

Posted: 9 months ago 29.02.2024, 10:29 GMT-5

Thank you ! It works now with your first option.

Have a nice day !

Bertrand

Thank you ! It works now with your first option. Have a nice day ! Bertrand

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.