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.

change the numerical values for the physical quantities

Please login with a confirmed email address before reporting spam

Hello COMSOL community :)

I am new to COMSOL multiphysics program , i am trying to build a simulation of a cantilever in the mm length scale. I am using Magnetic fields (mf) , Electric currents (ec) and Multiphysics modules.
I found this in the User's guide book
"It is important to be careful using physical constants if the unit system is not in SI units.
For example, the default values for the permittivity of vacuum and the permeability of
vacuum require that you provide all other quantities in SI units and that you use meter
(m) for the geometry length. If you draw the geometry using another length scale, you
need to change the numerical values for the physical quantities accordingly. "

Can anyone tell me how to change the numerical values for the physical quantities according to mm length scale ?

Thanks in advance,
have a nice day,
Amal

7 Replies Last Post 23.04.2015, 14:39 GMT-4
Vivien Van Kerckhoven

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 21.04.2015, 06:33 GMT-4
Hi,

I advise you rather to let the value of the physical constants, but changing your lengths units.
When specifying length, you can give units : 5 [mm] or 7.5 [µm]
Then, Comsol will do himself the conversion into the SI system.
But, much better, is to used directly SI units : 5e-3 [m] or 7.5e-6 [m].
Look at this also : evgeni.org/oldfish/Top_nine_hints_for_working_with_Comsol#Hint_8._Stay_with_default_units.2C_customise_the_spatial_coordinates
Hi, I advise you rather to let the value of the physical constants, but changing your lengths units. When specifying length, you can give units : 5 [mm] or 7.5 [µm] Then, Comsol will do himself the conversion into the SI system. But, much better, is to used directly SI units : 5e-3 [m] or 7.5e-6 [m]. Look at this also : http://evgeni.org/oldfish/Top_nine_hints_for_working_with_Comsol#Hint_8._Stay_with_default_units.2C_customise_the_spatial_coordinates

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 22.04.2015, 18:14 GMT-4
hi ,

Thank you Vivien for your reply , i will use SI units directly as you recommended.

Thanks for your help,
Amal
hi , Thank you Vivien for your reply , i will use SI units directly as you recommended. Thanks for your help, Amal

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 22.04.2015, 23:00 GMT-4
I'm a bit confused by this. When a geometrical model is established the units are specified in a selection widget. For example for nanomechanical structures or semiconductor devices nm is an obvious choice and is the option provided directly under meters. Then the structure is rendered with nm labeled axes. Other quantities like force per unit area are generally specified in SI units, however, and quantities like permittivity and electric field are still in SI.

I THINK this is correct. It would be cumbersome to specify lengths in meters on this scale.
I'm a bit confused by this. When a geometrical model is established the units are specified in a selection widget. For example for nanomechanical structures or semiconductor devices nm is an obvious choice and is the option provided directly under meters. Then the structure is rendered with nm labeled axes. Other quantities like force per unit area are generally specified in SI units, however, and quantities like permittivity and electric field are still in SI. I THINK this is correct. It would be cumbersome to specify lengths in meters on this scale.

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 23.04.2015, 08:47 GMT-4
Excuse me here as I wanted to work this out for myself.

I wanted to see what the error would be if I simulated a cantilever beam which should have been in mm in meters instead. So I'm going to assume a linear dimension scale factor of f.

Electric field are inversely proportional to length. Force is proportional to area times electric field squared. So this cancels: force is the same.

K (linear stiffness) of a beam is proportional to area moment divided by L³, which is net proportional to f (bigger beams are stiffer). But that's for linear displacement. For angular displacement I need to multiply by f again, so f². It takes the same force per unit area to deflect a larger beam the same angle.

So if I scale all dimensions by a factor f (for example, 1000 going from m to mm) due to an error in the assumptions about what units are being used, and I keep the same value for ϵ₀ I get an error in the angular deflection of my cantilever beam for a fixed voltage bias of 1/f² (bigger beams deflect less).

