Basic formulas.

chi[r_,z_]:=Product[(1-t^(m+n-r+2)y^(m-n)/z)/(1-t^(m+n+r)y^(m-n) z)+O[t]^(order+1),{n,0,order},{m,0,order-n}]

chi[r_,z_List]:= Times@@(chi[r,#]& /@ z)

vec[z_]:=1/chi[0,z]

vec0:=Product[1-t^m y^m +O[t]^(order+1),{m,1,order}]Product[1-t^m y^(-m) +O[t]^(order+1),{m,1,order}]

vec[z_List]:=Times@@(vec[#]&/@z)

integrate[f_,x_]:=SeriesCoefficient[Normal[f/x],{x,0,-1}]

integrate[f_,{x_}]:=integrate[f,x]

integrate[f_,x_List]:=integrate[integrate[f,Rest[x]],x[[1]]]

a chiral multiplet.

order=2;

chi[2/3,z]

SU (2) with 5 flavors.

ZEchi:=chi[3/5,{x,1/x}]^5chi[3/5,{x,1/x}]^5;

ZEvec:=vec[{x^2,1/x^2}]vec0/2;

ZE:=integrate[ZEvec ZEchi,x]

ZE

SU (3) with 5 flavors with mesons.

w3:=1/w1/w2;

ZMchi:=(chi[2/5,{w1,w2,w3}])^5(chi[2/5,{1/w1,1/w2,1/w3}])^5chi[6/5  ,1]^25;

ZMvec:=vec[{w1/w2,w1/w3,w2/w1,w2/w3,w3/w1,w3/w2}]vec0 vec0 /6;

ZM:=integrate[ZMchi ZMvec,{w1,w2}]

ZM//Expand

SU (2) with 4 flavors with flavor chemical potentials

tri[x_,y_,z_]:=Flatten[Outer[Times,{x,1/x},{y,1/y},{z,1/z}],2]

TRI:=chi[1/2,tri[x,A,S]] chi[1/2,tri[x,U,J]];

Z:=integrate[TRI ZEvec,x]

Z

Z/(Z/.{A->U,U-> A})//Simplify