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
14 août 2011, 11:07 UTC−4
Hi
any field in COMSOL (at least 99% of them) accept not only a value or a parameter, but also a function of the type
myConcentration_function(t[1/s])
note the "t[1/s]" to define the time t in seconds, but as a unitless value (just incase your t was in minutes or hours). normally all operators using variables need to be entered "unitless" hence should be multiplied by a [1/specific_unit]
So if you use the time dependent "transient" solver, define the conentration as a function of time, you do not need to define it as a "Definition- function", but you can also write it out as a equation such as:
Concentration = MyBasicConc + MyIncreasingConc*t + My2ndConCentr*t^2 ...
Note: check the units for your formulas: if flagged in orange, there is something missing, red there is an error, but sometimes you need to go out of the node and back to get the error flaging reset
Most important, be sure your functions are at least 2*derivables/ continuous as COMSOL uses the gradients for its solving optimisation, and if these are spiky the solution diverges easily. Xou have the step and puls, or Gausssian predefined functions, that smoothes in a "Heaviside" way the sharp steps. Dirac functions are to be avoided.
Lat advice: get hands on the latest v4.2 and patch it to latest update, te 4.0 was a first release and is not really ironed out
--
Good luck
Ivar
Hi
any field in COMSOL (at least 99% of them) accept not only a value or a parameter, but also a function of the type
myConcentration_function(t[1/s])
note the "t[1/s]" to define the time t in seconds, but as a unitless value (just incase your t was in minutes or hours). normally all operators using variables need to be entered "unitless" hence should be multiplied by a [1/specific_unit]
So if you use the time dependent "transient" solver, define the conentration as a function of time, you do not need to define it as a "Definition- function", but you can also write it out as a equation such as:
Concentration = MyBasicConc + MyIncreasingConc*t + My2ndConCentr*t^2 ...
Note: check the units for your formulas: if flagged in orange, there is something missing, red there is an error, but sometimes you need to go out of the node and back to get the error flaging reset
Most important, be sure your functions are at least 2*derivables/ continuous as COMSOL uses the gradients for its solving optimisation, and if these are spiky the solution diverges easily. Xou have the step and puls, or Gausssian predefined functions, that smoothes in a "Heaviside" way the sharp steps. Dirac functions are to be avoided.
Lat advice: get hands on the latest v4.2 and patch it to latest update, te 4.0 was a first release and is not really ironed out
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
14 août 2011, 22:34 UTC−4
Hi
Thank you for your nice~
Firstly, I have been set up the paramters which are related to concentration variable and added the concentration to "concentration" edge. As a result , the edges are the more deep color in diffusion model as attached file, but I want to set up the concentration variabe for the domain which is in the edge that i have mentioned. What should I do? Add the PDE equation or something else?
Secondly, now i use 'diffusion' model to simulate the process that the bigger molecular diffusions from the vessels through vessel walls (the much deeper edges). Should i set up the 'permeability' for vessel wall and what should i do? I have saw the 'permeability' properties in material, but it is in 'Output properties',so I think it is not right.
Thank you~
Hi
Thank you for your nice~
Firstly, I have been set up the paramters which are related to concentration variable and added the concentration to "concentration" edge. As a result , the edges are the more deep color in diffusion model as attached file, but I want to set up the concentration variabe for the domain which is in the edge that i have mentioned. What should I do? Add the PDE equation or something else?
Secondly, now i use 'diffusion' model to simulate the process that the bigger molecular diffusions from the vessels through vessel walls (the much deeper edges). Should i set up the 'permeability' for vessel wall and what should i do? I have saw the 'permeability' properties in material, but it is in 'Output properties',so I think it is not right.
Thank you~
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
15 août 2011, 01:34 UTC−4
Hi
Indeed I would not define a concetration on the edges, but only on/for the domain(s), this should work at least for v4.2 (rather forget the earlier releases, and make your model fully from scratch in v4.2 or later, I do not relly trust 100% the tranlations between these earlier v4 versions, even if the COMSOL programmers, I admit, have done a hard job to get them compatible)
Normally, if the walls/edges/boundaries do not have any specific properties by themselves, you should "just" leave them with default "continuity" properties and work on the domains.
However if they represent "thin features" i.e. a semipermeable membrane you must adapt the boundary physics and paramaters accordingly
--
Good luck
Ivar
Hi
Indeed I would not define a concetration on the edges, but only on/for the domain(s), this should work at least for v4.2 (rather forget the earlier releases, and make your model fully from scratch in v4.2 or later, I do not relly trust 100% the tranlations between these earlier v4 versions, even if the COMSOL programmers, I admit, have done a hard job to get them compatible)
Normally, if the walls/edges/boundaries do not have any specific properties by themselves, you should "just" leave them with default "continuity" properties and work on the domains.
However if they represent "thin features" i.e. a semipermeable membrane you must adapt the boundary physics and paramaters accordingly
--
Good luck
Ivar