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.

Writing a 'if' function for the surface boundary condition

Please login with a confirmed email address before reporting spam

Hello everyone

İ want to make a boundary condition for a density change according to temperature on the surface.İ made a PDE(using heat equation for both i just changed the units for the density) for heat and density one of them calculates temperature and the other uses the results of the first PDE to find density.

İ found out that i can type u(result of the first equation) in the second equations boundary condition as a function to find u1(density result).

So my question is for the surface density i want it to take the temperature for the respecting time step and use that temperature to find density at that respective time but if the result for density on the surface is higher than 0.1 i dont want it to use that result instead i want it to take the density 0.1 at that time step.

So i wrote something like this and hoped it would work bu it didnt :(

min(611*exp(-6141.207601636*((1/u)-0.003660858105)),0.1)

İ hope i did explain myself i just couldnt figure it out if someone could help me that would be great .

PS when i wrote like min(1,0) it gives me the result of 0 maybe its because one ofe the function parameter is a function as well but i dont know i hope i can do something like that on COMSOL.

0 Replies Last Post 07.08.2015, 09:57 GMT-4
COMSOL Moderator

Hello Hakan Tarık Meriç

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

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.