您的位置:首页 > 运维架构 > Linux

用windows和Linux下的单位转换工具ConvertAll解中学物理题

2016-10-22 10:06 477 查看
最早使用过的单位转换工具是windows下的一个小portable软件,

https://joshmadison.com/convert-for-windows/

但是它最后更新时间为1999年,虽然使用起来没有问题,但是,功能已经很有局限性了。后来发现ConvertAll非常方便,更为强大。

比如,用ConvertAll求解一道高中物理题。(题是从一本高中物理参考书来的,从中还可以看出,我国高中物理教学是多么不严谨)

设有1000W的电阻加热元件,则其6分钟内消耗的电能完全转化为热量,在标准大气压下能够将20°C的1000g水升高到多少摄氏度?

解答

实质涉及的都是简单物理概念和单位转换。涉及的物理概念:

1. 功率;SI单位,瓦,

2. 非SI制热量单位Calorie的定义(1g水升高1°C,则无须考虑水的比热)1

3. 热量单位焦耳和卡之间的换算

4. 水的简单的相变温度

功率为1000W的 电器,工作6分钟,产生多少千卡的热量的问题。直接输入单位和数字,得到:85.984523,利用前面条件知道这个对应于1000g水温度的可能变化,≈86 °C:



加上原始温度20°C: 106°C

还有一个标准大气压下条件没有充分利用:这个状态下水在100°C就开始气化,除非发生“过热“的非平衡或亚稳态状况,水温只能在沸点停留。从而解答完毕。【不严谨在于】这道题完全无视亚稳态可能存在,跟其它中学试题类似。

以下内容为转帖:

ConvertAll Downloads

Linux

On a Linux system that has the libraries noted on the requirements page, all that is needed is the source code (with an install script), included in convertall-0.6.1.tar.gz (272 KB).

But please read about the installation and use of ConvertAll. This information is available on this site and in the ReadMe file inside the above tar file.

If the Python 3 libraries are not be available for your distribution, this older version can be used with Python 2: convertall-0.5.2.tar.gz (60 KB).

Windows

Two windows installers are available. Use convertall-0.6.1-install-all.exe (7.3 MB) to install for all users (administrator permissions are required). Use convertall-0.6.1-install-user.exe (7.3 MB) to install for a single user (administrator rights are not required). The source code for the libraries used to build the Windows binaries is available upon request.

But please read about the installation and use of ConvertAll. This information is available on this site and in the ReadMe file included in the installer.



How to Use ConvertAll

Basics

Simply type a unit name in the
From Unit
edit window. As you type, the list below the window will scroll to show unit names which are close matches. Either type the complete unit abbreviation or unit name or hit the return key to use the unit highlighted in the list. Of course, clicking with the mouse on a unit in the list will also add the unit to the edit window. You may also use the up and down arrow keys to select nearby units from the list.

Repeat the unit selection in the
To Unit
edit window. When done, if the units are compatible, you will see the numeric edit windows below the unit lists activate. A number may be entered into either numeric window and the other window will display the conversion result.

Combining Units

The real strength of ConvertAll lies in its ability to combine multiple units. Simply type the unit names with an
*
or a
/
between them. This allows the entry of units such as
ft*lbf
or
mi/hr
. The
^
symbol may be used for exponents, such as
ft^3
or
ft*lbm/sec^2
. Negative exponents are allowed for units such as
sec^-1
(per second), but may switch the multiplication or division symbol (
ft*sec^-2
becomes
ft/sec^2
).

Multiplication and division have the same precedence, so they are evaluated left-to-right. Parenthesis may also be used to group units in the denominator. So
m / sec / kg
can also be entered as
m / (sec * kg)
. The version with parenthesis is probably less confusing.

The buttons below the unit lists (
X
,
/
,
^2
,
^3
) will also place the operators after the unit nearest to the cursor. The exponent keys will replace the unit`s exponent.

Similarly, clicking on a unit from the list generally replaces the unit nearest the cursor.

The
Clear Unit
button below the operator buttons may be used to empty the unit edit window to allow a new unit to be entered.

Shortcuts

When typing unit names, spaces are ignored, so they may be skipped. It is also generally ignored if a plural form of the unit name is typed. When a partially typed unit is highlighted in the list, hitting enter will complete the name. Also, hitting the tab key will complete the name and move to the next entry field.

The
Recent Unit
button opens a menu of recently used units and unit combinations. The current unit combination is replaced with any selections from this menu.

The number to be converted may be entered in either the
From
or
To
unit side. Standard or scientific notation may be used, or an expression including the normal math operators (
+, -, *, /, **
) may be entered.

Unit Finder

The unit finder can be used to filter units by type and/or search for units using a text string. It displays a separate unit list in a new window. The list will be updated based on the filter and search string entries.

Buttons near the bottom of the finder window add the selected unit to the units in the main window. The
Replace
buttons replace an entire combined unit with the selection. The
Insert
button changes only the part of a combined unit that is active (at the cursor in the main window).

Options

The
Options...
button allows for changing several default settings. These settings are automatically stored so that ConvertAll will re-start with the settings last used.

The first options control the display of numerical results, including the use of scientific notation and the number of decimal places. Be cautious about setting the number of decimal places to a low value, which can result in a significant loss of accuracy. Six places or higher is recommended (eight is the default).

There is an option to set the number of recent units to be saved. Setting it to zero will disable the Recent Unit buttons. Another option will automatically load the most recent previous units at startup.

There is an option to hide the operator text option buttons (
x, /, ^2, ^3
, Clear Unit and Recent Unit). These can be hidden to save space if the keyboard will be used to enter the operators.

Buttons are also included on the options dialog to control the colors of the text fields.

Non-Linear Conversions

The conversion of some units is non-linear. Examples of these include the Fahrenheit and Celsius temperature scales (due to an offset zero point) and the American Wire Gauge (logarithmic). The non-linear units are labeled as such in the comments column (located to the right of the
Type
column).

These units can be converted only when they are not combined with other units or used with an exponential operator. Otherwise the conversion would not be meaningful.

Command Line Usage

Conversions may be done from the command line (Linux or DOS console) without invoking the graphical interface. Enter the command (
convertall
on Linux,
convertall_dos
from the Windows binary), the number, the from unit and the to unit (separated by spaces) to do the conversion. Unit names containing spaces should be surrounded by quotes. Or, to be prompted for each unit entry, use the
-i
option (
convertall -i
on Linux,
convertall_dos -i
from Windows).

After the conversion is done, ConvertAll will prompt for a new number to do the same conversion. Or
n
can be entered to start a new conversion,
r
to reverse the conversion or
q
to quit.

For a more detailed list of options, use the
-h
option (
convertall -h
on Linux,
convertall_dos -h
on Windows).

the amount of energy required to warm one gram of air-free water from 3.5 to 4.5 °C at standard atmospheric pressure. 标准大气压下,把液相纯水从3.5°C加热到4.5°C所需的热量。——不严谨就是中学物理的特色。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息