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 Feb 29, 2024, 10:29 a.m. EST
Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 months ago Feb 29, 2024, 8:57 a.m. EST

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: 2 months ago Feb 29, 2024, 10:29 a.m. EST

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

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.