I assumed constant voltage difference. Volts are energy / charge, which is kg m² / s² C. If I square this and multiply by the permittivity (which I had assumed was fixed) I get (kg² m⁴ / s⁴ C²) (C² s² / kg m³) = kg m / s². If I were to convert my biases to the new length unit (going to mm I'd need to increase the number) and the permittivity to the new length unit (going to mm decreasing the number) I'd have increased force and therefore deflection by a factor f.

The net result of converting voltages to the new unit and converting permittivity to the new unit would be a deflection angle proportional to 1/f. But I assumed the same Young's modulus...

Young's modulus is N/m² = kg /m s², so converting the length unit on Young's modulus decreases it by a factor f, which increases deflection by a factor f, so I then get the correct deflection angle.

So the answer is to get the right result for electrostatic deflection if the code isn't smart about units I need to convert dimensions, permittivity, voltages, and stiffness coefficients (for example Young's modulus but obviously not Poisson's ratio, which is unitless).





Excuse me here as I wanted to work this out for myself. I wanted to see what the error would be if I simulated a cantilever beam which should have been in mm in meters instead. So I'm going to assume a linear dimension scale factor of f. Electric field are inversely proportional to length. Force is proportional to area times electric field squared. So this cancels: force is the same. K (linear stiffness) of a beam is proportional to area moment divided by L³, which is net proportional to f (bigger beams are stiffer). But that's for linear displacement. For angular displacement I need to multiply by f again, so f². It takes the same force per unit area to deflect a larger beam the same angle. So if I scale all dimensions by a factor f (for example, 1000 going from m to mm) due to an error in the assumptions about what units are being used, and I keep the same value for ϵ₀ I get an error in the angular deflection of my cantilever beam for a fixed voltage bias of 1/f² (bigger beams deflect less). I assumed constant voltage difference. Volts are energy / charge, which is kg m² / s² C. If I square this and multiply by the permittivity (which I had assumed was fixed) I get (kg² m⁴ / s⁴ C²) (C² s² / kg m³) = kg m / s². If I were to convert my biases to the new length unit (going to mm I'd need to increase the number) and the permittivity to the new length unit (going to mm decreasing the number) I'd have increased force and therefore deflection by a factor f. The net result of converting voltages to the new unit and converting permittivity to the new unit would be a deflection angle proportional to 1/f. But I assumed the same Young's modulus... Young's modulus is N/m² = kg /m s², so converting the length unit on Young's modulus decreases it by a factor f, which increases deflection by a factor f, so I then get the correct deflection angle. So the answer is to get the right result for electrostatic deflection if the code isn't smart about units I need to convert dimensions, permittivity, voltages, and stiffness coefficients (for example Young's modulus but obviously not Poisson's ratio, which is unitless).

Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 23.04.2015, 11:38 GMT-4
Hi,

I think this needs a clarification:

COMSOL is (as opposed to many other CAE softwares) aware of units. This is one, of many, big advantages.

You will almost never have to worry about the units. All input fields contain a default unit, which is the unit the entered quantity has when typed without an explicit unit.

So if you run in the default SI system, a text field for Young's modulus will have the text 'Pa' to the right.

It is then equivalent to enter for example
2e11
2e11[Pa]
2e5[MPa]
29008[psi]
1.3439E8[lb/(ft*s^2)]
in the text field.

If you change the unit system to FPS (in the setting for the root node or in the settings for the component), the label to the right will change to lb/(ft*s^2). The same material can then be entered as
1.3439E8
1.3439E8[lb/(ft*s^2)]
2e11[Pa]
2e5[MPa]
29008[psi]

Now to the physical constants:
There are a number of built in physical constants in COMSOL. They have units, and the units will be converted into the used unit system, just like any other quantity. So if you use the acceleration of gravity, g_const (defined as 9.80665[m/s^2]) it will automatically convert into your favorite unit system.

So what is the warning about?
This warning text (in some different flavors) was present in very old documentation (last time probably in version 4.0, released 2010).

There are however some corner cases where a unit conversion is not trivial. This particularly affects the constants in Maxwell's equations, where for example a factor 4*pi can move around. So in case you are working with some of the more obscure CGS based unit system, it makes sense to check that epsilon0_const is what you expect it to be. See also

en.wikipedia.org/wiki/Centimetre%E2%80%93gram%E2%80%93second_system_of_units

Also, Boltzmann constant conversion for Fahrenheit based temperatures is a potential problem (Kelvin to Fahrenheit conversion includes not only a factor but also an offset!). On the other hand, [degF] cannot be used in those contexts anyway, since the Boltzmann constant usually appears together with an absolute temperature.

Now, a note about length scales:
In the Geometry node, you can give a length unit. This affects the default unit for input of geometrical quantities (and also some units in result presentation), but it is not a change of unit system in the sense above. Even if you model in geometry unit [mm], the SI system will (as a default) be used for everything else. So Young's modulus is still in Pa (=N/m^2) not in (N/mm^2). If you want to use a full N - mm system (not uncommon in structural mechanics), select the 'MPa' unit system.

Finally: You can always present the result in any suitable unit. So the results of an analysis made in SI (or FPS) can always be presented to your customers or colleagues in another country in the units of their choice.

Regards,
Henrik

Hi, I think this needs a clarification: COMSOL is (as opposed to many other CAE softwares) aware of units. This is one, of many, big advantages. You will almost never have to worry about the units. All input fields contain a default unit, which is the unit the entered quantity has when typed without an explicit unit. So if you run in the default SI system, a text field for Young's modulus will have the text 'Pa' to the right. It is then equivalent to enter for example 2e11 2e11[Pa] 2e5[MPa] 29008[psi] 1.3439E8[lb/(ft*s^2)] in the text field. If you change the unit system to FPS (in the setting for the root node or in the settings for the component), the label to the right will change to lb/(ft*s^2). The same material can then be entered as 1.3439E8 1.3439E8[lb/(ft*s^2)] 2e11[Pa] 2e5[MPa] 29008[psi] Now to the physical constants: There are a number of built in physical constants in COMSOL. They have units, and the units will be converted into the used unit system, just like any other quantity. So if you use the acceleration of gravity, g_const (defined as 9.80665[m/s^2]) it will automatically convert into your favorite unit system. So what is the warning about? This warning text (in some different flavors) was present in very old documentation (last time probably in version 4.0, released 2010). There are however some corner cases where a unit conversion is not trivial. This particularly affects the constants in Maxwell's equations, where for example a factor 4*pi can move around. So in case you are working with some of the more obscure CGS based unit system, it makes sense to check that epsilon0_const is what you expect it to be. See also http://en.wikipedia.org/wiki/Centimetre%E2%80%93gram%E2%80%93second_system_of_units Also, Boltzmann constant conversion for Fahrenheit based temperatures is a potential problem (Kelvin to Fahrenheit conversion includes not only a factor but also an offset!). On the other hand, [degF] cannot be used in those contexts anyway, since the Boltzmann constant usually appears together with an absolute temperature. Now, a note about length scales: In the Geometry node, you can give a length unit. This affects the default unit for input of geometrical quantities (and also some units in result presentation), but it is not a change of unit system in the sense above. Even if you model in geometry unit [mm], the SI system will (as a default) be used for everything else. So Young's modulus is still in Pa (=N/m^2) not in (N/mm^2). If you want to use a full N - mm system (not uncommon in structural mechanics), select the 'MPa' unit system. Finally: You can always present the result in any suitable unit. So the results of an analysis made in SI (or FPS) can always be presented to your customers or colleagues in another country in the units of their choice. Regards, Henrik

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 23.04.2015, 13:04 GMT-4
Hi ,

Thank you Daniel Connelly and Henrik Sönnerlind for your reply. I was reading the user's guide of version 4.0a (because i couldn't find the user's guide for version 5.0 which i use), and then i found this warning so i thought i should modify the physical constants in my model to make it work probably at that scale.
I understand now that there is no need for this modification.

Thank you,
Amal
Hi , Thank you Daniel Connelly and Henrik Sönnerlind for your reply. I was reading the user's guide of version 4.0a (because i couldn't find the user's guide for version 5.0 which i use), and then i found this warning so i thought i should modify the physical constants in my model to make it work probably at that scale. I understand now that there is no need for this modification. Thank you, Amal

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 23.04.2015, 14:39 GMT-4
Yes -- thank you Henrik! I have had some major problems with Electromechanical (as opposed to Structural Mechanics) simulations converging and wanted to make sure it wasn't a permittivity problem. I can post my simplified, stripped example in another thread some time today (I don't see many electromechanical cases in this forum).
Yes -- thank you Henrik! I have had some major problems with Electromechanical (as opposed to Structural Mechanics) simulations converging and wanted to make sure it wasn't a permittivity problem. I can post my simplified, stripped example in another thread some time today (I don't see many electromechanical cases in this forum).

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.