9 IF (rgt_variant ==
'phase_cell' .AND. ncomp >= 2)
THEN 10 CALL f_eos_rn_phase_space_cell
12 CALL f_eos_rn_isomorphic_density
15 END SUBROUTINE f_eos_rn
23 SUBROUTINE phi_critical_renorm
27 IF (rgt_variant ==
'phase_cell' .AND. ncomp >= 2)
THEN 28 CALL phi_critical_renorm_phase_space_cell
30 CALL phi_critical_renorm_isomorphic_density
33 END SUBROUTINE phi_critical_renorm
67 SUBROUTINE f_eos_rn_isomorphic_density
72 USE eos_numerical
, only: f_numerical
73 USE fitting_rgt_parameters
78 INTEGER :: i, j, k, m, n, kk, k05max
79 INTEGER :: stepno, niter, pos, step2
80 REAL :: rho0, rhomax, kn(10), ll
82 REAL :: alpha_l, alpha_s
83 REAL :: integrand_l, integrand_s
84 REAL :: integr_old_l, integr_old_s
85 REAL :: integral_l, integral_s
87 REAL :: i1, w_ratio, del_f(8,0:10000)
89 REAL :: alph(0:8,0:10000)
90 REAL :: rhovec(0:10000), xdev, dzp1, fres_v
93 REAL :: chapm, order_chap
94 REAL :: fid, rho_i(nc)
95 REAL,
DIMENSION(5000) :: utri
96 REAL,
DIMENSION(0:5000) :: alphn, beta, gamma, delta
97 REAL :: rho_c, rho_l, rho_r
98 REAL :: alp_c, alph_lc, alph_sc
99 REAL :: alp_r, alph_lr, alph_sr
100 REAL :: alp_l, alph_ll, alph_sl
101 REAL :: dzp2, delta_rho
103 INTEGER,
SAVE :: scan = 0
104 REAL,
SAVE :: tempsav = 0.0
105 REAL,
DIMENSION(5),
SAVE :: xsav = 0.0
106 REAL,
DIMENSION(0:10000),
SAVE :: alphnsav, betasav, gammasav, deltasav, rhovecsav
115 IF ( critfit == 1 )
THEN 116 IF (t < 0.2*parame(1,3) ) t = 0.2*parame(1,3)
117 lli(1) = llfit*sig_ij(1,1)
118 phi_criti(1) = phifit
122 CALL perturbation_parameter
131 IF (lli(i) == 0.0 .OR. phi_criti(i) == 0.0 .OR. chap(i) == 0.0) stop
132 ll = ll + x(i)*lli(i)**3
133 phi_crit = phi_crit + x(i)*phi_criti(i)
134 sig_m2 = sig_m2 + x(i)*mseg(i)*sig_ij(i,i)**2
135 m_mean = m_mean + x(i)*mseg(i)
136 chapm = chapm + x(i)*chap(i)
138 order_chap = order_chap + x(i)*x(j)* mseg(i)*mseg(j) &
139 *sig_ij(i,j)**3 * uij(i,j)/t *(chap(i)*chap(j))**0.5
143 sig_m2 = sig_m2/m_mean
153 rhomax = rhomax + x(i)*mseg(i)*dhs(i)**3
155 rhomax = sqrt(2.0)/rhomax
160 xdev = sum( abs( xsav(1:ncomp)-x(1:ncomp) ) )
161 IF (tempsav == t .AND. xdev <= 1.e-10 .AND. scan == 1)
GO TO 5
164 xsav(1:ncomp) = x(1:ncomp)
169 dzp1 = rhomax /
REAL(stepno)
183 IF (rho_i(i) > 0.0) fid = fid + x(i)*(log(rho_i(i))-1.0)
186 alph(0,k) = (fres+fid)*drho
201 kn(n) = 1.0 / ll**3 / w_ratio**
REAL(3*n)
202 alpha_l = 16.0/9.0 * pi*order_chap
203 alpha_s = alpha_l*phi_crit* 9.0/7.0 * sig_m2 /ll/ll /w_ratio**
REAL(2*n)/2.0
206 DO k = 1,stepno*3/4-1
216 IF (k > k05max) step2 = stepno-k
220 dzp2 = rhovec(k)/
REAL(step2)
221 IF (rhovec(k) > rhomax/2.0) dzp2 = (rhomax-rhovec(k)) /
REAL(step2)
223 delta_rho =
REAL(kk)*dzp2
225 rho_l = rhovec(k) - delta_rho
226 rho_r = rhovec(k) + delta_rho
229 eta = rho_c*pi/6.0*mseg(1)*dhs(1)**3
232 i1 = i1 + apar(m)*eta**
REAL(m)
241 alph_lc = alp_c +alpha_l*rho_c*rho_c
242 alph_sc = alp_c +alpha_s*rho_c*rho_c
244 eta = rho_l*pi/6.0*mseg(1)*dhs(1)**3
247 i1 = i1 + apar(m)*eta**
REAL(m)
255 alp_l = alph(n-1,k-kk)
256 alph_ll = alp_l +alpha_l*rho_l*rho_l
257 alph_sl = alp_l +alpha_s*rho_l*rho_l
259 eta = rho_r*pi/6.0*mseg(1)*dhs(1)**3
262 i1 = i1 + apar(m)*eta**
REAL(m)
270 alp_r = alph(n-1,k+kk)
271 alph_lr = alp_r +alpha_l*rho_r*rho_r
272 alph_sr = alp_r +alpha_s*rho_r*rho_r
274 gn_l = (alph_lr+alph_ll)/2.0 - alph_lc
275 gn_s = (alph_sr+alph_sl)/2.0 - alph_sc
276 IF (gn_l < 0.0) gn_l = 0.0
277 IF (gn_s < 0.0) gn_s = 0.0
281 IF ( -gn_l/kn(n) > -300.0 .AND. -gn_l/kn(n) < 300.0) integrand_l = exp( -gn_l/kn(n) )
282 IF ( -gn_s/kn(n) > -300.0 .AND. -gn_s/kn(n) < 300.0) integrand_s = exp( -gn_s/kn(n) )
287 integral_l = integral_l + dzp2 *(integrand_l+integr_old_l)/2.0
288 integral_s = integral_s + dzp2 *(integrand_s+integr_old_s)/2.0
289 integr_old_l = integrand_l
290 integr_old_s = integrand_s
292 IF (integrand_l < 1.e-9 .AND. integrand_s < 1.e-9)
THEN 304 IF (integral_s /= 0.0 .AND. integral_l /= 0.0)
THEN 305 del_f(n,k) = -kn(n)*log(integral_s/integral_l)
311 alph(n,k) = alph(n-1,k) + del_f(n,k)
315 IF(n == niter .AND. k /= 0)
THEN 318 rho_i(i) = x(i)*rhovec(k)
319 IF(rho_i(i) > 0.0) fid = fid +rho_i(i)*(log(rho_i(i))-1.0)
321 alphn(k) = alphn(k)-fid
324 CALL spline_para (dzp1,alphn,utri,stepno)
325 CALL spline_coeff(beta,gamma,delta,dzp1,alphn,utri,stepno)
328 alphnsav(k) = alphn(k)
330 gammasav(k) = gamma(k)
331 deltasav(k) = delta(k)
332 rhovecsav(k) = rhovec(k)
344 alphn(k) = alphnsav(k)
346 gamma(k) = gammasav(k)
347 delta(k) = deltasav(k)
348 rhovec(k) = rhovecsav(k)
364 pos = int(rho0/rhomax*
REAL(stepno))
365 fres_v = alphn(pos) + beta(pos) *(rho0-rhovec(pos)) &
366 + gamma(pos)*(rho0-rhovec(pos))**2 + delta(pos)*(rho0-rhovec(pos))**3
369 pges = ( (beta(pos)+ 2.0*gamma(pos)*(rho0-rhovec(pos)) &
370 + 3.0* delta(pos)*(rho0-rhovec(pos))**2 )*rho0 -fres_v ) &
371 *(kbol*t)/1.e-30 + rho0 * (kbol*t) / 1.e-30
375 pgesdz = ( 2.0*gamma(pos)*rho0 &
376 + rho0*6.0* delta(pos)*(rho0-rhovec(pos)) ) *(kbol*t)/1.e-30 /z3t &
377 + 1.0/z3t*(kbol*t)/1.e-30
378 pgesd2 = ( 2.0*gamma(pos) + 6.0* delta(pos)*(2.0*rho0-rhovec(pos)) ) *(kbol*t)/1.e-30 /z3t /z3t
379 pgesd3 = ( 12.0* delta(pos) ) *(kbol*t)/1.e-30 /z3t /z3t /z3t
384 END SUBROUTINE f_eos_rn_isomorphic_density
392 SUBROUTINE phi_critical_renorm_isomorphic_density
402 REAL :: zres, zges, sumseg
403 REAL :: fres1, fres2 = 0.0, fres3, fres4
404 REAL :: xconc, d_org, d_new
406 REAL :: myres(nc), mpart(nc)
408 REAL :: tfr_1, tfr_2, tfr_3, tfr_4
414 IF (ensemble_flag ==
'tp')
THEN 415 CALL density_iteration
416 ELSEIF (ensemble_flag ==
'tv')
THEN 419 sumseg = z0t/(pi/6.0)
422 write (*,*)
'PHI_CRITICAL_RENORM: define ensemble, ensemble_flag == (pv) or (pt)' 439 zges = (p * 1.e-30) / (kbol*t*eta/z3t)
440 IF ( ensemble_flag ==
'tv' ) zges = (pges * 1.e-30) / (kbol*t*eta/z3t)
447 IF (ensemble_flag ==
'tp') lnphi(1) = gres - log(zges)
448 IF (ensemble_flag ==
'tv' .AND. eta >= 0.0) lnphi(1) = gres
471 IF (xconc > 1.e-13 .AND. xconc < 0.9999)
THEN 472 x(k) = xconc-gradi*10.0**(0.5*(15.0+log10(xconc)))
474 IF (xconc < 0.9999)
THEN 475 x(k) = xconc + 2.e-11
477 x(k) = xconc - 2.e-10
482 d_new = d_new +x(i)*mseg(i)*dhs(i)**3
484 eta = dicht*d_new/d_org
489 IF (xconc > 1.e-13 .AND. xconc < 0.9999)
THEN 491 x(k) = xconc+gradi*10.0**(0.5*(15.0+log10(xconc)))
494 d_new = d_new +x(i)*mseg(i)*dhs(i)**3
496 eta = dicht*d_new/d_org
503 IF (xconc > 1.e-13 .AND. xconc < 0.9999)
THEN 504 x(k) = xconc-0.5*gradi*10.0**(0.5*(15.0+log10(xconc)))
510 d_new = d_new +x(i)*mseg(i)*dhs(i)**3
512 eta = dicht*d_new/d_org
517 IF (xconc > 1.e-13 .AND. xconc < 0.9999)
THEN 518 x(k) = xconc+0.5*gradi*10.0**(0.5*(15.0+log10(xconc)))
520 IF (xconc < 0.9999)
THEN 521 x(k) = xconc + 1.e-11
523 x(k) = xconc - 1.e-10
528 d_new = d_new +x(i)*mseg(i)*dhs(i)**3
530 eta = dicht*d_new/d_org
539 IF (xconc > 1.e-13 .AND. xconc < 0.9999)
THEN 540 mpart(k) = (fres1-8.0*fres3+8.0*fres4-fres2) &
541 /(6.0*gradi*10.0**(0.5*(15.0+log10(xconc))))
546 IF (xconc < 0.9999)
THEN 547 mpart(k) = (-3.0*fres3+4.0*fres4-1.0*fres1)/2.e-11
550 mpart(k) = - (-4.0*fres3+6.0*fres4-2.0*fres1)/2.e-10
565 myresq = myresq - x(i)* mpart(i)
569 myres(k) = myresq + mpart(k) + fres + zres
570 IF (ensemble_flag ==
'tp') lnphi(k) = myres(k) - log(zges)
571 IF (ensemble_flag ==
'tv' .AND. eta >= 0.0) lnphi(1) = myres(k)
580 END SUBROUTINE phi_critical_renorm_isomorphic_density
595 REAL :: dzetdv,dicht,dist,fact
596 REAL :: pgesdz1,pgesdz4,pgesdz5
597 REAL :: pges2d1,pges2d4,pges2d5
612 ELSE IF (eta <= 0.1 .AND. eta > 0.01)
THEN 617 dist = eta*1.e-2 *fact
620 eta = dicht - 2.0*dist
632 eta = dicht + 2.0*dist
646 pgesd3 = (pgesdz4-2.0*pgesdz5+pgesdz1)/(2.0*dist)**2
648 END SUBROUTINE p_eos_rn
663 REAL :: fres1,fres2,fres3,fres4,fres5
664 REAL :: cv_res,t_tmp,zges,df_dt, df_dtdt
668 CALL perturbation_parameter
673 dist = t * 100.e-5 * fact
693 zges = (p * 1.e-30) / (kbol*t*rho)
696 df_dt = (-fres4+8.0*fres3-8.0*fres2+fres1)/(12.0*dist)
697 df_dtdt = (-fres4+16.0*fres3-30.0*fres5+16.0*fres2-fres1) / (12.0*(dist**2 ))
700 s_res = (- df_dt -fres/t)*rgas*t + rgas *log(zges)
701 h_res = ( - t*df_dt + zges-1.0 ) * rgas*t
702 cv_res = -( t*df_dtdt + 2.0*df_dt ) * rgas*t
704 END SUBROUTINE h_eos_rn
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW This module contains constant...
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW This module contains paramete...
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW Module DFT_MODULE This module...
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW This module contains paramete...
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW This module contains paramete...