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.

Unit inconsistency between geometry and physics

Please login with a confirmed email address before reporting spam

I am running a very simple 2D axi. model of a resistor. The problem was that my results were scaled completely wrong, but I found the source of the problem: My geometry length unit was set to 'mm' but the model unit system is set to SI.

I designed a small cylinder with a length of 5mm and other dimensions at the same scale. All of the materials and physics are in SI, so the material conductivity was in S/m. So after solving the model and evaluating a volume integral of the power dissipation, my results were way off the charts! Given that it was orders of magnitude, I figured it had to do with units. I changed the geometry units to 'm' (now the cylinder is 0.005m long), and voila, the solution is correct! Is there some sort of disconnect between the geometry units and physics units or am I missing something simple?

Does this mean that If I want to design my geometry in something other than the model units system (SI) then I have to go to the geometry node, select 'scale values when changing units', then change the length unit to 'm' (in my case) before running the simulation? Does not seem intuitive.


6 Replies Last Post 18 apr 2012, 12:43 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 17 apr 2012, 16:25 GMT-4
I don't use 'scale values when changing units' and my geometry is in nm. For physics, I use SI. Everything works as suppose to. Probably you are not being consistent and some other parts of your problem require scaling as well (such as current density)
I don't use 'scale values when changing units' and my geometry is in nm. For physics, I use SI. Everything works as suppose to. Probably you are not being consistent and some other parts of your problem require scaling as well (such as current density)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 17 apr 2012, 17:26 GMT-4
Hmm, it appears to be a problem with the just the volume integration, because the current density and other solved variables appear to be to scale. I'll look further into it.
Hmm, it appears to be a problem with the just the volume integration, because the current density and other solved variables appear to be to scale. I'll look further into it.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 18 apr 2012, 10:35 GMT-4
I ran the above model again and it looks like the problem is with the volume integration of a revolved 2D axisymmetric solution. If you create your geometry in mm scale and the model system is SI, doing a derived value volume integration gives incorrectly scaled results.

For example, I set the geometry units to m, computed the solution, then calculated the volume integration of 1 over the revolved solution and I got 1.436e-8 m^3 for the volume. (correct) I changed the geometry units to mm (scaling values along with it), and with the same model, I got 14.36 m^3. In both cases, the solved values (like current density) in the revolved solutions for each are otherwise correct.

Seems like a bug with volume integration of 2D axisymmetric. I have the same problem if in the GUI I create an integral of the revolved solution, then do a global evaluation of 1 of that integral solution.
I ran the above model again and it looks like the problem is with the volume integration of a revolved 2D axisymmetric solution. If you create your geometry in mm scale and the model system is SI, doing a derived value volume integration gives incorrectly scaled results. For example, I set the geometry units to m, computed the solution, then calculated the volume integration of 1 over the revolved solution and I got 1.436e-8 m^3 for the volume. (correct) I changed the geometry units to mm (scaling values along with it), and with the same model, I got 14.36 m^3. In both cases, the solved values (like current density) in the revolved solutions for each are otherwise correct. Seems like a bug with volume integration of 2D axisymmetric. I have the same problem if in the GUI I create an integral of the revolved solution, then do a global evaluation of 1 of that integral solution.


Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 18 apr 2012, 10:58 GMT-4
Hello Evan,
Did you make sure to rerun the solver (or to update the solution) after you changed the geometry units? That's necessary for the change to be reflected in your Results node.
JF
Hello Evan, Did you make sure to rerun the solver (or to update the solution) after you changed the geometry units? That's necessary for the change to be reflected in your Results node. JF

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 18 apr 2012, 11:36 GMT-4
Yes, I re-ran the solution each time.
Yes, I re-ran the solution each time.

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 18 apr 2012, 12:43 GMT-4
I am not able to reproduce this problem using version 4.2.1.166, which is v4.2a with all updates installed. Feel free to contact support if the problem persists on your machine.
I am not able to reproduce this problem using version 4.2.1.166, which is v4.2a with all updates installed. Feel free to contact support if the problem persists on your machine.

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.