# extract Skyrme parameters from PRC82 024313 (2010) # mac:skyrme/unedf0.py import sys,os from math import * h2m = 20.73553 #first, the explicit C parameters (UNEDF0) Cgrad_0 = -55.2606 Cgrad_1 = -55.6226 CgradJ_0 = -79.5308 CgradJ_1 = 45.6302 #next, the variables implicitly defining other C parameters rho = 0.160526 B = -16.0559 Knm = 230. a_sym = 30.5429 L_sym = 45.0804 Minv_0 = 0.9 Minv_1 = 1.249 #in text below Eq. (42) #now some formulas Ctau_0 = h2m*(Minv_0 - 1)/rho # Eq. (19) Ctau_1 = Ctau_0 - h2m*(Minv_1 -1)/rho # Eq. (30) tau = (3./5.) * (3*pi**2*rho/2.)**(2./3.) # Eq. (10) temp1 = h2m*(4*Minv_0 - 3) *tau temp2 = h2m*(6*Minv_0 - 9) * tau gm = (temp1 - Knm - 9*B)/(temp2 + 9*B) # Eq. (20) temp3 = h2m*((2-3*gm)*Minv_0 - 3)*tau Crho_0 = (temp3 + 3*(1+gm)*B)/(3*gm*rho) # Eq. (17) temp4 = h2m*(3- 2*Minv_0)*tau Crho_0D = (temp4 - 3*B)/(3*gm*rho**(1+gm)) # Eq. (18) temp5 = tau*(Ctau_0 + 3*Ctau_1) * rho temp6 = (27*(1 + gm)*a_sym - 9* L_sym +5*(2-3*gm)*temp5-5*tau*(1+3*gm)*h2m) Crho_1 = temp6/(27*gm*rho) # Eq. (31),(32) Crho_1D = (-27*a_sym + 9* L_sym + 5*(h2m*tau -2*temp5))/(27*gm*rho**(1+gm)) #convert to standard Skyrme, augmented by W_q from NP A 584 467. def c2xt(In): """Converts C-form skyr params to XT-form skyr params Symbolically, In=['Crho_0','Crho_1','Crho_0D','Crho_1D','Cgrad_0','Cgrad_1','Ctau_0','Ctau_1','CgradJ_0','CgradJ_1'] out =['x0','x1','x2','x3','t0','t1','t2','t3','W','Wq']""" out = [None]*10 out[0] = -(In[0]+3.0*In[1])/(2.0*In[0]) out[1] = (-4.0*In[4]-12.0*In[5]+In[6]+3.0*In[7])/(8.0*In[4]-2.0*In[6]) out[2] = (4.0*In[4]-20.0*In[5]+3.0*In[6]-15.0*In[7])/(-8.0*In[4]+16.0*In[5]-6.0*In[6]+12.0*In[7]) out[3] = -(In[2]+3*In[3])/(2*In[2]) out[4] = 8*In[0]/3 out[5] = (-16*In[4]+4*In[6])/3 out[6] = (16*In[4]-32*In[5]+12*In[6]-24*In[7])/3 out[7] = 16*In[2] out[8] = -2*In[8]+2*In[9] out[9] = -4*In[9] return out In=[Crho_0,Crho_1,Crho_0D,Crho_1D,Cgrad_0,Cgrad_1,Ctau_0,Ctau_1,CgradJ_0,CgradJ_1] In_label=['Crho_0','Crho_1','Crho_0D','Crho_1D','Cgrad_0','Cgrad_1','Ctau_0','Ctau_1','CgradJ_0','CgradJ_1'] out_label =['x0','x1','x2','x3','t0','t1','t2','t3','W','Wq'] out = c2xt(In) print 'C format' for i in range(len(out)) : print In_label[i], In[i] print 'xt format' for i in range(len(out)) : print out_label[i], out[i]