1 package org.catacomb.numeric.phys;
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 public final class Units {
59 public final static double from_ms(double x) {
60 return x;
61 }
62 public final static double from_nm(double x) {
63 return 1.e-3 * x;
64 }
65 public final static double from_micron(double x) {
66 return x;
67 }
68 public final static double from_micron2(double x) {
69 return x;
70 }
71 public final static double from_mV(double x) {
72 return x;
73 }
74 public final static double from_V(double x) {
75 return x * 1000.;
76 }
77 public final static double from_perV(double x) {
78 return x * 1e-3;
79 }
80 public final static double from_Ohmcm(double x) {
81 return 1e-5 * x;
82 }
83 public final static double from_microFpercm2(double x) {
84 return 1.e-2 *x;
85 }
86 public final static double from_pS(double x) {
87 return 1.e-3 * x;
88 }
89 public final static double from_nS(double x) {
90 return x;
91 }
92 public final static double from_microS(double x) {
93 return 1.e3 * x;
94 }
95 public final static double from_pA(double x) {
96 return x;
97 }
98 public final static double from_nA(double x) {
99 return 1.e3 * x;
100 }
101 public final static double from_A(double x) {
102 return 1.e-12 * x;
103 }
104 public final static double from_Celcius(double x) {
105 return 273 + x;
106 }
107 public final static double from_electrons(double x) {
108 return 1.e15 * Phys.electronCharge * x;
109 }
110 public final static double from_degrees(double x) {
111 return 2. * Math.PI * x / 360.;
112 }
113 }
114
115
116
117