File: esys.escript.unitsSI.html

package info (click to toggle)
python-escript 5.6-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 144,304 kB
  • sloc: python: 592,074; cpp: 136,909; ansic: 18,675; javascript: 9,411; xml: 3,384; sh: 738; makefile: 207
file content (276 lines) | stat: -rw-r--r-- 11,277 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>esys.escript.unitsSI Package &#8212; esys.escript 5.6 documentation</title>
    <link rel="stylesheet" href="_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <script type="text/javascript" src="_static/language_data.js"></script>
    
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">esys.escript 5.6 documentation</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="module-esys.escript.unitsSI">
<span id="esys-escript-unitssi-package"></span><h1>esys.escript.unitsSI Package<a class="headerlink" href="#module-esys.escript.unitsSI" title="Permalink to this headline">¶</a></h1>
<ul class="simple">
<li></li>
</ul>
<div class="section" id="classes">
<h2>Classes<a class="headerlink" href="#classes" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><a class="reference internal" href="#esys.escript.unitsSI.Unit" title="esys.escript.unitsSI.Unit"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Unit</span></code></a></li>
</ul>
<dl class="class">
<dt id="esys.escript.unitsSI.Unit">
<em class="property">class </em><code class="descclassname">esys.escript.unitsSI.</code><code class="descname">Unit</code><span class="sig-paren">(</span><em>name</em>, <em>longname</em>, <em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.unitsSI.Unit" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>a general class to define a physical unit and convert from this unit to an appropriate SI unit.</p>
<p><a class="reference internal" href="#esys.escript.unitsSI.Unit" title="esys.escript.unitsSI.Unit"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Unit</span></code></a> object have a dual purpose: Firstly physical units can be combined through <em>,/ and *</em> to form new physical units or to add prefixes such as
Milli to m to form mm=Milli*m. Moreover, a given floating point number x (or any other arithmetic object) can be converted from the physical unit to 
the SI system, eg. 10*mm to create the value for 10mm which is the float number 0.01 in the SI system. In addition, a value in the SI unit can be 
converted back to the given unit, eg. to express 0.01m in physical units of mm use 0.01/mm which will return 10.</p>
<dl class="method">
<dt id="esys.escript.unitsSI.Unit.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>name</em>, <em>longname</em>, <em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.unitsSI.Unit.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>initializes the physical unit</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>name</strong> (<code class="docutils literal notranslate"><span class="pre">str</span></code>) – short name of the physical unit or prefix</li>
<li><strong>longname</strong> (<code class="docutils literal notranslate"><span class="pre">str</span></code>) – long name of the physical unit or prefix</li>
<li><strong>a</strong> (<code class="docutils literal notranslate"><span class="pre">float</span></code>) – absolute value in transformation</li>
<li><strong>b</strong> (<code class="docutils literal notranslate"><span class="pre">float</span></code>) – slop in translation</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.unitsSI.Unit.getLongName">
<code class="descname">getLongName</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.unitsSI.Unit.getLongName" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the long name of the physical unit</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">name of the physical unit</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">str</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.unitsSI.Unit.getName">
<code class="descname">getName</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.unitsSI.Unit.getName" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the name of the physical unit</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">name of the physical unit</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">str</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.unitsSI.Unit.setLongName">
<code class="descname">setLongName</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.unitsSI.Unit.setLongName" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the long name of the physical unit</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<code class="docutils literal notranslate"><span class="pre">str</span></code>) – new long name of the physical unit</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.unitsSI.Unit.setName">
<code class="descname">setName</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.unitsSI.Unit.setName" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the name of the physical unit</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<code class="docutils literal notranslate"><span class="pre">str</span></code>) – new name of the physical unit</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="functions">
<h2>Functions<a class="headerlink" href="#functions" title="Permalink to this headline">¶</a></h2>
</div>
<div class="section" id="others">
<h2>Others<a class="headerlink" href="#others" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>A</li>
<li>Atto</li>
<li>Barrel</li>
<li>C</li>
<li>Celsius</li>
<li>Centi</li>
<li>DEG</li>
<li>Darcy</li>
<li>Deca</li>
<li>Deci</li>
<li>Exa</li>
<li>F</li>
<li>Fahrenheit</li>
<li>Femto</li>
<li>Giga</li>
<li>Gravitational_Constant</li>
<li>Gyr</li>
<li>Hecto</li>
<li>Hz</li>
<li>J</li>
<li>K</li>
<li>Kilo</li>
<li>Magnetic_Dipole_Moment_Earth</li>
<li>Mcf</li>
<li>Mega</li>
<li>Micro</li>
<li>Milli</li>
<li>Mol</li>
<li>Mscf</li>
<li>Mu_0</li>
<li>Myr</li>
<li>N</li>
<li>Nano</li>
<li>Ohm</li>
<li>Pa</li>
<li>Peta</li>
<li>Pico</li>
<li>Poise</li>
<li>RAD</li>
<li>R_Earth</li>
<li>R_Earth_equator</li>
<li>R_Earth_poles</li>
<li>T</li>
<li>Tera</li>
<li>Tesla</li>
<li>V</li>
<li>W</li>
<li>Yocto</li>
<li>Yotta</li>
<li>Zepto</li>
<li>Zetta</li>
<li>atm</li>
<li>bar</li>
<li>cPoise</li>
<li>ccm</li>
<li>cm</li>
<li>day</li>
<li>ft</li>
<li>gal</li>
<li>gram</li>
<li>h</li>
<li>hour</li>
<li>kg</li>
<li>km</li>
<li>lb</li>
<li>liter</li>
<li>m</li>
<li>mDarcy</li>
<li>mPoise</li>
<li>mgal</li>
<li>minute</li>
<li>mm</li>
<li>msec</li>
<li>one</li>
<li>pi</li>
<li>psi</li>
<li>sec</li>
<li>ton</li>
<li>v_light</li>
<li>year</li>
<li>yr</li>
</ul>
</div>
<div class="section" id="packages">
<h2>Packages<a class="headerlink" href="#packages" title="Permalink to this headline">¶</a></h2>
<div class="toctree-wrapper compound">
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">esys.escript.unitsSI Package</a><ul>
<li><a class="reference internal" href="#classes">Classes</a></li>
<li><a class="reference internal" href="#functions">Functions</a></li>
<li><a class="reference internal" href="#others">Others</a></li>
<li><a class="reference internal" href="#packages">Packages</a></li>
</ul>
</li>
</ul>

        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">esys.escript 5.6 documentation</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2012-2014, Author.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.8.4.
    </div>
  </body>
</html>