A simple method for calculating voigt-profiles by a programmable hand-calculator HP-34C

A simple method for calculating voigt-profiles by a programmable hand-calculator HP-34C

[ Quant. Spectrosc. Radiat. Trans[er Vol. 29, No. I, pp. 89-92, 1983 0022..4073lg31010089--04503.00/0 Printed in Great Britain. Pergamon Press Ltd...

144KB Sizes 8 Downloads 245 Views

.[ Quant. Spectrosc. Radiat. Trans[er Vol. 29, No. I, pp. 89-92, 1983

0022..4073lg31010089--04503.00/0

Printed in Great Britain.

Pergamon Press Ltd.

NOTE

A SIMPLE METHOD FOR CALCULATING VOIGT-PROFILES BY A PROGRAMMABLE HAND-CALCULATOR HP-34C KLAUS G. P. SULZMANN~" EnergyCenterand Departmentof AppliedMechanicsand EngineeringSciences,Universityof California,San Diego, La Jolla, CA 92093,U.S.A.

(Received 22 March 1982) Abstraet--A program is given for the calculation of the Voigt-profilenear the line-centerby a hand-held HP-24Ccalculatorand whichis usefulfor spot-checkson moreextensivecalculationsand for data reductions. The programcan be easily adapted to other hand-heldcalculatorswith equivalentstorage and computational capacities. INTRODUCTION Various optimized methods have been developed in the past (see, for example, Refs. 1 and 2 for details) for fast calculations by computers of the Voigt-profile 3

f+~ exp(-y~)dr J-o~ a2+(~- y)2'

~(~, a ) - P d P ' = / a )

(1)

with a = ( b d b D ) ~ / ( l ~ the line-shape parameter, ~ = [(oJ = ¢oo)/dD]'~/-O~) the line-displacement, and P' --- ( S l b t , ) ~ , all in standard notation. However, for many applications it is desirable to have a program for calculations by a hand-held calculator which can be used for spot-checks or data reductions. We use a hand-held HP-34C calculator for 0 < ~ ~ 2 and 0 ~< a ~ 10 near the line center. The program requires 10 storage registers and 127 operational steps on the HP-34C and can easily be adapted for other hand-held calculators with equivalent storage and computational capacities. RATIONALE For the range of parameters of interest, we use the power series expressions given in Eq. (4-45) through (4-47) in Ref. 3, viz.,

a) = [exp(-~2)] ~ 0 (~2"[n !)Qn(a),

(2)

Q,(a) = (a/2n - 1)[2/x/(-~ - 2aQ,_t(a)]

(2a)

¢,(~, where

and

Qo(a) = [exp(a2)l[erfc(a)] oo

= [exp(aE)](2/X/(-~) f [exp(-x2)] dx. Ja For a ~ 3,

Qo(a) is

(3)

[see Eq. (7.1.26) of Ref. 4] 5

Qo(a) = ~

a,.t m

m=l

tThis work was supported by the U.S. Army Research Officeunder Contract No. DAAG29-80-C-0001.

89

(4)

90

Kt.aus G. P. SULZMANN

with t = 1/(1 + aoa), ao = 0.327 591 117,

a, = 0.254 829 592,

a2 = -0.284496 736,

a3 = 1.421 413 741,

a4 = -1.453 152 027,

a5 = 1.061 405 429.

(4a)

(4b)

The error in Qo(a) increases with increasing a but is less than 8 × 10 -~ for a = 3. For a ~>3, Qo(a) may be expressed as [see Eq. (592) of Ref. 5] Qo(a) = [1/C(-~a]{1 + ~__, [(2m)!/m !](-1/4a2) m},

(5)

which is rapidly converging and should be terminated after the last decreasing term, i.e., for m -< a 2. Its accuracy increases with increasing a and, for example, for a = 3 the error in Qo(a) is less than 4 x 10 -4 if only four terms are taken into account. EXECUTION The HP-34C calculator programs for determination of values for Eq. (2) together with those for Eqs. (4) and (5) are given in Appendices 1 through 3. Before execution of the programs, the values for the coefficients ao through a5 of Eq. (4b) are stored permanently in the storage registers STO 0 through STO 5. 0<~£~<2 AND0~
Note added in proof. Largervaluesfor ~:can be used as longas the storageregister STO 9 does not overflow.For a -> 10the Lorentz profile applies in good approximationfor all values of (, REFERENCES 1. J. H. Pierluissi, P. C. Vanderwood,and R. B. Gomex,JQSRT 18, 555 (1977). 2. J. Humli~ek, JQSRT 27, 437 (1982). 3. S. S. Penner, Quantitative Molecular Spectroscopy and Gas Emissivities, Chapter 4. Addison-Wesley, Reading, Massachussetts (1959). 4. M. Abramowitzand J. A. Stegun,(Eds.), Handbook of Mathematical Functions withFormulas, Graphs, and Mathematical Tables, p. 299. NBS Appl. Mathem. Ser. 55, 3rd print., U.S. GovernmentPrint Office,Washington,DC (1965). 5. H. B. Dwight, Tables o.f Integrals and Other Mathematical Data, p. 136.Macmillan,New York (1961).

91

A simple method for calculating Voigt-profiles Appendix 1. HP-MC program for the evaluation of Qo(a) from Eqs. (4) through (4b). ol

hLBL

oz

STO 7

O3

RCL

19

A

=a

0

×

21

+

×

22

O5

1

23

+

O8

STO 6

09

RCL

=t

1

ll

RCL gx

13

RCL

26

×

Z7

+ RCL

Z9

6

2

RCL

4

28

X

2

6

hy x

25

h I/x

I0

RCL

24

O7

3

20

04

06

RCL

4

6

5

30

hyx

31

RCL

5

14

X

32

x

15

+

33

+

34

STO 6

35

R/S

16

RCL

17

6 3

=Q0(a)

hyx

18

Appendix 2. HP-34C program for the evaluation of ~P(~, a) from Eqs. (2) and (2a). 36

hLBL

37

STO 8

B

38

0

39

STO 9

= ~

x

63

1

64

40

0

41

STO fI

42

RCL

43

STO 9

44

hLBL

45

2

46

62

=n

6

= An 0

h~

65

+

66

STO 6

67

RCL fI

68

hx!

69

RCL

71

RCL

47

73

48

74

49

RCL

6

50

RCL

7

51

+

70

7Z

= Qn(a); n = l . . . . .

8 fI 2

x hy x

N+I

75

×

76

STO

X

77

R/S

52

2

78

GTO 0

53

X

79

hLBL

80

81

RCL 2 gx

= a

54 55

RCL

56

7

X

82

CHS

57

I

83

ge x

58

RCL fl +

84

RCL

59 6O

STO f I

61

2

= n+l

85

×

86

R/S

+9

=A |

8

9

= n~_l A n n~

n=l,...,N.

N.

92

KLAUSG. P. SULZMANN Appendix 3. HP-34C program for the evaluation of Oo(a) from Eq. (5). 87

hLBL 2

108

88

STO.7 z

109

RCL fl

II0

Z

89

gx

90

4

III

91

×

112

92

CI-tS

113

)<

93

h I/x

114

STO +9

94

STO 8

115

R/S

95

0

116

GTO 4

96

STO 9

117

hLBL

97

0

118

RCL 9

98

STO f I

99 .00

= (.X/4a z) N-1 =7

Bn

hx!

(N)

119

I

hLBL 4

120

+

RCL 8

121

=n-I

RCL

122

102

I

123

hv

103

+

1 24

f27-

STO f I

125

3

7

RCL f l

--H

= Bn, n = 1 , 2 . . . . ,N.

#

I01

.04

= n~=i Bn

÷

105

h7 x

1 26

STO 6

106

RCI~ fI

127

RyS

107

hx:

=Qo(a)