How do I Work with units such us kN (kilo Newtons)?

racing01's picture

How do I set maple to work with this units kN (kilo newtons), MN (mega Newtons 1MN= 10^6 N)??'  I'm Just starting with maple. Thanks for your help!

Tim Vrablik's picture

Units Package

I'm not sure if this is what you're asking, but you can attach units to your values by loading the Units package and using the Units palette.

To load the package and to use SI as the default : with (Units[Standard]); Unist[UnitSystem]('SI')

You can then use the Units palette to attach units and enter the prefix that you require.

If you are asking about setting the formatting to be in engineering notation, you can set it by execution group (I'm not sure if you can set it globally for your session).  To find out more about it type ?NumericFormatting

 

Hope that helps.

acer's picture

Units

It's pretty straightforward to toggle on units support at the interative top-level. Note that the SI system is the default. In SI, the Newton (N) is the base unit for representing force. So output with that dimension comes out in terms on Unit(N).

In 1D Maple input, you can just type it in directly, as in the example below.

> with(Units[Standard]):
> 35*Unit(kN) + 7*Unit(MN);
                                  7035000 [N]

If you instead want kN to be the default base for output, so that the above comes back as 7035 [[kN]], then that too can be done with a customized system. To see an example of that, enter this Maple command to see a help-system page,

?Task,ChangeDefaultUnitInSystem

Alternatively, you can convert output like 7035000 [[N]] to 7035 [[kN]] using the context-menus. Select the output with the mouse, and when the context-menu pops up choose "Units" -> "Replace Units".

In 2D Math output, the Unit(N) object should get typeset as something that looks like [[N]]. To get that in 2D Math input, you can use the "Units (SI)" palette. Or use command-completion.

See the top menubar's "View" -> "Palettes" -> "Arrange Palettes" for a popup menu to configure which palettes show up in the left sidebar.

acer

racing01's picture

Thanks a lot!!

Thanks a lot!!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}