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
22 juil. 2010, 16:53 UTC−4
Hi
COMSOL is set up for default ISO SI units, but you can always normalise at will, this does thouh oblige you to define the conversions correctly yourself (as parameters or new variables) and make them consistent.
For me, as engineer (now before scientist) I like to use the units to know what Im doing, and as dimension checks for coherence`, otherwise it`s very easy to get "stupid" errors on the values (i.e. loads are systematically set up as pressures not Forces, units helps to verify this)
--
Good luck
Ivar
Hi
COMSOL is set up for default ISO SI units, but you can always normalise at will, this does thouh oblige you to define the conversions correctly yourself (as parameters or new variables) and make them consistent.
For me, as engineer (now before scientist) I like to use the units to know what Im doing, and as dimension checks for coherence`, otherwise it`s very easy to get "stupid" errors on the values (i.e. loads are systematically set up as pressures not Forces, units helps to verify this)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
20 août 2010, 22:46 UTC−4
But for many of us who are in academia, dimensionless calculations make much more sense. I understand that for students or beginners, checking unit may be a way of verification, but what if my unit of time is "1" which means 1 cycle, and my unit of energy is also "1" which means 1kT? The results are coherent and they mean a group of results at different frequencies or temperatures. You may tell me that you have Boltzmann constant defined and I can always work with it. Sure, but I want the result to be 1 when it is of physical sense, rather than 1.38e-23*273.
Could you please put the option "dimensionless/no unit" back, maybe in the next version?
But for many of us who are in academia, dimensionless calculations make much more sense. I understand that for students or beginners, checking unit may be a way of verification, but what if my unit of time is "1" which means 1 cycle, and my unit of energy is also "1" which means 1kT? The results are coherent and they mean a group of results at different frequencies or temperatures. You may tell me that you have Boltzmann constant defined and I can always work with it. Sure, but I want the result to be 1 when it is of physical sense, rather than 1.38e-23*273.
Could you please put the option "dimensionless/no unit" back, maybe in the next version?
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
22 août 2010, 14:18 UTC−4
Hi
I would add that for us in the engineering domain, units are essential for coherence checks, I have burnt my finger too often on units of "1".
But if you work in a specific domain, and doing mainly theory, I can fully follow the arguments for your demand and need.
What I still cannot understand is why you cannot define a set of constants to make things unitless, but I suspect that you must do this physics by physics, as the Plasma Physics c=1 is not exactly in line with the EM guy c=1 (speed of light) etc
--
Good luck
Ivar
Hi
I would add that for us in the engineering domain, units are essential for coherence checks, I have burnt my finger too often on units of "1".
But if you work in a specific domain, and doing mainly theory, I can fully follow the arguments for your demand and need.
What I still cannot understand is why you cannot define a set of constants to make things unitless, but I suspect that you must do this physics by physics, as the Plasma Physics c=1 is not exactly in line with the EM guy c=1 (speed of light) etc
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
22 août 2010, 14:57 UTC−4
Hi Ivar,
In class, we ask (engineering) students to do dimensional analysis before doing any kind of calculation, especially numerical. If a parameter can be absorbed in groups of dimensionless variables, and does not appear explicitly, it is not essential. The result may either be independent of this parameter, or scale with this parameter. Then it becomes pointless (at least in classroom) to ask what the value of this parameter is. The same result can be used for the whole class of problems. We believe this is an important practice, similar (or maybe even more important than) as the coherency of units. If an equation is written in a dimensionless form (everything is dimensionless in units of 1), the unit system is automatically coherent. I believe you did not really work in dimensionless when you "burned your finger by using unit 1". If you make everything dimensionless, then you are always safe. It's unsafe only when blending pure numbers with things with units.
In addition, the number of independent parameters are reduced. Another benefit is that when a real problem is made dimensionless, all numbers are close to the order of 1, and the numerical procedure tends to be more stable (and accurate) - I believe you call this scaling.
Yes we can sort of doing that by assuming some constants. In principal, we may assume any number, like c=1m^2/s, since it wouldn't change the result anyway, but it looks weird with a unit. We can also put in realistic number, but it may confuse the students even more - they may think that all these numbers are important and forget the dimensional analysis. If they are asked to do a parametric study, they may (or they have to in COMSOL 4.0) vary all parameters one by one, but forget that they are connected and maybe varying only one dimensionless combination would be enough.
The dimensionless option in 3.5 is not a default setup and it not that easy to reach anyway. I don't think a beginner would take the pain to find and check the dimensionless option in order to help his careless incoherent calculation.
Wei
Hi Ivar,
In class, we ask (engineering) students to do dimensional analysis before doing any kind of calculation, especially numerical. If a parameter can be absorbed in groups of dimensionless variables, and does not appear explicitly, it is not essential. The result may either be independent of this parameter, or scale with this parameter. Then it becomes pointless (at least in classroom) to ask what the value of this parameter is. The same result can be used for the whole class of problems. We believe this is an important practice, similar (or maybe even more important than) as the coherency of units. If an equation is written in a dimensionless form (everything is dimensionless in units of 1), the unit system is automatically coherent. I believe you did not really work in dimensionless when you "burned your finger by using unit 1". If you make everything dimensionless, then you are always safe. It's unsafe only when blending pure numbers with things with units.
In addition, the number of independent parameters are reduced. Another benefit is that when a real problem is made dimensionless, all numbers are close to the order of 1, and the numerical procedure tends to be more stable (and accurate) - I believe you call this scaling.
Yes we can sort of doing that by assuming some constants. In principal, we may assume any number, like c=1m^2/s, since it wouldn't change the result anyway, but it looks weird with a unit. We can also put in realistic number, but it may confuse the students even more - they may think that all these numbers are important and forget the dimensional analysis. If they are asked to do a parametric study, they may (or they have to in COMSOL 4.0) vary all parameters one by one, but forget that they are connected and maybe varying only one dimensionless combination would be enough.
The dimensionless option in 3.5 is not a default setup and it not that easy to reach anyway. I don't think a beginner would take the pain to find and check the dimensionless option in order to help his careless incoherent calculation.
Wei
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
22 août 2010, 17:06 UTC−4
Hi
do not misunderstand me, I fully agree that you can do ecellent work "dimensionless" and its worth to be able too, also with COMSOL.
It's only that when you need to build something, to design an experience you need to get back to reasonnable "engineering units" that is where I see the issues (and have got burned ;)
I agree too that in 3.5 the units did not port all over, it's far better in V4 (still to be improved I agree again) but how many times have I seen models on the forum with [N] instead of [Pa] ? and rather wrong results, I cant count them.
Now I'm not COMSOL so you must manage to convince "support", not me :)
My advice would be go to the next conference and discuss it directly with the COSMOL Mathematicians and Physicists, they listen to us users, but cannot implement everything.
Another way is to set up the required constants as files you call in, if you have students (what I do not have) set them to define the constants needed per physics, and then post it on the model exchange, there are a few threads about lack of "dimensionless" units already, so there are certainly others out there too
Finally, scaling is important, but I trust COMSOL as they do it internally, with some exceptions (i.e. weak forms often) where you need to check and sometimes help manually.
One of the difficulties for COMSOL developperes, is to handle the very different set of users and their respective demands, from the theoreticians, mathematicians, physicists, as well as the more applied engineers.
Personally I find COMSOL still "weak" in a field as "trivial" as structural mechanics, not in the possibilities proposed, but in the easy and speed to implement them, I agree it's "just" to write in the equations, but they tend to become long and error prone in those small windows, and when your boss wants a flawless response by yesterday, you do not really have time to write and check all those equations, then other tools more of the type "clickable engineering" become tempting, but they do not do multiphysics :)
--
Have fun Comsoling
Ivar
Hi
do not misunderstand me, I fully agree that you can do ecellent work "dimensionless" and its worth to be able too, also with COMSOL.
It's only that when you need to build something, to design an experience you need to get back to reasonnable "engineering units" that is where I see the issues (and have got burned ;)
I agree too that in 3.5 the units did not port all over, it's far better in V4 (still to be improved I agree again) but how many times have I seen models on the forum with [N] instead of [Pa] ? and rather wrong results, I cant count them.
Now I'm not COMSOL so you must manage to convince "support", not me :)
My advice would be go to the next conference and discuss it directly with the COSMOL Mathematicians and Physicists, they listen to us users, but cannot implement everything.
Another way is to set up the required constants as files you call in, if you have students (what I do not have) set them to define the constants needed per physics, and then post it on the model exchange, there are a few threads about lack of "dimensionless" units already, so there are certainly others out there too
Finally, scaling is important, but I trust COMSOL as they do it internally, with some exceptions (i.e. weak forms often) where you need to check and sometimes help manually.
One of the difficulties for COMSOL developperes, is to handle the very different set of users and their respective demands, from the theoreticians, mathematicians, physicists, as well as the more applied engineers.
Personally I find COMSOL still "weak" in a field as "trivial" as structural mechanics, not in the possibilities proposed, but in the easy and speed to implement them, I agree it's "just" to write in the equations, but they tend to become long and error prone in those small windows, and when your boss wants a flawless response by yesterday, you do not really have time to write and check all those equations, then other tools more of the type "clickable engineering" become tempting, but they do not do multiphysics :)
--
Have fun Comsoling
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
23 août 2010, 02:01 UTC−4
As an academic, I appreciate the elegance of the unitless approach for theoretical work. However, as a matter of practice, the overwhelming majority of errors I make/see committed by others in manipulating equations in the end boil down to incorrect dimensions or dimensionally inconsistent terms in the original equations. (With Comsol,I would add boundary conditions to this list.) If, in developing a model, everything is expressed correctly with units and the model actually made to work, then re-expressed in dimensionless form, then all is OK going forward if no additional changes are made. Of course, one is still faced with going back the other way, from dimensionless to dimensional form to translate to the "real world. From my experience (not with Comsol) keeping units during the development phase helps prevent a lot of problems.
I'm still somewhat of a novice with Comsol, but one of the things I was pleasantly surprised to find is its ability to carry the physical dimensions along with the actual numerical quantities and to raise a flag if something is dimensionally incorrect. If one has dozens of variables or global definitions that are interdependent, it's easy to make entry errors, as it is also in any of the several dialog boxes requiring expressions involving these variables, or some function of them. This red/orange flagging has been immensely helpful in detecting when errors are made (thank you Comsol), especially given the otherwise less than useful error reporting. A purely dimensionless formulation would seem to lack this very useful functionality.
Perhaps some sort of toggle could be included in a future release that allows one to set up a model in dimensional form, and then after identifying the appropriate scaling parameters toggle to a dimensionless form, as well as going the other way, of course. I can see where that would be very useful.
As an academic, I appreciate the elegance of the unitless approach for theoretical work. However, as a matter of practice, the overwhelming majority of errors I make/see committed by others in manipulating equations in the end boil down to incorrect dimensions or dimensionally inconsistent terms in the original equations. (With Comsol,I would add boundary conditions to this list.) If, in developing a model, everything is expressed correctly with units and the model actually made to work, then re-expressed in dimensionless form, then all is OK going forward if no additional changes are made. Of course, one is still faced with going back the other way, from dimensionless to dimensional form to translate to the "real world. From my experience (not with Comsol) keeping units during the development phase helps prevent a lot of problems.
I'm still somewhat of a novice with Comsol, but one of the things I was pleasantly surprised to find is its ability to carry the physical dimensions along with the actual numerical quantities and to raise a flag if something is dimensionally incorrect. If one has dozens of variables or global definitions that are interdependent, it's easy to make entry errors, as it is also in any of the several dialog boxes requiring expressions involving these variables, or some function of them. This red/orange flagging has been immensely helpful in detecting when errors are made (thank you Comsol), especially given the otherwise less than useful error reporting. A purely dimensionless formulation would seem to lack this very useful functionality.
Perhaps some sort of toggle could be included in a future release that allows one to set up a model in dimensional form, and then after identifying the appropriate scaling parameters toggle to a dimensionless form, as well as going the other way, of course. I can see where that would be very useful.
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
23 août 2010, 10:04 UTC−4
Thank you to all for your input and replies. In addition to the discussion at large about using dimensional equations or not - I have a seemingly simple question. When I add a PDE General form physics expression to my model, where/how do I set what units the dependent variable contains? If I specify that I want to use the Diffusion physics, the dependent variable (whatever I choose to name it) carries units of concentration. I suspect the units are taken from the initial values, but I am not sure.
To add to the discussion: I am a graduate student and certainly value the ability of COMSOL to check the units that I have entered for my variables. However, the majority of literature articles that I read discuss the equations in a dimensionless form because it provides information on how the PDE is arranged, the type, and perhaps the most economical way to solve it. It can also give us information (while solving) if the solution to the PDE is going to change form - perhaps from elliptic to parabolic, or vice versa.
It doesn't seem to be such a stretch to implement the "lack of units." I believe this only needs to be implemented in the time domain (i.e. define your definition of dimensionless time) and in the geometry. If the geometry can be produced without introducing a length scale, then the gradients of the dependent (and dimensionless) variables will not contain any units.
Another Idea: Perhaps instead of implementing this across the entire software package, a new PDE instance should be added - one that does not look at the units of time or geometry. That way, should an engineer or an academic choose to solve the scaled equation, they can enter their General Form or Coefficient Form, etc. In the end, I believe it should still be up to the user to properly define their system of equations.
Thanks again for all of your input.
Thank you to all for your input and replies. In addition to the discussion at large about using dimensional equations or not - I have a seemingly simple question. When I add a PDE General form physics expression to my model, where/how do I set what units the dependent variable contains? If I specify that I want to use the Diffusion physics, the dependent variable (whatever I choose to name it) carries units of concentration. I suspect the units are taken from the initial values, but I am not sure.
To add to the discussion: I am a graduate student and certainly value the ability of COMSOL to check the units that I have entered for my variables. However, the majority of literature articles that I read discuss the equations in a dimensionless form because it provides information on how the PDE is arranged, the type, and perhaps the most economical way to solve it. It can also give us information (while solving) if the solution to the PDE is going to change form - perhaps from elliptic to parabolic, or vice versa.
It doesn't seem to be such a stretch to implement the "lack of units." I believe this only needs to be implemented in the time domain (i.e. define your definition of dimensionless time) and in the geometry. If the geometry can be produced without introducing a length scale, then the gradients of the dependent (and dimensionless) variables will not contain any units.
Another Idea: Perhaps instead of implementing this across the entire software package, a new PDE instance should be added - one that does not look at the units of time or geometry. That way, should an engineer or an academic choose to solve the scaled equation, they can enter their General Form or Coefficient Form, etc. In the end, I believe it should still be up to the user to properly define their system of equations.
Thanks again for all of your input.
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
23 août 2010, 12:17 UTC−4
Hi Mark,
What you have just described (literature articles using dimensionless forms) is a fact of life that is the source of much spirited debate. Theorists struggle with abstract properties of equations and working in dimensionless forms is natural in this world. On the other hand, experimenters deal with real world observations, which involve dimensional quantities. Modelers are charged with reconciling theory and observations, so are caught in the middle - hence this discussion. Get used to being involved in discussions of this type, as they are likely to be an ever present part of your career.
It appears that the dimensions/units of the dependent variables are built into the various Modules by the developers. If you are spinning your own, say by using a PDE form starting from scratch, it appears that the units of the dependent variables are taken from a combination of the initial/boundary conditions and/or source terms, if these are expressed in dimensional form, and any inconsistency that might exist is flagged. [At any rate I haven't found a place where units can be explicitly specified for dependent variables. Perhaps a(the) moderator(s) could clarify/comment on the situation here.]
Hi Mark,
What you have just described (literature articles using dimensionless forms) is a fact of life that is the source of much spirited debate. Theorists struggle with abstract properties of equations and working in dimensionless forms is natural in this world. On the other hand, experimenters deal with real world observations, which involve dimensional quantities. Modelers are charged with reconciling theory and observations, so are caught in the middle - hence this discussion. Get used to being involved in discussions of this type, as they are likely to be an ever present part of your career.
It appears that the dimensions/units of the dependent variables are built into the various Modules by the developers. If you are spinning your own, say by using a PDE form starting from scratch, it appears that the units of the dependent variables are taken from a combination of the initial/boundary conditions and/or source terms, if these are expressed in dimensional form, and any inconsistency that might exist is flagged. [At any rate I haven't found a place where units can be explicitly specified for dependent variables. Perhaps a(the) moderator(s) could clarify/comment on the situation here.]
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
23 août 2010, 15:45 UTC−4
Hi again
Just to make it clear, that question goes above my knowledge of the COMSOL interior, and we would need sombody from COMSOL to reply correctly here, I believe (I'm just a user as most of you, even if I'm been "promoted moderator").
These are typically also the discussion I have with the COMSOL deveoppers during i.e the annual Conference, yet another reason to go there :)
--
Good luck
Ivar
Hi again
Just to make it clear, that question goes above my knowledge of the COMSOL interior, and we would need sombody from COMSOL to reply correctly here, I believe (I'm just a user as most of you, even if I'm been "promoted moderator").
These are typically also the discussion I have with the COMSOL deveoppers during i.e the annual Conference, yet another reason to go there :)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
11 oct. 2010, 19:33 UTC−4
I think many people in universities like to use non-dimensional forms of equations, but when I model the domain in COMSOL 4.0, I have to specify the units. I remember in previous versions (before 3.5a), they can solve the non-dimensional equations without requiring units. Why does the new version discard this feature?
Also, COMSOL 4.0 can not open the old files created before 3.5a. If I still want to use the old model files, what should I do? remodel it again?
Thanks
Wei
I think many people in universities like to use non-dimensional forms of equations, but when I model the domain in COMSOL 4.0, I have to specify the units. I remember in previous versions (before 3.5a), they can solve the non-dimensional equations without requiring units. Why does the new version discard this feature?
Also, COMSOL 4.0 can not open the old files created before 3.5a. If I still want to use the old model files, what should I do? remodel it again?
Thanks
Wei
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
12 oct. 2010, 02:15 UTC−4
Hi
from my understanding the units are not mandatory, its just a warning.
Then for older files, yes you need to load and save them in 3.5a to open them in v4, I have heard that a matlab batch translater will also become available.
I agree its ennoying, no to have full backward compatibility, but this is often very difficult, and I have many software that are like that.
Personally I prefer by far V4
--
Good luck
Ivar
Hi
from my understanding the units are not mandatory, its just a warning.
Then for older files, yes you need to load and save them in 3.5a to open them in v4, I have heard that a matlab batch translater will also become available.
I agree its ennoying, no to have full backward compatibility, but this is often very difficult, and I have many software that are like that.
Personally I prefer by far V4
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
12 oct. 2010, 12:29 UTC−4
Do you mean the units are not involved in the computation though they are shown behind the value? Thanks.
Do you mean the units are not involved in the computation though they are shown behind the value? Thanks.
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
13 oct. 2010, 01:59 UTC−4
Hi
From my understanding Units are used to transfor everything to SI by default, so if you use none up to you to normalise correctly
--
Good luck
Ivar
Hi
From my understanding Units are used to transfor everything to SI by default, so if you use none up to you to normalise correctly
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
13 oct. 2010, 10:01 UTC−4
Then for older files, yes you need to load and save them in 3.5a to open them in v4, I have heard that a matlab batch translater will also become available.
See
www.comsol.com/support/knowledgebase/1080/ for more info. Although it looks like version 3.5a needs to be installed.
[QUOTE]
Then for older files, yes you need to load and save them in 3.5a to open them in v4, I have heard that a matlab batch translater will also become available.
[/QUOTE]
See http://www.comsol.com/support/knowledgebase/1080/ for more info. Although it looks like version 3.5a needs to be installed.
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
14 oct. 2010, 00:54 UTC−4
Thanks.
If I understand correctly, it means that whatever units are used in geometry modeling and material properties, in the real computation all the values are automatically transferred into the values with SI units,right? So if one wants to use non-dimensional equations, he just needs to input all the values which have been normalized in a SI unit system, then it would work because only the value in this SI unit system are used. Is my understanding right? That means comsol also can work for non-dimensional equations.
Thanks.
If I understand correctly, it means that whatever units are used in geometry modeling and material properties, in the real computation all the values are automatically transferred into the values with SI units,right? So if one wants to use non-dimensional equations, he just needs to input all the values which have been normalized in a SI unit system, then it would work because only the value in this SI unit system are used. Is my understanding right? That means comsol also can work for non-dimensional equations.