//--------------------------------------------------------------------------- // Вычисление потенциала для FRESCO в NRV //--------------------------------------------------------------------------- function FRESCO_Potential() { //========================================================================= // set the nuclear masses and charges this.setReaction=function(Zp,Ap,Zt,At) // Параметры реакции { this.Z_Proj=Zp; this.A_Proj=Ap; this.Z_Targ=Zt; this.A_Targ=At; this.a13 = 0.0; if(At > 1.0) this.a13 = 1.*this.a13 + 1.*Math.pow(At,1.0/3.0); if(Ap > 1.0 && this.NRVStyleForRadii) this.a13 = 1.*this.a13 + 1.*Math.pow(Ap,1.0/3.0); if(this.a13 < 1.0) this.a13 = 1.0; this.mu = 1.0*this.A_Proj*this.A_Targ/(1.*this.A_Proj+1.*this.A_Targ); this.h2_2mu = 0.5*this.Const.h2_mn/this.mu; this.setZ1Z2e2(this.Z_Proj*this.Z_Targ*this.Const.e2); this.NeedCalculatePotential = true; this.BarrierFound = false; this.PocketFound = false; } //------------------------------------------------------------------------- // set the Coulomb radius this.setCoulombParameters=function(rc) { this.r_Coul = rc; this.AddCoulomb = true; this.NeedCalculatePotential = true; this.BarrierFound = false; this.PocketFound = false; } this.setZ1Z2e2 = function(val) { this.z1z2 = val; this.NeedCalculatePotential = true; this.BarrierFound = false; this.PocketFound = false; } //------------------------------------------------------------------------- // - - - - - - - - - - - - - - - - - - - - - - - - - - this.setL = function(val,recalculate) { this.L = val; this.L2 = this.h2_2mu*this.L*(1.+1.*this.L); this.setSpinProjection(this.spin_projection,recalculate); this.NeedCalculatePotential = true; this.BarrierFound = false; this.PocketFound = false; if(recalculate) this.calculatePotential(true); } //------------------------------------------------------------------------- this.setNTerms = function(n) { if(n>this.nMax) n=this.nMax; this.nCurrent = n; } //------------------------------------------------------------------------- // define all(!) parameters of the nuclear part // n - number of potential terms // params - all the parameters (array[n*5]) this.setAllTermsInNuclearPotential=function(n,params) { if(n > this.nMax) n = this.nMax; this.nCurrent = n; for(i=0;i (1*i+1)*5) { this.type[i] = params[i*5 + 0]; this.shape[i] = params[i*5 + 1]; this.V0[i] = params[i*5 + 2]; this.rV[i] = params[i*5 + 3]; this.aV[i] = params[i*5 + 4]; } else { this.type[i] = 1; this.shape[i] = 0; this.V0[i] = 0.0; this.rV[i] = 1.0; this.aV[i] = 1.0; } } this.NeedCalculatePotential = true; this.BarrierFound = false; this.PocketFound = false; } //------------------------------------------------------------------------- // change k-th term in potential this.setOneTermInNuclearPotential=function(k,type,shape,v0,rv,av) { if(k >= this.nMax) return false; if(k > this.nCurrent-1) { this.nCurrent++; k = this.nCurrent-1; } this.type[k] = type; this.shape[k] = shape; this.V0[k] = v0; this.rV[k] = rv; this.aV[k] = av; this.NeedCalculatePotential = true; this.BarrierFound = false; this.PocketFound = false; return true; } //------------------------------------------------------------------------- this.setAdjustingDepth = function(k,v0) { if(k<0 || k >= this.nCurrent) return false; this.V0[k] = v0; this.NeedCalculatePotential = true; this.BarrierFound = false; this.PocketFound = false; } //------------------------------------------------------------------------- // Считаем ф-ию от r1 до r2 (n точек) и результат заносим в массивы X[] и Y[] // используем для отрисовки, но не для счета this.Calculate = function(r1,r2,n,X,Y) { //console.log("in Pot: calculate"); var dr; dr=(1.*r2-1.*r1)/(n-1); for (ir=0;ir= rc) v=-1.0*this.z1z2/(r*r); else v=-1.0*this.z1z2*r/(rc*rc*rc); return v; } //------------------------------------------------------------------------- // each term definition, k - term number this.getNuclearTerm = function(k,r) { if(k >= this.nCurrent) return 0.0; //----------------------------------------------------------- if(r < this.Const.small_add) r = this.Const.small_add; v = 0.0; //----------------------------------------------------------- xx = (1.*r-1.0*this.rV[k]*this.a13)/this.aV[k]; if(xx<300.0) ex = Math.exp(xx); else ex = 1.94e130; _ex = 1.0/(1.0 + 1.*ex); //----------------------------------------------------------- // Central potential if(this.type[k] == 1) switch(this.shape[k]) { default: v = 0.0; break; case 0: // Woods-Saxon: V0/(1+exp((r-R)/a)) v = this.V0[k]*_ex; break; case 1: // squared Woods-Saxon: V0/(1+exp((r-R)/a))^2 v = this.V0[k]*_ex*_ex; break; case 2: // Gaussian: V0 exp(-(r-R)^2/a^2) v = this.V0[k]*Math.exp(-xx*xx); break; case 3: // Yukawa: V0 exp(-(r-R)/a)/r v = this.V0[k]/(ex*r); break; case 4: // Exponetial: V0 exp(-(r-R)/a) v = this.V0[k]/ex; break; } //----------------------------------------------------------- // Central potential, Derivative (2) & Spin-Orbit for projectile (3) & for target (4) else if(this.type[k] == 2 || this.type[k] == 3 || this.type[k] == 4) { switch(this.shape[k]) { default: v = 0.0; break; case 0: // Woods-Saxon v = 4.0*this.V0[k]*ex*_ex*_ex; break; case 1: // squared Woods-Saxon v = 8.0*this.V0[k]*ex*ex*_ex*_ex*_ex; break; case 2: // Gaussian v = 2.0*this.V0[k]*xx*Math.exp(-xx*xx); break; case 3: // Yukawa v = this.V0[k]*(1.0+r/this.aV[k])/(ex*r*r); break; case 4: // Exponential v = this.V0[k]/ex; break; } if(this.type[k] != 2) v = v*2.0*this.LS*this.h_mc/(4.0*r*this.aV[k]); } //----------------------------------------------------------- // Tensor potential else if(this.type[k] == 5 || this.type[k] == 6) switch(this.shape[k]) { default: v = 0.0; break; case 0: // Woods-Saxon v = 8.0*this.V0[k]*ex*(ex-1.0)*_ex*_ex*_ex; break; case 1: // squared Woods-Saxon v = 4.0*this.V0[k]*ex*ex*_ex*_ex*_ex; break; case 2: // Gaussian v = 2.0*this.V0[k]*xx*Math.exp(-xx*xx); break; case 3: // Yukawa v = this.V0[k]*(1.0/(1.0*this.aV[k]*this.aV[k]) + 2.0/(r*r))/(ex*r); break; case 4: // Exponetial v = this.V0[k]/ex; break; } return v; } this.getNuclearTermDerivative = function(k,r) { if(k >= this.nCurrent) return 0.0; //----------------------------------------------------------- if(r < this.Const.small_add) r = this.Const.small_add; v = 0.0; //----------------------------------------------------------- av = this.aV[k]; Rv = this.rV[k]*this.a13; xx = (1*r - 1*Rv)/av; if(xx<300.0) ex = Math.exp(xx); else ex = 1.94e130; _ex = 1.0/(1.0 + 1.*ex); //----------------------------------------------------------- // Central potential if(this.type[k] == 1) switch(this.shape[k]) { default: v = 0.0; break; case 0: // Woods-Saxon: V0/(1+exp((r-R)/a)) v = -this.V0[k]*ex*_ex*_ex/av; break; case 1: // squared Woods-Saxon: V0/(1+exp((r-R)/a))^2 v = -this.V0[k]*2.0*ex*_ex*_ex*_ex/av; break; case 2: // Gaussian: V0 exp(-(r-R)^2/a^2) v = -this.V0[k]*2.0*xx*Math.exp(-xx*xx)/av; break; case 3: // Yukawa: V0 exp(-(r-R)/a)/r v = -this.V0[k]*(1.0 + r/av)/(ex*r*r); break; case 4: // Exponetial: V0 exp(-(r-R)/a) v = -this.V0[k]/ex/av; break; } //----------------------------------------------------------- // Central potential, Derivative else if(this.type[k] == 2) { switch(this.shape[k]) { default: v = 0.0; break; case 0: // Woods-Saxon v = 4.0*this.V0[k]/this.aV[k]*ex*(1.0-ex)*_ex*_ex*_ex; break; case 1: // squared Woods-Saxon v = 8.0*this.V0[k]/this.aV[k]*ex*ex*(2.0-ex)*_ex*_ex*_ex*_ex; break; case 2: // Gaussian v = 2.0*this.V0[k]/this.aV[k]*Math.exp(-xx*xx)*(1.0-2*xx*xx); break; case 3: // Yukawa v = -this.V0[k]*(r*r + 2.*av*r + 2.*av*av)/(ex*r*r*r*av*av); break; case 4: // Exponetial v = -this.V0[k]/ex/this.aV[k]; break; } } //----------------------------------------------------------- // Spin-Orbit else if(this.type[k] == 3 || this.type[k] == 4) { switch(this.shape[k]) { default: v = 0.0; break; case 0: // Woods-Saxon v = -4.0*ex*(av-r+ex*(av+r))*_ex*_ex*_ex/(r*r*av); break; case 1: // squared Woods-Saxon v = -8.0*ex*ex*(2.0*r-ex*r+av+av*ex)*_ex*_ex*_ex*_ex/(r*r*av); break; case 2: // Gaussian v = 2.0*Math.exp(-xx*xx)*(Rv/r - 2*xx*xx)/(av*r); break; case 3: // Yukawa v = -(3.0+3.0*this.aV[k]/r+r/this.aV[k])/(ex*av*r*r*r); break; case 4: // Exponetial v = -(r+av)/(ex*r*r*av); break; } v = v*2.0*this.V0[k]*this.LS*this.h_mc/(4.0*av); } //----------------------------------------------------------- // Tensor potential else if(this.type[k] == 5 || this.type[k] == 6) switch(this.shape[k]) { default: v = 0.0; break; case 0: // Woods-Saxon v = 8.0*this.V0[k]/av*ex*(4.0*ex-ex*ex-1.0)*_ex*_ex*_ex*_ex; break; case 1: // squared Woods-Saxon v = 4.0*this.V0[k]/av*ex*ex*(2.0-ex)*_ex*_ex*_ex*_ex; break; case 2: // Gaussian v = 2.0*this.V0[k]/av*(1.0-2.0*xx*xx)*Math.exp(-xx*xx); break; case 3: // Yukawa v = -this.V0[k]/(av*av*av)*(6.0*av*av*av + 1.*r*r*r + 2*r*av*av + 1.*av*r*r)/(ex*r*r*r*r); break; case 4: // Exponetial v = -this.V0[k]/ex/av; break; } return v; } //------------------------------------------------------------------------- this.doDebugging = function(doIt) { Debugging = doIt; } //------------------------------------------------------------------------- this.getMaximalRadius = function() { rMax = 0.0; for(i=0;i0) rMax = Math.max(rMax,this.r_Coul); return rMax*this.a13; } //------------------------------------------------------------------------- this.getMaximalDiffusness = function() { aMax = 0.0; for(i=0;ithis.Rmax-3*this.dR) r1=1.*this.Rmax-3.*this.dR; v1 = this.getPotentialDerivative(r1,eff); r2 = 1.*r1 - 1.*dr; v2 = this.getPotentialDerivative(r2,eff); while(1.0*v2*v1>0.)// rough search { v1 = v2; r1 = r2; r2 -= 1.*dr; if(r2 eps)// exact search { r=0.5*(1.*r1+1.*r2); v = this.getPotentialDerivative(r,eff); if(v*v2 > 0.) {v2=v; r2=r;} else r1=r; acc = Math.abs(v); iIter++; if(iIter>=nIter) { this.V_Barrier=this.getPotential(this.Const.small_add,eff); this.R_Barrier=0.; if(needsVBarrier) return this.V_Barrier; else return this.R_Barrier; } } V_Barrier = this.getPotential(r,eff); this.R_Barrier=r; } } if(needsVBarrier) return this.V_Barrier; else return this.R_Barrier; } //------------------------------------------------------------------------- this.getPocket = function(needsVPocket,eff)// else return RMinimum { if(!this.PocketFound)// minimum eshe ne naiden { this.PocketFound=true; // --------------------------------------------------------------------- eps = 1.0e-3; acc = 1.0; //-------------------------------------------------------------------- dr = this.getMaximalRadius()/100.; if(dr<0.01) dr = 0.01; //-------------------------------------------------------------------- // rough search of the potential minimum v1 = this.getPotential(0,eff); r1 = 0; for(r=dr;r<1.*this.Rmax+0.5*dr;r=1.*r+1.*dr) { v = this.getPotential(r,eff); if(v < v1) {r1 = r; v1 = v;} } if(this.Debugging) console.log("Debugging in Potential: rough min "+v1+" | "+r1);/**/ if(r1>1.*this.Rmax - 0.5*dr) { this.V_Pocket=this.getPotential(this.Rmax,eff); this.R_Pocket=this.Rmax; return (needsVPocket)?this.V_Pocket:this.R_Pocket; } if(r1 0.) { v1=v2; r1=r2; r2= 1.*r1 - 1.*sig*dr; v2=this.getPotentialDerivative(r2,eff); } if(this.Debugging) console.log("Debugging in Potential: dv1="+v1+" | r1="+r1+" | dv2="+v2+" | r2="+r2); while(acc > eps) { r=0.5*(1.*r1+1.*r2); v = this.getPotentialDerivative(r,eff); if(v*v2 > 0.) {v2=v; r2=r;} else r1=r; acc = Math.abs(v); } this.V_Pocket = this.getPotential(r,eff); this.R_Pocket = r; } return (needsVPocket)?this.V_Pocket:this.R_Pocket; } //------------------------------------------------------------------------- this.setSpin = function(S,recalculate) { this.Spin = S; this.BarrierFound = false; this.PocketFound = false; this.NeedCalculatePotential = true; this.setSpinProjection(this.spin_projection,recalculate); } //------------------------------------------------------------------------- // dlya sluchaya Spin={0,1/2,1,3/2,2} this.setSpinProjection = function(spin,recalculate) { if(Math.abs(spin)>this.Spin || this.ComFun.chet(this.Spin) != this.ComFun.chet(spin)) spin = Math.sign(spin)*this.Spin; this.spin_projection = spin; if(this.L == 0 || this.Spin == 0) this.LS = 0; else { J = Math.abs(1.*this.L + 0.5*spin), S = 0.5*this.Spin; this.LS = 0.5*(J*(1.*J+1) - this.L*(1.*this.L+1) - S*(1.*S+1)); } this.BarrierFound = false; this.PocketFound = false; this.NeedCalculatePotential = true; if(recalculate) this.calculatePotential(true); } //------------------------------------------------------------------------- // Определяем правило расчета радиусов // для NRVStyle R = r0*(AP^1/3 + AT^1/3), иначе R = r0*AT^1/3 this.setRadiiStyle = function(style) { if(style) this.NRVStyleForRadii = true; else this.NRVStyleForRadii = false; } //------------------------------------------------------------------------- // сохранение потенциала в строку this.savePotential = function() { buf = "Interaction potential for the bound state (entrance channel) "+ this.A_Proj+""+Nuclei.getElemByZ(this.Z_Proj)+" + "+ this.A_Targ+""+Nuclei.getElemByZ(this.Z_Targ)+"\n"+ "r(fm) VCoul(MeV) VNucl(MeV) V(MeV)\n"; for(ir=0;ir