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.

Using geometry values in physics boundary conditions

Please login with a confirmed email address before reporting spam

Hi all,

I have tried to look around but have not figured out a way to do this. I would like to use a geometry value (i.e. the surface area of an ellipsoid) to define the flux boundary condition through that ellipsoid. For simple structures I can calculate this by hand but it never seems to come out right in comsol in the results... it would be nice to do this within comsol for when the geometry gets more complicated and to eliminate this error. More specifically, I have a total flux in number of molecules per second, but the boundary condition in comsol only accepts mol/m^2s. If my flux is say, 500 molecules per second, I would like to be able to put say '500 / boundary area' as my flux. Suggestions?
Thanks,

2 Replies Last Post Feb 4, 2013, 7:37 p.m. EST

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 4, 2013, 7:25 p.m. EST
Figured out (partially) how to do what I wanted. Realized that you can set up integral functions in the definitions section of a model that can be used in all parts of the model. So now I am doing a surface integral over my area and dividing as desired. However, I am not getting the answer that I expect to get and I am not sure if this is due to rounding or other errors in COMSOL or some fundamental problem.

For flux I am using:
300[1/s]/6.02e23[1/mol]/intop1(1)

where intop1 is the surface integral over the boundary releasing molecules.

However, when I solve the model, if I then integrate flux over the same boundary, and multiply by avogadros constant, I get 252molecules/s instead of the 300/second that I would expect based on the formula that I entered.
Figured out (partially) how to do what I wanted. Realized that you can set up integral functions in the definitions section of a model that can be used in all parts of the model. So now I am doing a surface integral over my area and dividing as desired. However, I am not getting the answer that I expect to get and I am not sure if this is due to rounding or other errors in COMSOL or some fundamental problem. For flux I am using: 300[1/s]/6.02e23[1/mol]/intop1(1) where intop1 is the surface integral over the boundary releasing molecules. However, when I solve the model, if I then integrate flux over the same boundary, and multiply by avogadros constant, I get 252molecules/s instead of the 300/second that I would expect based on the formula that I entered.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 4, 2013, 7:37 p.m. EST
Looks like the result gets more accurate the more I refine the mesh, which makes sense, since the intop1 value will be an analytical result over a perfect ellipsoid and the model result will be an ellipsoid mapped with triangular elements. I am looking for a way now to locally refine the mesh (it's a 3d model) only around the ellipsoid. Is there a way to do this?
Looks like the result gets more accurate the more I refine the mesh, which makes sense, since the intop1 value will be an analytical result over a perfect ellipsoid and the model result will be an ellipsoid mapped with triangular elements. I am looking for a way now to locally refine the mesh (it's a 3d model) only around the ellipsoid. Is there a way to do this?

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.