Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Use of the "IF" Operator in a Diffusion model

Please login with a confirmed email address before reporting spam

Greetings!

I am simulating the diffusion of water into a paint film and want to define a maximum concentration.

I guess that I can do that by the operator "IF(c_H2O ,X ,X ,c_H2O)"
as I want the concentration to rise until it reaches the maximum value.

However I don't know where I have to put the operator.

I have also tried to define a variable with the operator as expression, but it will not show up in the results.

I hope you can help me. Thanks!

1 Reply Last Post Mar 21, 2012, 2:14 p.m. EDT
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 21, 2012, 2:14 p.m. EDT
Hi

I'm not sure I catch you fully there, if you want to saturate a BC, use rather a step function, but if you want to ensure that your dependent variale in your domain is saturating, you need to tweak the equations or the material properties such that you saurate the solution. Your concentration, as solution is driven by the equations, and not the other way around, sofor me, you must attack the problem on the driver side, i.e. BC or materials ,or directly the equations

--
Good luck
Ivar
Hi I'm not sure I catch you fully there, if you want to saturate a BC, use rather a step function, but if you want to ensure that your dependent variale in your domain is saturating, you need to tweak the equations or the material properties such that you saurate the solution. Your concentration, as solution is driven by the equations, and not the other way around, sofor me, you must attack the problem on the driver side, i.e. BC or materials ,or directly the equations -- Good luck Ivar

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.