cloudy trunk
Loading...
Searching...
No Matches
atmdat_3body.cpp
Go to the documentation of this file.
1/* This file is part of Cloudy and is copyright (C)1978-2013 by Gary J. Ferland and
2 * others. For conditions of distribution and use see copyright notice in license.txt */
3/*atmdat_3body derive three-body recombination coefficients */
4/*da interpolate on three body recombination by Steve Cota */
5#include "cddefines.h"
6#include "ionbal.h"
7#include "phycon.h"
8#include "dense.h"
9#include "trace.h"
10#include "save.h"
11#include "atmdat.h"
12
13#define MAXZ 28
14
15STATIC void blkdata1(void);
16STATIC double da(double z, double temp, double eden);
17
18static double a2[63],
19 b2[63],
20 x2[63];
21
22static double a0[83],
23 x0[83];
24static realnum b0[83],
25 b1[83];
26
27static double a1[83],
28 x1[83];
29
30static double tz[83],
31 zlog7[28],
32 zlog2[28];
33
34#define RC_INI(rs) (rs[_r].rc>1 ? DEC_RC_(rs) : (rs[_r].rc==1 ? INC_NDX_(rs) : rs[_r].ini ))
35#define DEC_RC_(rs) (rs[_r].rc--,rs[_r].ini)
36#define INC_NDX_(rs) (_r++,rs[_r-1].ini)
37
38/* this "mapping function" occurs below */
39STATIC double xmap(double x[],
40 double y[],
41 double x0);
42
43/* inverse routine, also below */
44STATIC double xinvrs(double y,
45 double a,
46 double b,
47 double u,
48 double v,
49 long int *ifail);
50
51/* =================================================================== */
52void atmdat_3body(void)
53{
54 long int i,
55 iup;
56
57 DEBUG_ENTRY( "atmdat_3body()" );
58
59
60 if( ionbal.lgNoCota )
61 {
62 for( i=0; i < LIMELM; i++ )
63 {
64 ionbal.CotaRate[i] = 0.;
65 }
66 atmdat.nsbig = 0;
67 return;
68 }
69
70 if( atmdat.nsbig == 0 )
71 {
72 /* steve cota only defined things up to 28 */
73 iup = MIN2(28,LIMELM);
74 }
75 else
76 {
77 iup = MIN3( LIMELM , atmdat.nsbig , 28 );
78 }
79
80 for( i=0; i < iup; i++ )
81 {
82 ionbal.CotaRate[i] = (realnum)da((double)(i+1), MAX2(100.,phycon.te), dense.eden);
83 }
84
85 atmdat.nsbig = 0;
86
87 if( trace.lgTrace && trace.lgTrace3Bod )
88 {
89 fprintf( ioQQQ, " 3BOD rate:" );
90 for( i=1; i <= 14; i++ )
91 {
92 fprintf( ioQQQ, "%8.1e", ionbal.CotaRate[i-1] );
93 }
94 fprintf( ioQQQ, "\n" );
95 }
96
97 if( save.lgioRecom )
98 {
99 /* option to save coefficients */
100 fprintf( save.ioRecom, " 3-body rec coef vs charge \n" );
101 for( i=0; i < iup; i++ )
102 {
103 fprintf( save.ioRecom, "%3ld%10.2e\n", i+1, ionbal.CotaRate[i] );
104 }
105 fprintf( save.ioRecom, "\n");
106 }
107 return;
108}
109
110/* =================================================================== */
111STATIC double da(double z, double temp, double eden)
112{
113 /*lint -e736 loss of precision in assignment in translated data */
114 long int jfail,
115 nt,
116 nt0,
117 nt1,
118 nz;
119
120 static bool lgCalled=false;
121 double a,
122 alogn,
123 alognc,
124 alogt,
125 b,
126 c,
127 d,
128 da_v,
129 expp,
130 u,
131 v,
132 x,
133 xnc,
134 y,
135 zlog;
136 double yya[3],
137 xx[3],
138 yyb[3],
139 yyx[3],
140 yyy[3];
141
142 /* alogte is base 10 log of temperature and elec density*/
143 double alogte , alogne;
144
145 DEBUG_ENTRY( "da()" );
146
147 /* WRITTEN BY S. A. COTA, 2/87
148 * */
149
150 /* MAXZ IS THE MAXIMUM EFFECTIVE NUCLEAR CHARGE ( = IONIC CHARGE + 1 )
151 * WHICH THE DIMENSION STATEMENTS ACCOMODATE.
152 *
153 * IT IS USED ONLY FOR THE ARRAY ZLOG7 ( = 7 * LOG ( Z ) )
154 * AND THE ARRAY ZLOG2 ( = 2 * LOG ( Z ) ) . THESE ARRAYS
155 * CONTAIN EASILY CALCULATED VALUES, WHICH HAVE BEEN STORED
156 * TO SAVE TIME IN EXECUTION.
157 *
158 * IF MAXZ IS EXCEEDED, THIS PROGRAM SIMPLY CALCULATES THE
159 * LOGS INSTEAD OF LOOKING THEM UP.
160 *
161 * */
162
163 if( !lgCalled )
164 {
165 lgCalled = true;
166 blkdata1();
167 }
168
169 /*begin sanity check */
170 ASSERT( zlog7[1] > 0. );
171
172 nz = (long)(z + .1);
173 // The original routine has major discontinuities
174 // The use of eden_limited (here and at the end of the routine) is an attempt
175 // to smooth these problems and still get roughly the same behavior.
176 double eden_limited = MIN2( eden, 1e5 );
177 alogne = log10(eden_limited);
178 alogte = log10(temp);
179 if( nz > MAXZ )
180 {
181 zlog = log10(z);
182 alogt = alogte - 2.*zlog;
183 alogn = alogne - 7.*zlog;
184 }
185 else
186 {
187 alogt = alogte - zlog2[nz-1];
188 alogn = alogne - zlog7[nz-1];
189 }
190
191 /* CHECK IF PARAMETERS ARE WITHIN BOUNDS. IF NOT, INCREMENT
192 * APPROPRIATE ERROR COUNTER AND SET TO BOUNDARY IF
193 * NECESSARY:
194 *
195 * DEFINITION OF ERROR COUNTERS:
196 *
197 * ILT : LOW T
198 * ILTLN : LOW T , LOW N
199 * ILTHN : LOW T , HIGH N
200 * IHTHN : HIGH T , HIGH N
201 * */
202 if( alogt < 0. )
203 {
204 ionbal.ilt += 1;
205 alogt = 0.;
206 }
207
208 if( alogt <= 2.1760913 )
209 {
210 if( alogn < (3.5*alogt - 8.) )
211 {
212 ionbal.iltln += 1;
213 }
214 else if( alogn > (3.5*alogt - 2.) )
215 {
216 ionbal.ilthn += 1;
217 alogn = 3.5*alogt - 2.;
218 }
219
220 }
221 else if( alogt <= 2.4771213 )
222 {
223 if( alogn > 9. )
224 {
225 ASSERT( 0 );
226 ionbal.ilthn += 1;
227 alogn = 9.;
228 }
229
230 }
231 else if( alogt <= 5.1139434 )
232 {
233 if( alogn > 13. )
234 {
235 ASSERT( 0 );
236 ionbal.ihthn += 1;
237 alogn = 13.;
238 }
239
240 }
241
242 // limit used temperature to 10^5 K and
243 // extrapolate with T^-2 at end of routine (to avoid discontinuous behavior).
244 double alogt_limited = MIN2( alogt, 5.0 );
245 double alogt_save = alogt;
246 alogt = alogt_limited;
247
248 /* LOCATE POSITION IN ARRAYS */
249 if( alogt <= 2. )
250 {
251 nt = (long)(9.9657843*alogt + 1.);
252 }
253 else
254 {
255 nt = (long)(19.931568*alogt - 19.);
256 }
257 nt = MIN2(83,nt);
258 nt = MAX2(1,nt);
259
260 /* CENTER UP SINCE ARRAY VALUES ARE ROUNDED */
261 if( fabs(alogt-tz[nt-1]) >= fabs(alogt-tz[MIN2(83,nt+1)-1]) )
262 {
263 nt = MIN2(83,nt+1);
264 }
265 else if( fabs(alogt-tz[nt-1]) > fabs(alogt-tz[MAX2(1,nt-1)-1]) )
266 {
267 nt = MAX2(1,nt-1);
268 }
269
270 /* CHECK IF INTERPOLATION IS NEEDED AND PROCEED IF NOT.*/
271 if( fabs(alogt-tz[nt-1]) < 0.00001 )
272 {
273 if( z != 1.0 )
274 {
275 c = a1[nt-1];
276 d = b1[nt-1];
277 u = x1[nt-1];
278 v = 8.90;
279 }
280 else
281 {
282 nt = MAX2(21,nt);
283 nt = MIN2(83,nt);
284 c = a2[nt-(21)];
285 d = b2[nt-(21)];
286 u = x2[nt-(21)];
287 v = 9.40;
288 }
289
290 xnc = xinvrs(alogn,c,d,u,v,&jfail);
291 if( xnc <= 0. || jfail != 0 )
292 {
293 ionbal.ifail = 1;
294 jfail = 1;
295 da_v = 0.;
296 return( da_v );
297 }
298 alognc = log10(xnc);
299
300 a = a0[nt-1];
301 b = b0[nt-1];
302 x = -2.45;
303 y = x0[nt-1];
304 nt0 = nt - 1;
305
306 /* IF INTERPOLATION WAS REQUIRED,
307 * CHECK THAT NT IS NOT ON THE EDGE OF A DISCONTINUITY,
308 * EITHER AT END OF ARRAYS OR WITHIN THEM,
309 * WHERE VALUES CHANGE ABRUPTLY.
310 * */
311 }
312 else
313 {
314 if( (nt <= 21) && (z == 1.0) )
315 {
316 nt = 22;
317 }
318 else if( nt <= 1 )
319 {
320 nt = 2;
321 }
322 else if( nt >= 83 )
323 {
324 nt = 82;
325 }
326 else if( nt == 24 )
327 {
328 if( alogt <= 2.1760913 )
329 {
330 nt = 23;
331 }
332 else
333 {
334 nt = 25;
335 }
336 }
337 else if( nt == 30 )
338 {
339 if( alogt <= 2.4771213 )
340 {
341 nt = 29;
342 }
343 else
344 {
345 nt = 31;
346 }
347 }
348
349 nt0 = nt - 1;
350 nt1 = nt + 1;
351 xx[0] = tz[nt0-1];
352 xx[1] = tz[nt-1];
353 xx[2] = tz[nt1-1];
354
355 if( z != 1.0 )
356 {
357 if( nt0 == 24 )
358 {
359 yya[0] = 17.2880135;
360 yyb[0] = 6.93410742e03;
361 yyx[0] = -3.75;
362 }
363 else if( nt0 == 30 )
364 {
365 yya[0] = 17.4317989;
366 yyb[0] = 1.36653821e03;
367 yyx[0] = -3.40;
368 }
369 else
370 {
371 yya[0] = a1[nt0-1];
372 yyb[0] = b1[nt0-1];
373 yyx[0] = x1[nt0-1];
374 }
375
376 yya[1] = a1[nt-1];
377 yya[2] = a1[nt1-1];
378 c = xmap(xx,yya,alogt);
379 yyb[1] = b1[nt-1];
380 yyb[2] = b1[nt1-1];
381 d = xmap(xx,yyb,alogt);
382 yyx[1] = x1[nt-1];
383 yyx[2] = x1[nt1-1];
384 u = xmap(xx,yyx,alogt);
385 v = 8.90;
386
387 }
388 else
389 {
390 if( nt0 == 24 )
391 {
392 yya[0] = 20.1895161;
393 yyb[0] = 2.25774918e01;
394 yyx[0] = -1.66;
395 }
396 else if( nt0 == 30 )
397 {
398 yya[0] = 19.8647804;
399 yyb[0] = 6.70408707e02;
400 yyx[0] = -2.12;
401 }
402 else
403 {
404 yya[0] = a2[nt0-(21)];
405 yyb[0] = b2[nt0-(21)];
406 yyx[0] = x2[nt0-(21)];
407 }
408
409 yya[1] = a2[nt-(21)];
410 yya[2] = a2[nt1-(21)];
411 c = xmap(xx,yya,alogt);
412 yyb[1] = b2[nt-(21)];
413 yyb[2] = b2[nt1-(21)];
414 d = xmap(xx,yyb,alogt);
415 yyx[1] = x2[nt-(21)];
416 yyx[2] = x2[nt1-(21)];
417 u = xmap(xx,yyx,alogt);
418 v = 9.40;
419 }
420
421 xnc = xinvrs(alogn,c,d,u,v,&jfail);
422 if( xnc <= 0. || jfail != 0 )
423 {
424 ionbal.ifail = 1;
425 jfail = 1;
426 da_v = 0.;
427 return( da_v );
428 }
429 alognc = log10(xnc);
430
431 if( nt0 == 24 )
432 {
433 yya[0] = -8.04963875;
434 yyb[0] = 1.07205127e03;
435 yyy[0] = 2.05;
436 }
437 else if( nt0 == 30 )
438 {
439 yya[0] = -8.54721069;
440 yyb[0] = 4.70450195e02;
441 yyy[0] = 2.05;
442 }
443 else
444 {
445 yya[0] = a0[nt0-1];
446 yyb[0] = b0[nt0-1];
447 yyy[0] = x0[nt0-1];
448 }
449
450 yya[1] = a0[nt-1];
451 yya[2] = a0[nt1-1];
452 a = xmap(xx,yya,alogt);
453 yyb[1] = b0[nt-1];
454 yyb[2] = b0[nt1-1];
455 b = xmap(xx,yyb,alogt);
456 x = -2.45;
457 yyy[1] = x0[nt-1];
458 yyy[2] = x0[nt1-1];
459 y = xmap(xx,yyy,alogt);
460 }
461
462 expp = a - y*alognc + b*pow(xnc,x);
463 if( expp < 37 )
464 {
465 da_v = z*pow(10.,expp);
466 }
467 else
468 {
469 da_v = 0.;
470 }
471 ionbal.ifail += jfail;
472
473 da_v *= pow( eden/eden_limited, 0.25 );
474 da_v *= pow( 10., 2.*(alogt_limited-alogt_save) );
475
476 return( da_v );
477}
478
479/****************************************************************************** */
480STATIC void blkdata1(void)
481{
482 /*block data with Steve Cota's 3-body recombination coefficients */
483
484 /* data for function da.
485 *
486 * S. A. COTA, 2/1987
487 * */
488
489 long int _i,
490 _r;
491 realnum *const ba0 = (realnum*)b0;
492 realnum *const ba1 = (realnum*)b1;
493 realnum *const bb0 = (realnum*)((char*)(b0 + 79));
494 realnum *const bb1 = (realnum*)((char*)(b1 + 79));
495
496 /* to fix all the conversion errors, change realnum ini to double ini,
497 * but chech that results still ok */
498 { static struct{ long rc; double ini; } _rs0[] = {
499 {1, 0.00000e00},
500 {1, 2.10721e00},
501 {1, 3.33985e00},
502 {1, 4.21442e00},
503 {1, 4.89279e00},
504 {1, 5.44706e00},
505 {1, 5.91569e00},
506 {1, 6.32163e00},
507 {1, 6.67970e00},
508 {1, 7.00000e00},
509 {1, 7.28975e00},
510 {1, 7.55427e00},
511 {1, 7.79760e00},
512 {1, 8.02290e00},
513 {1, 8.23264e00},
514 {1, 8.42884e00},
515 {1, 8.61314e00},
516 {1, 8.78691e00},
517 {1, 8.95128e00},
518 {1, 9.10721e00},
519 {1, 9.25554e00},
520 {1, 9.39696e00},
521 {1, 9.53209e00},
522 {1, 9.66148e00},
523 {1, 9.78558e00},
524 {1, 9.90481e00},
525 {1, 10.01954e00},
526 {1, 10.13010e00},
527 {0L, 0}
528 };
529 for(_i=_r=0L; _i < 28; _i++)
530 zlog7[_i] = RC_INI(_rs0); }
531 { static struct{ long rc; double ini; } _rs1[] = {
532 {1, 0.00000e00},
533 {1, 6.02060e-01},
534 {1, 9.54243e-01},
535 {1, 1.20412e00},
536 {1, 1.39794e00},
537 {1, 1.55630e00},
538 {1, 1.69020e00},
539 {1, 1.80618e00},
540 {1, 1.90849e00},
541 {1, 2.00000e00},
542 {1, 2.08279e00},
543 {1, 2.15836e00},
544 {1, 2.22789e00},
545 {1, 2.29226e00},
546 {1, 2.35218e00},
547 {1, 2.40824e00},
548 {1, 2.46090e00},
549 {1, 2.51055e00},
550 {1, 2.55751e00},
551 {1, 2.60206e00},
552 {1, 2.64444e00},
553 {1, 2.68485e00},
554 {1, 2.72346e00},
555 {1, 2.76042e00},
556 {1, 2.79588e00},
557 {1, 2.82995e00},
558 {1, 2.86272e00},
559 {1, 2.89431e00},
560 {0L, 0}
561 };
562 for(_i=_r=0L; _i < 28; _i++)
563 zlog2[_i] = RC_INI(_rs1); }
564 { static struct{ long rc; double ini; } _rs2[] = {
565 {1, 0.},
566 {1, 0.09691},
567 {1, 0.17609},
568 {1, 0.30103},
569 {1, 0.39794},
570 {1, 0.47712},
571 {1, 0.60206},
572 {1, 0.69897},
573 {1, 0.77815},
574 {1, 0.90309},
575 {1, 1.00000},
576 {1, 1.07918},
577 {1, 1.20412},
578 {1, 1.30103},
579 {1, 1.39794},
580 {1, 1.47712},
581 {1, 1.60206},
582 {1, 1.69897},
583 {1, 1.77815},
584 {1, 1.90309},
585 {1, 2.00000},
586 {1, 2.06070},
587 {1, 2.09691},
588 {1, 2.17609},
589 {1, 2.20412},
590 {1, 2.24304},
591 {1, 2.30103},
592 {1, 2.35218},
593 {1, 2.39794},
594 {1, 2.47712},
595 {1, 2.51188},
596 {1, 2.54407},
597 {1, 2.60206},
598 {1, 2.65321},
599 {1, 2.69897},
600 {1, 2.75967},
601 {1, 2.81291},
602 {1, 2.86034},
603 {1, 2.91645},
604 {1, 2.95424},
605 {1, 3.00000},
606 {1, 3.07918},
607 {1, 3.11394},
608 {1, 3.17609},
609 {1, 3.20412},
610 {1, 3.25527},
611 {1, 3.30103},
612 {1, 3.36173},
613 {1, 3.39794},
614 {1, 3.46240},
615 {1, 3.51188},
616 {1, 3.56820},
617 {1, 3.60206},
618 {1, 3.66276},
619 {1, 3.72016},
620 {1, 3.76343},
621 {1, 3.81291},
622 {1, 3.86034},
623 {1, 3.90309},
624 {1, 3.95424},
625 {1, 4.02119},
626 {1, 4.06070},
627 {1, 4.11394},
628 {1, 4.16137},
629 {1, 4.20412},
630 {1, 4.25527},
631 {1, 4.31175},
632 {1, 4.36173},
633 {1, 4.41497},
634 {1, 4.46240},
635 {1, 4.51521},
636 {1, 4.56526},
637 {1, 4.61542},
638 {1, 4.66605},
639 {1, 4.71600},
640 {1, 4.76343},
641 {1, 4.81624},
642 {1, 4.86629},
643 {1, 4.91645},
644 {1, 4.96614},
645 {1, 5.02119},
646 {1, 5.06726},
647 {1, 5.11394},
648 {0L, 0 }
649 };
650 for(_i=_r=0L; _i < 83; _i++)
651 tz[_i] = RC_INI(_rs2); }
652 { static struct{ long rc; double ini; } _rs3[] = {
653 {1, -4.31396484},
654 {1, -4.56640625},
655 {1, -4.74560547},
656 {1, -4.98535156},
657 {1, -5.15373850},
658 {1, -5.28123093},
659 {1, -5.48215008},
660 {1, -5.63811255},
661 {1, -5.76573515},
662 {1, -5.96755028},
663 {1, -6.12449837},
664 {1, -6.25304174},
665 {1, -6.45615673},
666 {1, -6.61384058},
667 {1, -6.77161551},
668 {1, -6.90069818},
669 {1, -7.10470295},
670 {1, -7.26322412},
671 {1, -7.39289951},
672 {1, -7.59792519},
673 {1, -7.75725508},
674 {1, -7.85722494},
675 {1, -7.91697407},
676 {1, -8.04758644},
677 {1, -8.09447479},
678 {1, -8.15859795},
679 {1, -8.25424385},
680 {1, -8.33880615},
681 {1, -8.41452408},
682 {1, -8.54581165},
683 {1, -8.60400581},
684 {1, -8.65751839},
685 {1, -8.75414848},
686 {1, -8.83946800},
687 {1, -8.91589737},
688 {1, -9.01741695},
689 {1, -9.10663033},
690 {1, -9.18621922},
691 {1, -9.28059292},
692 {1, -9.34430218},
693 {1, -9.42154408},
694 {1, -9.55562973},
695 {1, -9.61459446},
696 {1, -9.72023010},
697 {1, -9.76802444},
698 {1, -9.85540199},
699 {1, -9.93374062},
700 {1, -10.03800774},
701 {1, -10.10044670},
702 {1, -10.21178055},
703 {1, -10.29757786},
704 {1, -10.39561272},
705 {1, -10.45469666},
706 {1, -10.56102180},
707 {1, -10.66205502},
708 {1, -10.73780537},
709 {1, -10.82557774},
710 {1, -10.91007328},
711 {1, -10.98659325},
712 {1, -11.07857418},
713 {1, -11.19975281},
714 {1, -11.27170753},
715 {1, -11.36930943},
716 {1, -11.45675945},
717 {1, -11.53620148},
718 {1, -11.63198853},
719 {1, -11.73875237},
720 {1, -11.83400822},
721 {1, -11.93677044},
722 {1, -12.02933311},
723 {1, -12.13374519},
724 {1, -12.23410702},
725 {1, -12.33664989},
726 {1, -12.44163322},
727 {1, -12.54730415},
728 {1, -12.64975739},
729 {1, -12.76682186},
730 {1, -12.88185978},
731 {1, -13.00052643},
732 {1, -13.12289810},
733 {1, -13.26689529},
734 {1, -13.39390945},
735 {1, -30.00000000},
736 {0L, 0 }
737 };
738 for(_i=_r=0L; _i < 83; _i++)
739 a0[_i] = RC_INI(_rs3); }
740 { static struct{ long rc; double ini; } _rs4[] = {
741 {1, 4.53776000e05},
742 {1, 3.48304000e05},
743 {1, 2.80224000e05},
744 {1, 1.98128000e05},
745 {1, 1.51219797e05},
746 {1, 1.21113266e05},
747 {1, 8.52812109e04},
748 {1, 6.49598125e04},
749 {1, 5.20075781e04},
750 {1, 3.66190977e04},
751 {1, 2.79060723e04},
752 {1, 2.23634102e04},
753 {1, 1.57683135e04},
754 {1, 1.20284307e04},
755 {1, 9.17755273e03},
756 {1, 7.36044873e03},
757 {1, 5.19871680e03},
758 {1, 3.97240796e03},
759 {1, 3.18934326e03},
760 {1, 2.25737622e03},
761 {1, 1.72767114e03},
762 {1, 1.46202722e03},
763 {1, 1.32456628e03},
764 {1, 1.06499792e03},
765 {1, 9.92735291e02},
766 {1, 8.91604858e02},
767 {1, 7.59411560e02},
768 {1, 6.59120056e02},
769 {1, 5.80688965e02},
770 {1, 4.66602264e02},
771 {1, 4.27612854e02},
772 {1, 3.91531494e02},
773 {1, 3.34516968e02},
774 {1, 2.91021820e02},
775 {1, 2.56853912e02},
776 {1, 2.17598007e02},
777 {1, 1.88145462e02},
778 {1, 1.65329865e02},
779 {1, 1.41960342e02},
780 {1, 1.28181686e02},
781 {1, 1.13336761e02},
782 {1, 9.17785034e01},
783 {1, 8.36242981e01},
784 {1, 7.08843536e01},
785 {1, 6.58346100e01},
786 {1, 5.75790634e01},
787 {1, 5.11293755e01},
788 {1, 4.37563019e01},
789 {1, 3.99226875e01},
790 {1, 3.39562836e01},
791 {1, 3.00413170e01},
792 {1, 2.61871891e01},
793 {1, 2.41310368e01},
794 {1, 2.08853607e01},
795 {1, 1.82632275e01},
796 {1, 1.60007000e01},
797 {1, 1.42617064e01},
798 {1, 1.27951088e01},
799 {1, 1.16221066e01},
800 {1, 1.03779335e01},
801 {1, 8.97864914e00},
802 {1, 8.25593281e00},
803 {1, 7.39339924e00},
804 {1, 6.70784378e00},
805 {1, 6.16084862e00},
806 {1, 5.57818031e00},
807 {1, 5.01341105e00},
808 {1, 4.55679178e00},
809 {1, 4.13692093e00},
810 {1, 3.80004382e00},
811 {1, 3.46328306e00},
812 {1, 3.17340493e00},
813 {1, 2.93525696e00},
814 {1, 2.69083858e00},
815 {1, 2.46588683e00},
816 {1, 2.26083040e00},
817 {1, 2.04337358e00},
818 {1, 1.89027369e00},
819 {1, 1.69208312e00},
820 {0L, 0 }
821 };
822 for(_i=_r=0L; _i < 79; _i++)
823 ba0[_i] = (realnum)RC_INI(_rs4); }
824 { static struct{ long rc; double ini; } _rs5[] = {
825 {1, 1.48992336e00},
826 {1, 1.32466662e00},
827 {1, 1.10697949e00},
828 {1, 9.29813862e-01},
829 {0L, 0 }
830 };
831 for(_i=_r=0L; _i < 4; _i++)
832 bb0[_i] = (realnum)RC_INI(_rs5); }
833 { static struct{ long rc; double ini; } _rs6[] = {
834 {1, 2.12597656},
835 {1, 2.08984375},
836 {1, 2.06958008},
837 {1, 2.05444336},
838 {1, 2.05},
839 {1, 2.05},
840 {1, 2.05},
841 {1, 2.05},
842 {1, 2.05},
843 {1, 2.05},
844 {1, 2.05},
845 {1, 2.05},
846 {1, 2.05},
847 {1, 2.05},
848 {1, 2.05},
849 {1, 2.05},
850 {1, 2.05},
851 {1, 2.05},
852 {1, 2.05},
853 {1, 2.05},
854 {1, 2.05},
855 {1, 2.05},
856 {1, 2.05},
857 {1, 2.05},
858 {1, 2.05},
859 {1, 2.05},
860 {1, 2.05},
861 {1, 2.05},
862 {1, 2.05},
863 {1, 2.05},
864 {1, 2.05},
865 {1, 2.05},
866 {1, 2.05},
867 {1, 2.05},
868 {1, 2.05},
869 {1, 2.05},
870 {1, 2.05},
871 {1, 2.05},
872 {1, 2.05},
873 {1, 2.05},
874 {1, 2.05},
875 {1, 2.05},
876 {1, 2.05},
877 {1, 2.05},
878 {1, 2.05},
879 {1, 2.05},
880 {1, 2.05},
881 {1, 2.05},
882 {1, 2.05},
883 {1, 2.05},
884 {1, 2.05},
885 {1, 2.05},
886 {1, 2.05},
887 {1, 2.05},
888 {1, 2.05},
889 {1, 2.05},
890 {1, 2.05},
891 {1, 2.05},
892 {1, 2.05},
893 {1, 2.05},
894 {1, 2.05},
895 {1, 2.05},
896 {1, 2.05},
897 {1, 2.05},
898 {1, 2.05},
899 {1, 2.05},
900 {1, 2.05},
901 {1, 2.05},
902 {1, 2.05},
903 {1, 2.05},
904 {1, 2.05},
905 {1, 2.05},
906 {1, 2.05},
907 {1, 2.05},
908 {1, 2.05},
909 {1, 2.05},
910 {1, 2.05},
911 {1, 2.05},
912 {1, 2.05},
913 {1, 2.05},
914 {1, 2.05},
915 {1, 2.05},
916 {1, 2.05},
917 {0L, 0 }
918 };
919 for(_i=_r=0L; _i < 83; _i++)
920 x0[_i] = RC_INI(_rs6); }
921
922 { static struct{ long rc; double ini; } _rs7[] = {
923 {1, 16.23337936},
924 {1, 16.27946854},
925 {1, 16.31696320},
926 {1, 16.37597656},
927 {1, 16.42210960},
928 {1, 16.45996284},
929 {1, 16.51994896},
930 {1, 16.56644440},
931 {1, 16.60460854},
932 {1, 16.66510773},
933 {1, 16.71198654},
934 {1, 16.75038719},
935 {1, 16.81106949},
936 {1, 16.85778809},
937 {1, 16.90416527},
938 {1, 16.94209099},
939 {1, 17.00195694},
940 {1, 17.04838943},
941 {1, 17.08633804},
942 {1, 17.14627838},
943 {1, 17.19270515},
944 {1, 17.22186279},
945 {1, 17.23933601},
946 {1, 17.27728271},
947 {1, 17.30161858},
948 {1, 17.32085800},
949 {1, 17.34928894},
950 {1, 17.37349129},
951 {1, 17.39528084},
952 {1, 17.43282318},
953 {1, 17.44827652},
954 {1, 17.46357536},
955 {1, 17.49082375},
956 {1, 17.51517677},
957 {1, 17.53697205},
958 {1, 17.56587219},
959 {1, 17.59125519},
960 {1, 17.61410332},
961 {1, 17.64081383},
962 {1, 17.65900803},
963 {1, 17.68086433},
964 {1, 17.71843529},
965 {1, 17.73512840},
966 {1, 17.76512146},
967 {1, 17.77873421},
968 {1, 17.80340767},
969 {1, 17.82530022},
970 {1, 17.85470963},
971 {1, 17.87210464},
972 {1, 17.90334511},
973 {1, 17.92751503},
974 {1, 17.95458603},
975 {1, 17.97117233},
976 {1, 18.00062943},
977 {1, 18.02842712},
978 {1, 18.04934502},
979 {1, 18.07340050},
980 {1, 18.09639168},
981 {1, 18.11732864},
982 {1, 18.14218903},
983 {1, 18.17465591},
984 {1, 18.19370079},
985 {1, 18.21962166},
986 {1, 18.24237251},
987 {1, 18.26305962},
988 {1, 18.28767967},
989 {1, 18.31531525},
990 {1, 18.33900452},
991 {1, 18.36478043},
992 {1, 18.38741112},
993 {1, 18.41271973},
994 {1, 18.43644333},
995 {1, 18.46075630},
996 {1, 18.48509216},
997 {1, 18.50897980},
998 {1, 18.53143501},
999 {1, 18.55570030},
1000 {1, 18.58008003},
1001 {1, 18.60348320},
1002 {1, 18.62536430},
1003 {1, 18.65199852},
1004 {1, 18.67623520},
1005 {1, 18.70072174},
1006 {0L, 0 }
1007 };
1008 for(_i=_r=0L; _i < 83; _i++)
1009 a1[_i] = RC_INI(_rs7); }
1010 { static struct{ long rc; double ini; } _rs8[] = {
1011 {1, 1.09462866e10},
1012 {1, 9.32986675e09},
1013 {1, 6.15947008e09},
1014 {1, 1.54486170e09},
1015 {1, 1.00812454e09},
1016 {1, 7.00559552e08},
1017 {1, 6.25999232e08},
1018 {1, 3.50779968e08},
1019 {1, 3.11956288e08},
1020 {1, 3.74866016e08},
1021 {1, 2.47019424e08},
1022 {1, 1.73169776e08},
1023 {1, 1.01753168e08},
1024 {1, 6.81861920e07},
1025 {1, 4.61764000e07},
1026 {1, 3.31671360e07},
1027 {1, 2.03160540e07},
1028 {1, 1.40249480e07},
1029 {1, 1.02577860e07},
1030 {1, 3.53822650e06},
1031 {1, 1.32563388e06},
1032 {1, 9.14284688e05},
1033 {1, 1.25230388e06},
1034 {1, 3.17865156e05},
1035 {1, 4.76750244e03},
1036 {1, 4.81107031e03},
1037 {1, 4.88406152e03},
1038 {1, 4.80611279e03},
1039 {1, 4.78843652e03},
1040 {1, 4.65988477e03},
1041 {1, 1.26723059e03},
1042 {1, 1.20825342e03},
1043 {1, 8.66052612e02},
1044 {1, 7.76661316e02},
1045 {1, 7.05279358e02},
1046 {1, 6.21722656e02},
1047 {1, 5.46207581e02},
1048 {1, 4.96247742e02},
1049 {1, 4.26340118e02},
1050 {1, 3.96090424e02},
1051 {1, 3.48429657e02},
1052 {1, 2.37949142e02},
1053 {1, 2.14678406e02},
1054 {1, 1.81019180e02},
1055 {1, 1.68923676e02},
1056 {1, 1.45979385e02},
1057 {1, 1.25311127e02},
1058 {1, 1.05205528e02},
1059 {1, 9.39378357e01},
1060 {1, 7.75339966e01},
1061 {1, 6.68987427e01},
1062 {1, 5.53580055e01},
1063 {1, 5.00100212e01},
1064 {1, 4.14198608e01},
1065 {1, 3.46289063e01},
1066 {1, 3.00775223e01},
1067 {1, 2.60294399e01},
1068 {1, 2.26602840e01},
1069 {1, 2.02123032e01},
1070 {1, 1.76353855e01},
1071 {1, 1.47198439e01},
1072 {1, 1.33078461e01},
1073 {1, 1.17181997e01},
1074 {1, 1.04125805e01},
1075 {1, 9.45785904e00},
1076 {1, 8.42799950e00},
1077 {1, 7.62769842e00},
1078 {1, 6.85484743e00},
1079 {1, 6.25903368e00},
1080 {1, 5.75135279e00},
1081 {1, 5.28468180e00},
1082 {1, 4.87669659e00},
1083 {1, 4.57353973e00},
1084 {1, 4.30108690e00},
1085 {1, 4.05412245e00},
1086 {1, 3.83283114e00},
1087 {1, 3.57902861e00},
1088 {1, 3.43705726e00},
1089 {1, 3.26563096e00},
1090 {0L, 0 }
1091 };
1092 for(_i=_r=0L; _i < 79; _i++)
1093 ba1[_i] = (realnum)RC_INI(_rs8); }
1094 { static struct{ long rc; double ini; } _rs9[] = {
1095 {1, 3.07498097e00},
1096 {1, 2.96334076e00},
1097 {1, 2.92890000e00},
1098 {1, 2.89550042e00},
1099 {0L, 0 }
1100 };
1101 for(_i=_r=0L; _i < 4; _i++)
1102 bb1[_i] = (realnum)RC_INI(_rs9); }
1103 { static struct{ long rc; double ini; } _rs10[] = {
1104 {1, -5.46},
1105 {1, -5.51},
1106 {1, -5.49},
1107 {1, -5.30},
1108 {1, -5.29},
1109 {1, -5.28},
1110 {1, -5.37},
1111 {1, -5.33},
1112 {1, -5.38},
1113 {1, -5.55},
1114 {1, -5.55},
1115 {1, -5.55},
1116 {1, -5.55},
1117 {1, -5.55},
1118 {1, -5.55},
1119 {1, -5.55},
1120 {1, -5.55},
1121 {1, -5.55},
1122 {1, -5.55},
1123 {1, -5.38},
1124 {1, -5.19},
1125 {1, -5.14},
1126 {1, -5.27},
1127 {1, -4.93},
1128 {1, -3.64},
1129 {1, -3.68},
1130 {1, -3.74},
1131 {1, -3.78},
1132 {1, -3.82},
1133 {1, -3.88},
1134 {1, -3.40},
1135 {1, -3.41},
1136 {1, -3.32},
1137 {1, -3.32},
1138 {1, -3.32},
1139 {1, -3.32},
1140 {1, -3.31},
1141 {1, -3.31},
1142 {1, -3.29},
1143 {1, -3.29},
1144 {1, -3.27},
1145 {1, -3.16},
1146 {1, -3.14},
1147 {1, -3.11},
1148 {1, -3.10},
1149 {1, -3.07},
1150 {1, -3.03},
1151 {1, -2.99},
1152 {1, -2.96},
1153 {1, -2.91},
1154 {1, -2.87},
1155 {1, -2.81},
1156 {1, -2.78},
1157 {1, -2.72},
1158 {1, -2.66},
1159 {1, -2.61},
1160 {1, -2.56},
1161 {1, -2.51},
1162 {1, -2.47},
1163 {1, -2.42},
1164 {1, -2.35},
1165 {1, -2.31},
1166 {1, -2.26},
1167 {1, -2.21},
1168 {1, -2.17},
1169 {1, -2.12},
1170 {1, -2.08},
1171 {1, -2.03},
1172 {1, -1.99},
1173 {1, -1.95},
1174 {1, -1.91},
1175 {1, -1.87},
1176 {1, -1.84},
1177 {1, -1.81},
1178 {1, -1.78},
1179 {1, -1.75},
1180 {1, -1.71},
1181 {1, -1.69},
1182 {1, -1.66},
1183 {1, -1.62},
1184 {1, -1.60},
1185 {1, -1.60},
1186 {1, -1.60},
1187 {0L, 0 }
1188 };
1189 for(_i=_r=0L; _i < 83; _i++)
1190 x1[_i] = RC_INI(_rs10); }
1191 { static struct{ long rc; double ini; } _rs11[] = {
1192 {1, 20.30049515},
1193 {1, 20.28500366},
1194 {1, 20.25300407},
1195 {1, 20.16626740},
1196 {1, 20.15743256},
1197 {1, 20.11256981},
1198 {1, 20.04818344},
1199 {1, 19.99261856},
1200 {1, 19.94472885},
1201 {1, 19.86478043},
1202 {1, 19.83321571},
1203 {1, 19.80185127},
1204 {1, 19.74884224},
1205 {1, 19.70136070},
1206 {1, 19.65981102},
1207 {1, 19.60598755},
1208 {1, 19.56017494},
1209 {1, 19.52042389},
1210 {1, 19.47429657},
1211 {1, 19.44413757},
1212 {1, 19.40796280},
1213 {1, 19.34819984},
1214 {1, 19.32203293},
1215 {1, 19.27634430},
1216 {1, 19.25627136},
1217 {1, 19.22009087},
1218 {1, 19.18853378},
1219 {1, 19.14809799},
1220 {1, 19.12456703},
1221 {1, 19.08409119},
1222 {1, 19.05431557},
1223 {1, 19.02083015},
1224 {1, 19.00176430},
1225 {1, 18.96817970},
1226 {1, 18.93762589},
1227 {1, 18.91706085},
1228 {1, 18.89299583},
1229 {1, 18.87085915},
1230 {1, 18.85210609},
1231 {1, 18.83035851},
1232 {1, 18.80403900},
1233 {1, 18.78901100},
1234 {1, 18.77099228},
1235 {1, 18.75540161},
1236 {1, 18.74287033},
1237 {1, 18.72928810},
1238 {1, 18.71601868},
1239 {1, 18.70474434},
1240 {1, 18.69515800},
1241 {1, 18.68782425},
1242 {1, 18.68120766},
1243 {1, 18.67630005},
1244 {1, 18.67357445},
1245 {1, 18.67129898},
1246 {1, 18.67042351},
1247 {1, 18.67090988},
1248 {1, 18.67313004},
1249 {1, 18.67636490},
1250 {1, 18.68120003},
1251 {1, 18.68803024},
1252 {1, 18.69487381},
1253 {1, 18.70458412},
1254 {1, 18.71205139},
1255 {0L, 0 }
1256 };
1257 for(_i=_r=0L; _i < 63; _i++)
1258 a2[_i] = RC_INI(_rs11); }
1259 { static struct{ long rc; double ini; } _rs12[] = {
1260 {1, 1.01078403e00},
1261 {1, 1.97956896e00},
1262 {1, 3.14605665e00},
1263 {1, 6.46874905e00},
1264 {1, 3.16406364e01},
1265 {1, 3.74927673e01},
1266 {1, 4.75353088e01},
1267 {1, 5.27809143e01},
1268 {1, 5.86515846e01},
1269 {1, 6.70408707e01},
1270 {1, 1.14904137e02},
1271 {1, 1.03133133e02},
1272 {1, 1.26508728e02},
1273 {1, 1.03827606e02},
1274 {1, 8.79508896e01},
1275 {1, 7.18328934e01},
1276 {1, 6.19807892e01},
1277 {1, 5.51255455e01},
1278 {1, 4.87156143e01},
1279 {1, 4.58579826e01},
1280 {1, 4.19952011e01},
1281 {1, 4.08252220e01},
1282 {1, 3.78243637e01},
1283 {1, 3.34573860e01},
1284 {1, 3.19036102e01},
1285 {1, 2.92026005e01},
1286 {1, 2.74482193e01},
1287 {1, 2.54643936e01},
1288 {1, 2.46636391e01},
1289 {1, 2.33054180e01},
1290 {1, 2.23069897e01},
1291 {1, 2.12891216e01},
1292 {1, 2.06667900e01},
1293 {1, 1.96430798e01},
1294 {1, 1.87381802e01},
1295 {1, 1.76523514e01},
1296 {1, 1.69235287e01},
1297 {1, 1.62647285e01},
1298 {1, 1.56806908e01},
1299 {1, 1.50346069e01},
1300 {1, 1.42240467e01},
1301 {1, 1.37954988e01},
1302 {1, 1.31949224e01},
1303 {1, 1.27211905e01},
1304 {1, 1.22885675e01},
1305 {1, 1.17868662e01},
1306 {1, 1.12577572e01},
1307 {1, 1.08565578e01},
1308 {1, 1.04121590e01},
1309 {1, 1.00410652e01},
1310 {1, 9.64534473e00},
1311 {1, 9.29232121e00},
1312 {1, 8.92519569e00},
1313 {1, 8.60898972e00},
1314 {1, 8.31234550e00},
1315 {1, 8.04089737e00},
1316 {1, 7.74343491e00},
1317 {1, 7.48133039e00},
1318 {1, 7.21957016e00},
1319 {1, 6.94726801e00},
1320 {1, 6.71931219e00},
1321 {1, 6.45107985e00},
1322 {1, 6.28593779e00},
1323 {0L, 0 }
1324 };
1325 for(_i=_r=0L; _i < 63; _i++)
1326 b2[_i] = RC_INI(_rs12); }
1327 { static struct{ long rc; double ini; } _rs13[] = {
1328 {1, -0.43},
1329 {1, -0.75},
1330 {1, -0.93},
1331 {1, -1.20},
1332 {1, -1.78},
1333 {1, -1.85},
1334 {1, -1.95},
1335 {1, -2.00},
1336 {1, -2.05},
1337 {1, -2.12},
1338 {1, -2.34},
1339 {1, -2.31},
1340 {1, -2.42},
1341 {1, -2.36},
1342 {1, -2.31},
1343 {1, -2.25},
1344 {1, -2.21},
1345 {1, -2.18},
1346 {1, -2.15},
1347 {1, -2.14},
1348 {1, -2.12},
1349 {1, -2.14},
1350 {1, -2.12},
1351 {1, -2.09},
1352 {1, -2.08},
1353 {1, -2.06},
1354 {1, -2.05},
1355 {1, -2.04},
1356 {1, -2.04},
1357 {1, -2.04},
1358 {1, -2.04},
1359 {1, -2.04},
1360 {1, -2.04},
1361 {1, -2.04},
1362 {1, -2.04},
1363 {1, -2.04},
1364 {1, -2.04},
1365 {1, -2.04},
1366 {1, -2.04},
1367 {1, -2.04},
1368 {1, -2.04},
1369 {1, -2.04},
1370 {1, -2.04},
1371 {1, -2.04},
1372 {1, -2.04},
1373 {1, -2.04},
1374 {1, -2.04},
1375 {1, -2.04},
1376 {1, -2.04},
1377 {1, -2.04},
1378 {1, -2.04},
1379 {1, -2.04},
1380 {1, -2.04},
1381 {1, -2.04},
1382 {1, -2.04},
1383 {1, -2.04},
1384 {1, -2.04},
1385 {1, -2.04},
1386 {1, -2.04},
1387 {1, -2.04},
1388 {1, -2.04},
1389 {1, -2.04},
1390 {1, -2.04},
1391 {0L, 0 }
1392 };
1393 for(_i=_r=0L; _i < 63; _i++)
1394 x2[_i] = RC_INI(_rs13); }
1395 /*lint +e736 loss of precision in assignment in translated data */
1396
1397 DEBUG_ENTRY( "blkdata0()" );
1398}
1399
1400/* =================================================================== */
1401/*xmap mapping function for Cota's 3-body recombination */
1402STATIC double xmap(double x[],
1403 double y[],
1404 double xmapx0)
1405{
1406 double a,
1407 b,
1408 c,
1409 xmapx1,
1410 x12m,
1411 x13m,
1412 xmapx2,
1413 x3,
1414 xmap_v,
1415 yinit,
1416 y13m;
1417
1418 DEBUG_ENTRY( "xmap()" );
1419
1420 /* PARABOLIC INTERPOLATION.
1421 * */
1422
1423 yinit = y[0];
1424 xmapx1 = x[0];
1425 xmapx2 = x[1];
1426 x3 = x[2];
1427 x13m = xmapx1 - x3;
1428 x12m = xmapx1 - xmapx2;
1429 y13m = yinit - y[2];
1430 x3 = (xmapx1 + x3)*x13m;
1431 xmapx2 = (xmapx1 + xmapx2)*x12m;
1432 b = ((yinit - y[1])*x3 - y13m*xmapx2)/(x12m*x3 - x13m*xmapx2);
1433 a = (y13m - x13m*b)/x3;
1434 c = yinit - a*xmapx1*xmapx1 - b*xmapx1;
1435
1436 xmap_v = a*xmapx0*xmapx0 + b*xmapx0 + c;
1437
1438 return( xmap_v );
1439}
1440
1441/* =================================================================== */
1442/*xinvrs do inverse function for Cota's three-body recombination */
1443STATIC double xinvrs(double y,
1444 double a,
1445 double b,
1446 double u,
1447 double v,
1448 long int *ifail)
1449{
1450 long int i;
1451 double bxu,
1452 dfx,
1453 fx,
1454 fxdfx,
1455 x,
1456 xinvrs_v,
1457 xlog,
1458 xx;
1459 static long itmax = 10;
1460
1461 DEBUG_ENTRY( "xinvrs()" );
1462
1463 /* inverts equation of the form :
1464 *
1465 * Y = A + B * X ** U - V * LOG ( X )
1466 * */
1467 *ifail = 0;
1468 xlog = (a - y)/v;
1469 x = pow(10.,xlog);
1470 xx = 0.;
1471
1472 for( i=0; i < itmax; i++ )
1473 {
1474 bxu = b*pow(x,u);
1475 fx = y - a - bxu + v*xlog;
1476 dfx = v*.4342945 - bxu*u;
1477
1478 if( dfx != 0. )
1479 {
1480 fxdfx = fabs(fx/dfx);
1481 fxdfx = MIN2(0.2,fxdfx);
1482 xx = x*(1. - sign(fxdfx,fx/dfx));
1483 }
1484 else
1485 {
1486 /* >>chng 96 feb 02 this added in case dfx ever 0
1487 * suggested by Peter van Hoof */
1488 xx = x*(1. - sign(0.2,fx));
1489 }
1490
1491 if( (fabs(xx-x)/x) < 1.e-4 )
1492 {
1493 xinvrs_v = xx;
1494 return( xinvrs_v );
1495 }
1496 else
1497 {
1498 x = xx;
1499 if( x < 1e-30 )
1500 {
1501 xinvrs_v = 100.;
1502 *ifail = 1;
1503 return( xinvrs_v );
1504 }
1505 xlog = log10(x);
1506 }
1507 }
1508 xinvrs_v = xx;
1509 *ifail = 1;
1510 return( xinvrs_v );
1511}
t_atmdat atmdat
Definition atmdat.cpp:6
static double a2[63]
STATIC double da(double z, double temp, double eden)
STATIC double xinvrs(double y, double a, double b, double u, double v, long int *ifail)
STATIC void blkdata1(void)
static realnum b1[83]
static double x2[63]
static double tz[83]
static double b2[63]
static realnum b0[83]
static double x0[83]
#define RC_INI(rs)
static double zlog7[28]
static double a0[83]
static double zlog2[28]
static double x1[83]
void atmdat_3body(void)
static double a1[83]
#define MAXZ
STATIC double xmap(double x[], double y[], double x0)
FILE * ioQQQ
Definition cddefines.cpp:7
#define ASSERT(exp)
Definition cddefines.h:578
#define STATIC
Definition cddefines.h:97
#define MIN2
Definition cddefines.h:761
#define MIN3(a, b, c)
Definition cddefines.h:766
const int LIMELM
Definition cddefines.h:258
T sign(T x, T y)
Definition cddefines.h:800
float realnum
Definition cddefines.h:103
#define MAX2
Definition cddefines.h:782
#define DEBUG_ENTRY(funcname)
Definition cddefines.h:684
static bool lgCalled
Definition cddrive.cpp:425
t_dense dense
Definition dense.cpp:24
t_ionbal ionbal
Definition ionbal.cpp:5
t_phycon phycon
Definition phycon.cpp:6
t_save save
Definition save.cpp:5
t_trace trace
Definition trace.cpp:5