1 Module rgt_phase_space_cell
7 real,
dimension(nc) :: dfdx
8 REAL,
DIMENSION(300) :: x1a
9 REAL,
DIMENSION(300) :: x2a
10 REAL,
DIMENSION(300,300) :: ya, y1a, y2a, y12a
11 REAL,
DIMENSION(300,300,4,4) :: c_bicub
13 End Module rgt_phase_space_cell
43 SUBROUTINE f_eos_rn_phase_space_cell
48 USE eos_numerical
, only: f_numerical
49 USE fitting_rgt_parameters
50 USE rgt_phase_space_cell
55 INTEGER :: k1, k2, kk1, kk2
57 INTEGER :: stepno, niter, pos1, pos2, step1, step2
58 REAL :: rho0, rhomax1, rhomax2, kn(10,0:300,0:300), ll
60 REAL :: int1_l, int1_s, int3_l, int3_s
61 REAL :: int4_l, int4_s
62 REAL :: integral_l, integral_s
63 REAL :: del_f(8,0:300,0:300)
64 REAL :: phi_crit, rhoi(nc)
65 REAL :: alph(0:8,0:300,0:300), w_ratio
66 REAL :: rhovec1(0:300), rhovec2(0:300), dzp1, dzp2
67 REAL :: fres_v, sig_m2, m_mean
68 REAL :: chapm, order_chap, fid
70 REAL :: rhot, alphn(0:300,0:300), combi(0:300,0:300)
71 REAL :: combi2(10,0:300,0:300), fact, i1
72 REAL :: rho1, rho2, fdr1, fdr2, fdr11, fdr12, fdr22
73 REAL :: fdr111, fdr112, fdr122, fdr222, f_drho, f_drho2
74 REAL :: f_drho3, f_drho4, z3tsav
75 REAL :: int3_lx, int3_sx, int_o_l, int_o_s
78 INTEGER,
SAVE :: scan = 0
79 REAL,
SAVE :: tempsav = 0.0
82 CALL perturbation_parameter
91 IF (lli(i) == 0.0 .OR. phi_criti(i) == 0.0 .OR. chap(i) == 0.0) stop
92 ll = ll + x(i)*lli(i)**3
93 phi_crit = phi_crit + x(i)*phi_criti(i)
94 sig_m2 = sig_m2 + x(i)*mseg(i)*sig_ij(i,i)**2
95 m_mean = m_mean + x(i)*mseg(i)
96 chapm = chapm + x(i)*chap(i)
98 order_chap = order_chap + x(i)*x(j)* mseg(i)*mseg(j) &
99 *sig_ij(i,j)**3 * uij(i,j)/t *(chap(i)*chap(j))**0.5
103 sig_m2 = sig_m2 / m_mean
122 rhomax1 = mseg(1)*dhs(1)**3
123 rhomax2 = mseg(2)*dhs(2)**3
124 rhomax1 = sqrt(2.0)/rhomax1
125 rhomax2 = sqrt(2.0)/rhomax2
130 IF (tempsav == t .AND. scan == 1)
GO TO 5
136 dzp1 = rhomax1/
REAL(stepno)
137 dzp2 = rhomax2/
REAL(stepno)
140 rhovec1(k1) =
REAL(k1)*dzp1
141 rhovec2(k2) =
REAL(k2)*dzp2
142 rhot = rhovec1(k1)+rhovec2(k2)
143 x(1) = rhovec1(k1)/rhot
144 x(2) = rhovec2(k2)/rhot
146 eta = rhot*pi/6.0*(x(1)*mseg(1)*dhs(1)**3 &
147 +x(2)*mseg(2)*dhs(2)**3)
148 IF (eta > 0.7) eta = 0.8-0.1*exp((0.7-eta)*10.0)
149 rhoi(1) = rhovec1(k1)
150 rhoi(2) = rhovec2(k2)
152 m_mean = x(1)*mseg(1) + x(2)*mseg(2)
156 mfrac(1) = mseg(1) / m_mean
157 mfrac(2) = mseg(2) / m_mean
162 combi(k1,k2) = combi(k1,k2)+16.0/9.0*pi*( &
163 rhoi(i)*rhoi(j)*mseg(i)*mseg(j)*sig_ij(i,j)**3 &
164 * uij(i,j)/t *(chap(i)+chap(j))*.5 )
174 i1 = i1 + apar(m)*eta**
REAL(m)
179 order1 = order1 + x(i)*x(j)* mseg(i)*mseg(j) &
180 *sig_ij(i,j)**3 * uij(i,j)/t *(chap(i)+chap(j))*.5
187 combi2(n,k1,k2) = 0.0
190 combi2(n,k1,k2) = combi2(n,k1,k2)+16.0/9.0*pi*9.0/7.0*( &
191 rhoi(i)*rhoi(j)*mseg(i)*mseg(j)*sig_ij(i,j)**2 &
192 *(phi_criti(i)*mfrac(i) &
193 +phi_criti(j)*mfrac(j))*0.5 *sig_ij(i,j)**3 &
194 * uij(i,j)/t *(chap(i)+chap(j))*0.5 &
195 /(mfrac(i)**0.33333333*lli(i)) /(mfrac(j)**0.33333333*lli(j)) &
196 )/ ( w_ratio**
REAL(2*n) * 2.0 )
206 ll = ( x(1)*mfrac(1)*lli(1)**3 &
207 + x(2)*mfrac(2)*lli(2)**3 )**(1.0/3.0)
215 fact = x(1)*sig_ij(1,1)**2 *phi_criti(1) &
216 +x(2)*sig_ij(2,2)**2 *phi_criti(2)
218 kn(n,k1,k2) = 1.0/ll**3 / w_ratio**
REAL(3*n)
222 i1 = i1 + apar(m)*eta**
REAL(m)
227 order1 = order1 + x(i)*x(j)* mseg(i)*mseg(j) &
228 *sig_ij(i,j)**5 * uij(i,j)/t *(chap(i)+chap(j))*.5 &
229 *(phi_criti(i)*phi_criti(j))**0.5 /lli(i)/lli(j)
238 IF (rhot /= 0.0)
THEN 242 IF (rhoi(i) > 0.0) fid = fid + rhoi(i)*(log(rhoi(i))-1.0)
245 alph(0,k1,k2) = fres*rhot + fid
246 alphn(k1,k2) = alph(0,k1,k2)
275 DO k1 = 1,stepno*3/4-1
281 IF(k1 > k05max) step1 = stepno-k1
283 CALL integr(n,k1,0,kk1,0,kn,combi,combi2, alph,int1_l,int1_s)
288 integral_l = integral_l + dzp1 *int1_l
289 integral_s = integral_s + dzp1 *int1_s
294 IF (integral_s /= 0.0.AND. integral_l /= 0.0)
THEN 295 del_f(n,k1,0) = -kn(n,k1,0)*log(integral_s/integral_l)
300 DO k2 = 1,stepno*3/4-1
306 IF(k2 > k05max) step2 = stepno-k2
308 CALL integr(n,0,k2,0,kk2,kn,combi,combi2, alph,int3_l,int3_s)
313 integral_l = integral_l + dzp2 *int3_l
314 integral_s = integral_s + dzp2 *int3_s
319 IF (integral_s /= 0.0.AND. integral_l /= 0.0)
THEN 320 del_f(n,0,k2) = -kn(n,0,k2)*log(integral_s/integral_l)
327 DO k2 = 0,stepno*3/4-1
329 DO k1 = 0,stepno*3/4-1
340 IF(k1 > k05max) step1 = stepno-k1
341 IF(k2 > k05max) step2 = stepno-k2
350 CALL integr(n,k1,k2,kk1,kk2,kn,combi,combi2, alph,int4_l,int4_s)
358 integral_l = integral_l+dzp1*dzp2*int4_l
359 integral_s = integral_s+dzp1*dzp2*int4_s
363 IF (int4_l < 1.e-9.AND.int4_s < 1.e-9)
THEN 373 IF (k1 /= 0.AND.k2 /= 0) del_f(n,k1,k2) = 0.0
374 IF (integral_s /= 0.0.AND. integral_l /= 0.0)
THEN 375 del_f(n,k1,k2) = -kn(n,k1,k2)*log(integral_s/integral_l)
386 alph(n,k1,k2) = alph(n-1,k1,k2)+del_f(n,k1,k2)
387 alphn(k1,k2) = alph(n,k1,k2)
392 rhoi(1) = rhovec1(k1)
393 rhoi(2) = rhovec2(k2)
395 IF (rhoi(i) > 0.0) fid = fid +rhoi(i)*(log(rhoi(i))-1.0)
397 alphn(k1,k2) = alphn(k1,k2)-fid
398 ya(k1+1,k2+1) = alphn(k1,k2)
400 x1a(k1+1) = rhovec1(k1)
402 x2a(k2+1) = rhovec2(k2)
435 CALL bicub_derivative2( stepno+1, stepno+1 )
436 CALL bicub_c2 ( stepno+1, stepno+1 )
442 pos1 = int(rho1/rhomax1*stepno) + 1
443 pos2 = int(rho2/rhomax2*stepno) + 1
444 CALL bi_cub_spline_crt (rho1,rho2,fres_v,fdr1,fdr2,fdr11,fdr12,fdr22, &
445 fdr111,fdr112,fdr122,fdr222,stepno+1,stepno+1,pos1,pos2)
447 f_drho = x(1)*fdr1 + x(2)*fdr2
449 f_drho2 = x(1)*x(1)*fdr11 + 2.0*x(1)*x(2)*fdr12 +x(2)*x(2)*fdr22
450 f_drho3 = x(1)**3 *fdr111 + 3.0*x(1)*x(1)*x(2)*fdr112 &
451 + 3.0*x(1)*x(2)*x(2)*fdr122 + x(2)**3 *fdr222
454 pges = ( f_drho*rho0 - fres_v ) *(kbol*t)/1.e-30 &
455 + rho0 * (kbol*t) / 1.e-30
456 pgesdz = ( f_drho2*rho0 ) *(kbol*t)/1.e-30 /z3t &
457 + 1.0/z3t*(kbol*t)/1.e-30
458 pgesd2 = ( f_drho3*rho0 + f_drho2 ) *(kbol*t)/1.e-30 /z3t /z3t
459 pgesd3 = ( f_drho4*rho0 + 2.0*f_drho3 ) *(kbol*t)/1.e-30 /z3t /z3t /z3t
469 END SUBROUTINE f_eos_rn_phase_space_cell
477 SUBROUTINE integr(n,k1,k2,kk1,kk2,kn,combi,combi2, alph,int_l,int_s)
482 INTEGER,
INTENT(IN) :: n
483 INTEGER,
INTENT(IN) :: k1
484 INTEGER,
INTENT(IN) :: k2
485 INTEGER,
INTENT(IN) :: kk1
486 INTEGER,
INTENT(IN) :: kk2
487 REAL,
INTENT(IN) :: kn(10,0:300,0:300)
488 REAL,
INTENT(IN) :: combi(0:300,0:300)
489 REAL,
INTENT(IN) :: combi2(10,0:300,0:300)
490 REAL,
INTENT(IN) :: alph(0:8,0:300,0:300)
491 REAL,
INTENT(OUT) :: int_l
492 REAL,
INTENT(OUT) :: int_s
495 REAL :: alp_c,alph_lc,alph_sc,alp_l,alph_ll,alph_sl, &
496 alp_r,alph_lr,alph_sr,gn_l,gn_s
500 alp_c = alph(n-1,k1,k2)
501 alph_lc =alp_c + combi(k1,k2)
502 alph_sc =alp_c + combi2(n,k1,k2)
505 alp_l = alph(n-1,k1-kk1,k2-kk2)
506 alph_ll = alp_l + combi(k1-kk1,k2-kk2)
507 alph_sl = alp_l + combi2(n,k1-kk1,k2-kk2)
509 alp_r = alph(n-1,k1+kk1,k2+kk2)
510 alph_lr = alp_r + combi(k1+kk1,k2+kk2)
511 alph_sr = alp_r + combi2(n,k1+kk1,k2+kk2)
513 gn_l = (alph_lr+alph_ll)/2.0 - alph_lc
514 gn_s = (alph_sr+alph_sl)/2.0 - alph_sc
515 IF (gn_l < 0.0) gn_l = 0.0
516 IF (gn_s < 0.0) gn_s = 0.0
519 IF( -gn_l/kn(n,k1,k2) > -300.0.AND.-gn_l/kn(n,k1,k2) < 300.0) int_l = exp( -gn_l/kn(n,k1,k2) )
520 IF( -gn_s/kn(n,k1,k2) > -300.0.AND.-gn_s/kn(n,k1,k2) < 300.0) int_s = exp( -gn_s/kn(n,k1,k2) )
522 END SUBROUTINE integr
529 SUBROUTINE bicub_derivative2 ( i_max, k_max )
531 USE rgt_phase_space_cell
535 INTEGER,
INTENT(IN) :: i_max
536 INTEGER,
INTENT(IN) :: k_max
538 INTEGER :: i,k, steps,lm
539 REAL :: d1,d2,gam1,gam2, &
540 d2f_dx1_2(301,301),d2f_dx2_2(301,301)
541 REAL :: yspl(301),xspl(301),y1(301),y2(301),yp1,ypn
547 gam1 = sqrt(1.0+d2*d2/d1/d1)/(1.0+d2*d2/d1/d1)
548 gam2 = sqrt(1.0+d1*d1/d2/d2)/(1.0+d1*d1/d2/d2)
552 y1a(i,k) = (ya(i+1,k)-ya(i-1,k))/(x1a(i+1)-x1a(i-1))
553 y2a(i,k) = (ya(i,k+1)-ya(i,k-1))/(x2a(k+1)-x2a(k-1))
554 y12a(i,k) = (ya(i+1,k+1)-ya(i+1,k-1)-ya(i-1,k+1)+ya(i-1,k-1)) &
555 /((x1a(i+1)-x1a(i-1))*(x2a(k+1)-x2a(k-1)))
561 y1a(i,k) = (-ya(i+2,k)+4.0*ya(i+1,k)-3.0*ya(i,k)) /(x1a(i+2)-x1a(i))
562 y2a(i,k) = (ya(i,k+1)-ya(i,k-1))/(x2a(k+1)-x2a(k-1))
563 y12a(i,k) = (ya(i+1,k+1)-ya(i+1,k-1)-ya(i,k+1)+ya(i,k-1)) &
564 /((x1a(i+1)-x1a(i))*(x2a(k+1)-x2a(k-1)))
569 y1a(i,k) = (ya(i+1,k)-ya(i-1,k))/(x1a(i+1)-x1a(i-1))
572 y2a(i,k) = (-ya(i,k+2)+4.0*ya(i,k+1)-3.0*ya(i,k)) /(x2a(k+2)-x2a(k))
573 y12a(i,k) = (ya(i+1,k+1)-ya(i+1,k)-ya(i,k+1)+ya(i,k)) &
574 /((x1a(i+1)-x1a(i))*(x2a(k+1)-x2a(k)))
580 y1a(i,k) = (ya(i,k)-ya(i-1,k))/(x1a(i)-x1a(i-1))
581 y2a(i,k) = (ya(i,k+1)-ya(i,k-1))/(x2a(k+1)-x2a(k-1))
582 y12a(i,k) = (ya(i,k+1)-ya(i,k-1)-ya(i-1,k+1)+ya(i-1,k-1)) &
583 /((x1a(i)-x1a(i-1))*(x2a(k+1)-x2a(k-1)))
589 y1a(i,k) = (ya(i+1,k)-ya(i-1,k))/(x1a(i+1)-x1a(i-1))
590 y2a(i,k) = (ya(i,k)-ya(i,k-1))/(x2a(k)-x2a(k-1))
591 y12a(i,k) = (ya(i+1,k)-ya(i+1,k-1)-ya(i-1,k)+ya(i-1,k-1)) &
592 /((x1a(i+1)-x1a(i-1))*(x2a(k)-x2a(k-1)))
597 y1a(i,k) = (ya(i,k)-ya(i-1,k))/(x1a(i)-x1a(i-1))
598 y2a(i,k) = (ya(i,k)-ya(i,k-1))/(x2a(k)-x2a(k-1))
599 y12a(i,k) = (ya(i,k)-ya(i,k-1)-ya(i-1,k)+ya(i-1,k-1)) &
600 /((x1a(i)-x1a(i-1))*(x2a(k)-x2a(k-1)))
604 y1a(i,k) = (-ya(i+2,k)+4.0*ya(i+1,k)-3.0*ya(i,k)) /(x1a(i+2)-x1a(i))
605 y2a(i,k) = (-ya(i,k+2)+4.0*ya(i,k+1)-3.0*ya(i,k)) /(x2a(k+2)-x2a(k))
606 y12a(i,k) = (ya(i+1,k+1)-ya(i+1,k)-ya(i,k+1)+ya(i,k)) &
607 /((x1a(i+1)-x1a(i))*(x2a(k+1)-x2a(k)))
615 yp1 = (-ya(i,1+2)+4.0*ya(i,1+1)-3.0*ya(i,1))/(x2a(1+2)-x2a(1))
616 ypn = (-ya(i,k_max-2)+4.0*ya(i,k_max-1)-3.0*ya(i,k_max)) &
617 /(x2a(k_max-2)-x2a(k_max))
618 CALL spline2(xspl,yspl,k_max,yp1,ypn,y1,y2)
621 d2f_dx2_2(i,k) = y2(k)
630 yp1 = (-ya(1+2,k)+4.0*ya(1+1,k)-3.0*ya(1,k))/(x1a(1+2)-x1a(1))
631 ypn = (-ya(i_max-2,k)+4.0*ya(i_max-1,k)-3.0*ya(i_max,k)) &
632 /(x1a(i_max-2)-x1a(i_max))
633 CALL spline2(xspl,yspl,i_max,yp1,ypn,y1,y2)
636 d2f_dx1_2(i,k) = y2(i)
648 xspl(k) = ( x1a(k)**2 + x2a(k)**2 )**0.5
654 steps = i_max - (lm-1)
655 yp1 = y1a(lm,1)*gam1 + y2a(lm,1)*gam2
656 ypn = y1a(i_max,steps)*gam1+y2a(i_max,steps)*gam2
657 CALL spline2(xspl,yspl,steps,yp1,ypn,y1,y2)
664 y12a(i,k) = 0.5*y2(k)/gam1/gam2 -0.5*(d2f_dx1_2(i,k)*gam1/gam2 &
665 +d2f_dx2_2(i,k)*gam2/gam1)
673 DO i = 1,i_max-(lm-1)
680 xspl(i) = ( x1a(i)**2 + x2a(i)**2 )**0.5
686 steps = i_max - (lm-1)
687 yp1 = y1a(1,lm)*gam1 +y2a(1,lm)*gam2
688 ypn = y1a(steps,k_max)*gam1+y2a(steps,k_max)*gam2
689 CALL spline2(xspl,yspl,steps,yp1,ypn,y1,y2)
690 DO i = 1,i_max-(lm-1)
696 y12a(i,k) = 0.5*y2(i)/gam1/gam2 - 0.5*(d2f_dx1_2(i,k)*gam1/gam2 + d2f_dx2_2(i,k)*gam2/gam1)
702 END SUBROUTINE bicub_derivative2
718 SUBROUTINE spline2(x,y,n,yp1,ypn,y1,y2)
723 REAL,
INTENT(IN) :: x(n)
724 REAL,
INTENT(IN) :: y(n)
725 INTEGER,
INTENT(IN) :: n
726 REAL,
INTENT(IN OUT) :: yp1
727 REAL,
INTENT(IN OUT) :: ypn
728 REAL,
INTENT(OUT) :: y1(n)
729 REAL,
INTENT(OUT) :: y2(n)
732 INTEGER,
PARAMETER :: nmax = 500
734 REAL :: p,qn,
sig,un,u(nmax)
738 IF (yp1 > .99e30)
THEN 743 u(1) = (3.0/(x(2)-x(1)))*((y(2)-y(1))/(x(2)-x(1))-yp1)
746 sig = (x(i)-x(i-1))/(x(i+1)-x(i-1))
749 u(i) = (6.0*((y(i+1)-y(i))/(x(i+1)-x(i)) &
750 -(y(i)-y(i-1))/(x(i)-x(i-1)))/(x(i+1)-x(i-1))-
sig*u(i-1))/p
752 IF (ypn > .99d30)
THEN 757 un = (3.0/(x(n)-x(n-1)))*(ypn-(y(n)-y(n-1))/(x(n)-x(n-1)))
759 y2(n) = (un-qn*u(n-1))/(qn*y2(n-1)+1.)
761 y2(k) = y2(k)*y2(k+1)+u(k)
765 y1(i) = (y(i+1)-y(i))/dx - 1.0/3.0*dx*y2(i)-y2(i+1)/6.0*dx
769 y1(n) = (y(i+1)-y(i))/dx + 1.0/6.0*dx*y2(i)+1.0/3.0*y2(i+1)*dx
773 END SUBROUTINE spline2
781 SUBROUTINE bicub_c2 ( i_max, k_max )
783 USE rgt_phase_space_cell
787 INTEGER,
INTENT(IN) :: i_max
788 INTEGER,
INTENT(IN) :: k_max
791 REAL :: y(4),y1(4),y2(4),y12(4),x1l,x1u,x2l,x2u
814 y12(3) = y12a(i+1,k+1)
822 CALL bcucof(y,y1,y2,y12,x1u-x1l,x2u-x2l,c)
825 c_bicub(i,k,m,n) = c(m,n)
833 END SUBROUTINE bicub_c2
841 SUBROUTINE bcuint2 (y,y1,y2,y12,x1l,x1u,x2l,x2u,x1,x2,c,ansy,ansy1, &
842 ansy2,ansy11,ansy12,ansy22,ansy111,ansy112,ansy122,ansy222)
848 REAL,
INTENT(IN OUT) :: y(4)
849 REAL,
INTENT(IN OUT) :: y1(4)
850 REAL,
INTENT(IN OUT) :: y2(4)
851 REAL,
INTENT(IN OUT) :: y12(4)
852 REAL,
INTENT(IN OUT) :: x1l
853 REAL,
INTENT(IN OUT) :: x1u
854 REAL,
INTENT(IN OUT) :: x2l
855 REAL,
INTENT(IN OUT) :: x2u
856 REAL,
INTENT(IN OUT) :: x1
857 REAL,
INTENT(IN OUT) :: x2
858 REAL,
INTENT(IN) :: c(4,4)
859 REAL,
INTENT(OUT) :: ansy
860 REAL,
INTENT(OUT) :: ansy1
861 REAL,
INTENT(OUT) :: ansy2
862 REAL,
INTENT(OUT) :: ansy11
863 REAL,
INTENT(OUT) :: ansy12
864 REAL,
INTENT(OUT) :: ansy22
865 REAL,
INTENT(OUT) :: ansy111
866 REAL,
INTENT(OUT) :: ansy112
867 REAL,
INTENT(OUT) :: ansy122
868 REAL,
INTENT(OUT) :: ansy222
877 IF( x1u == x1l .OR. x2u == x2l )
call paus (
'bad input in bcuint')
878 t = (x1-x1l) / (x1u-x1l)
879 u = (x2-x2l) / (x2u-x2l)
880 IF (u == 0.0) u = 1.e-15
881 IF (t == 0.0) t = 1.e-15
894 ansy = ansy + c(i,j)*u**
REAL(j-1) *t**
REAL(i-1)
896 ansy1 = ansy1+ c(i,j)*
REAL(i-1)*u**
REAL(j-1) *t**
REAL(i-2)
897 ansy2 = ansy2+ c(i,j)*
REAL(j-1)*u**
REAL(j-2) *t**
REAL(i-1)
899 ansy11 = ansy11+c(i,j)*
REAL(i-1)*
REAL(i-2)*u**
REAL(j-1) *t**
REAL(i-3)
900 ansy22 = ansy22+c(i,j)*
REAL(j-1)*
REAL(j-2)*u**
REAL(j-3) *t**
REAL(i-1)
901 ansy12 = ansy12+c(i,j)*
REAL(i-1)*
REAL(j-1)*u**
REAL(j-2) *t**
REAL(i-2)
903 ansy111 = ansy111+c(i,j)*
REAL(i-1)*
REAL(i-2)*
REAL(i-3) *u**
REAL(j-1) *t**
REAL(i-4)
904 ansy222 = ansy222+c(i,j)*
REAL(j-1)*
REAL(j-2)*
REAL(j-3) *u**
REAL(j-4) *t**
REAL(i-1)
905 ansy112 = ansy112+c(i,j)*
REAL(i-1)*
REAL(i-2)*
REAL(j-1) *u**
REAL(j-2) *t**
REAL(i-3)
906 ansy122 = ansy122+c(i,j)*
REAL(j-1)*
REAL(j-2)*
REAL(i-1) *u**
REAL(j-3) *t**
REAL(i-2)
915 ansy11 = ansy11/d1/d1
916 ansy22 = ansy22/d2/d2
917 ansy12 = ansy12/d1/d2
919 ansy111 = ansy111/d1**3
920 ansy222 = ansy222/d2**3
921 ansy112 = ansy112/d1/d1/d2
922 ansy122 = ansy122/d1/d2/d2
924 END SUBROUTINE bcuint2
934 SUBROUTINE bi_cub_spline_crt (rho1,rho2, fr,fdr1,fdr2,fdr11,fdr12,fdr22, &
935 fdr111,fdr112,fdr122,fdr222,i_max,k_max,ih,k)
937 USE rgt_phase_space_cell
941 REAL,
INTENT(IN OUT) :: rho1
942 REAL,
INTENT(IN OUT) :: rho2
943 REAL,
INTENT(OUT) :: fr
944 REAL,
INTENT(IN OUT) :: fdr1
945 REAL,
INTENT(IN OUT) :: fdr2
946 REAL,
INTENT(IN OUT) :: fdr11
947 REAL,
INTENT(IN OUT) :: fdr12
948 REAL,
INTENT(IN OUT) :: fdr22
949 REAL,
INTENT(IN OUT) :: fdr111
950 REAL,
INTENT(IN OUT) :: fdr112
951 REAL,
INTENT(IN OUT) :: fdr122
952 REAL,
INTENT(IN OUT) :: fdr222
953 INTEGER,
INTENT(IN) :: i_max
954 INTEGER,
INTENT(IN) :: k_max
955 INTEGER,
INTENT(OUT) :: ih
956 INTEGER,
INTENT(IN) :: k
959 REAL :: y(4),y1(4),y2(4),y12(4),x1l,x1u,x2l,x2u
963 IF (rho1 < x1a(1) .AND. rho2 < x2a(1))
THEN 965 WRITE (*,*)
'error? BI_CUB_SPLINE_CRT' 970 IF (x1a(ih) <= rho1.AND.rho1 < x1a(ih+1).AND. &
971 x2a(k) <= rho2.AND.rho2 < x2a(k+1))
THEN 974 WRITE (*,*)
'error in BI_CUB_SPLINE_CRT',ih,k
975 WRITE (*,*) rho1,x1a(ih),x1a(ih+1)
976 WRITE (*,*) rho2,x2a(k),x2a(k+1)
980 IF (x1a(ih-1) <= rho1.AND.rho1 < x1a(ih))
THEN 985 WRITE (*,*)
'error in BI_CUB_SPLINE_CRT' 986 CALL hunt(x1a,i_max,rho1,ih)
996 y1(3) = y1a(ih+1,k+1)
1001 y2(3) = y2a(ih+1,k+1)
1005 y12(2) = y12a(ih+1,k)
1006 y12(3) = y12a(ih+1,k+1)
1007 y12(4) = y12a(ih,k+1)
1016 c(m,n) = c_bicub(ih,k,m,n)
1019 CALL bcuint2(y,y1,y2,y12,x1l,x1u,x2l,x2u,rho1,rho2,c, &
1020 fr,fdr1,fdr2,fdr11,fdr12,fdr22,fdr111,fdr112,fdr122,fdr222)
1022 END SUBROUTINE bi_cub_spline_crt
1032 SUBROUTINE phi_critical_renorm_phase_space_cell
1037 USE rgt_phase_space_cell
1045 CALL density_iteration
1048 zges = (p * 1.e-30) / (kbol*t*eta/z3t)
1049 IF ( ensemble_flag ==
'tv' ) zges = (pges * 1.e-30) / (kbol*t*eta/z3t)
1053 IF (ensemble_flag ==
'tp') lnphi(k) = dfdx(k) - log(zges)
1054 IF (ensemble_flag ==
'tv' .AND. eta >= 0.0) lnphi(k) = dfdx(k)
1057 END SUBROUTINE phi_critical_renorm_phase_space_cell
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW This module contains constant...
double sig
correlated to variance of initial distribution
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW This module contains paramete...
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW This module contains paramete...