Pass *ll*, *ul* to sin-cos-intsubs1
[maxima.git] / share / physics / dimension.html
blob2824f68a21636c3b42f85ccf1f687f93a8a4a3d8
1 <HTML>
2 <HEAD>
3 <!-- This HTML file has been created by texi2html 1.52
4 from dimension.texi on 7 April 2002 -->
6 <TITLE>Untitled Document</TITLE>
8 </HEAD>
9 <BODY>
10 <H1>Untitled Document</H1>
11 <P>
12 <P><HR><P>
15 <H2><A NAME="SEC1" HREF="dimension_toc.html#TOC1">Introduction to the Dimensional Analysis Package</A></H2>
17 <P>
18 This document describes a new dimensional analysis package for Maxima.
19 There is an older Maxima package for dimensional analysis. The
20 software described in this document differs from the older package.
21 </P>
24 <P>
25 To use the dimensional analysis package, you must first load the file
26 <B>dimension.mac</B>. Provided this file has been installed in a directory
27 that Maxima can find, load it with the command
29 <PRE>
30 (C1) load("dimension.mac")$
31 </PRE>
34 Use <B>qput</B> to define the dimension of a variable; thus
35 to define <EM>x</EM> to be a length, <EM>t</EM> a time, and <EM>c</EM> a speed, use
37 <PRE>
38 (C1) qput(x,"length",dimension)$
39 (C2) qput(t,"time",dimension)$
40 (C3) qput(c,"length"/"time",dimension)$
41 </PRE>
43 <P>
44 To find the dimension of an expression, use the <B>dimension</B> function.
45 For example,
47 <PRE>
48 (C4) dimension(c*t/5);
49 (D4) length
50 (C5) dimension(c-x/t);
51 length
52 (D5) ------
53 time
54 </PRE>
56 <P>
57 When an expression is dimensionally inconsistent, <B>dimension</B>
58 should signal an error
60 <PRE>
61 (C6) dimension(c-x);
63 Expression is dimensionally inconsistent.
64 </PRE>
66 <P>
67 Any symbol may be used to represent a dimension; if you like,
68 you can use "L" instead of "length" for the length dimension. It
69 isn't necessary to use strings for the dimensions; however, doing
70 so reduces the chance of conflicting with other variables.
71 Thus to use the dimensions "M","L", and "T", for mass, length, and time,
72 respectively, use the commands
74 <PRE>
75 (C1) qput(x,"L",dimension)$
76 (C2) qput(t,"T",dimension)$
77 (C3) qput(c,"L"/"T",dimension)$
78 (C4) qput(m,"M",dimension)$
79 </PRE>
81 <P>
82 Then
84 <PRE>
85 (C4) dimension(m * 'diff(x,t));
86 L M
87 (D4) ---
89 </PRE>
91 <P>
92 An <EM>equation</EM> is dimensionally consistent if either one side of
93 the equality vanishes or if both sides have the same
94 dimensions. Thus
96 <PRE>
97 (C5) dimension(x=c*t);
99 (D5) L
100 (C6) dimension(x=0);
102 (D6) L
103 (C7) dimension(x=c);
105 Expression is dimensionally inconsistent.
106 </PRE>
109 The dimension function supports most Maxima operators and it
110 automatically maps over lists. For example,
112 <PRE>
113 (C1) dimension([x^3,x.t,x/t,x^^2]);
114 3 L 2
115 (D1) [L , L T, -, L ]
117 </PRE>
120 The dimension of a subscripted symbol is the dimension of the
121 non-subscripted variable. For example,
123 <PRE>
124 (C1) dimension(x[3]);
125 (D1) L
126 </PRE>
129 When the dimensions of a symbol are undefined, dimension returns
130 an unevaluated expression
132 <PRE>
133 (C2) dimension(z);
134 (D2) dimension(z)
135 </PRE>
138 The remaining functions in the package, <B>dimensionless</B>,
139 <B>dimension_as_list</B>, and <B>natural_unit</B> require that
140 all expressions have dimensions that are members of the
141 list <B>fundamental_dimensions</B>. The default value of this
142 list is
144 <PRE>
145 (C1) fundamental_dimensions;
147 (D1) [mass, length, time]
148 </PRE>
151 A user may redefine this list; to use "M", "L", and "T" for
152 the fundamental dimensions, make the assignment
154 <PRE>
155 (C2) fundamental_dimensions : ["M", "L", "T"]$
156 </PRE>
159 The list <B>fundamental_dimensions</B> must be nonempty, but it
160 can have any finite cardinality.
162 </P>
164 To find the dimensions of an expression as a list of the exponents
165 of the fundamental dimensions, use the <B>dimension_as_list</B> function
167 <PRE>
168 (C3) dimension_as_list('diff(x,t,3));
170 (D3) [0, 1, - 3]
171 </PRE>
174 Thus the dimension of the third derivative of x
175 with respect to t is L / T^3.
177 </P>
179 To find the dimensionless expressions that can be formed as a
180 product of elements of a list of atoms, use the
181 <B>dimensionless</B> function. For example,
183 <PRE>
184 (C1) dimensionless([c,t,x]);
186 Dependent equations eliminated: (1)
188 (D1) [---, 1]
190 </PRE>
193 Finally, to find quantities that have a given dimension, use
194 the <B>natural_unit</B> function. To find an expression with
195 dimension time, use the command
197 <PRE>
198 (C1) natural_unit("T",[x,c]);
200 Dependent equations eliminated: (1)
202 (D1) [-]
204 </PRE>
208 <H2><A NAME="SEC2" HREF="dimension_toc.html#TOC2">Definitions for Dimensional Analysis</A></H2>
210 <a name="FUNDAMENTAL_DIMENSIONS"></a><P>
211 <DL>
212 <DT><U>Variable:</U> <B>FUNDAMENTAL_DIMENSIONS</B>
213 <DD><A NAME="IDX1"></A>
214 FUNDAMENTAL_DIMENSIONS is a list of the fundamental dimensions. The
215 default value is ["mass", "length", "time"]; however, a user may
216 redefine it to be any nonempty list of atoms. The function
217 <B>dimension</B> doesn't use this list, but the other functions
218 in the dimensional analysis package do use it.
220 </P>
221 </DL>
223 <a name="DIMENSION"></a><P>
224 <DL>
225 <DT><U>Function:</U> <B>DIMENSION</B> <I>(e)</I>
226 <DD><A NAME="IDX2"></A>
227 Return the dimension of the expression e. If
228 e is dimensionally inconsistent, signal an error.
229 The dimensions of the symbols in the expression e
230 should be first defined using <B>qput</B>.
232 </P>
233 </DL>
235 <a name="DIMENSION_AS_LIST"></a><P>
236 <DL>
237 <DT><U>Function:</U> <B>DIMENSION_AS_LIST</B> <I>(e)</I>
238 <DD><A NAME="IDX3"></A>
239 Return the dimension of the expression e as a list of
240 the exponents of the dimensions in the list
241 <B>fundamental_dimensions</B>. If e is dimensionally
242 inconsistent, signal an error.
244 </P>
245 </DL>
247 <a name="DIMENSIONLESS"></a><P>
248 <DL>
249 <DT><U>Function:</U> <B>DIMENSIONLESS</B> <I>([e1,e2,...,en])</I>
250 <DD><A NAME="IDX4"></A>
252 </P>
254 Return a basis for the dimensionless quantities that can be formed as
255 a product of powers of the expressions e1, e2, ..., en.
257 </P>
258 </DL>
260 <a name="NATURAL_UNIT"></a><P>
261 <DL>
262 <DT><U>Function:</U> <B>NATURAL_UNIT</B> <I>(q, [e1,e2,...,en])</I>
263 <DD><A NAME="IDX5"></A>
265 </P>
267 Return a basis for the quantities that can be formed as a product of
268 powers of the expressions e1, e2, ..., en that have the
269 same dimension as does q.
271 </P>
272 </DL>
277 </P>
281 <P><HR><P>
282 This document was generated on 7 April 2002 using the
283 <A HREF="http://wwwcn.cern.ch/dci/texi2html/">texi2html</A>
284 translator version 1.51a.</P>
285 </BODY>
286 </HTML>