| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | c_pt | |||
| real(kind=dp), | value | :: | B | |||
| real(kind=dp), | value | :: | St |
function critical_temperature_nbti(c_pt,B,St) result(critical_temperature) bind(C) type(c_ptr), value :: c_pt real(dp), value :: B,St real(dp) :: critical_temperature real(dp) :: Blim,bb0,tt,Tc,Blow type(nbti_cfg_t), pointer :: nbti_ptr call c_f_pointer(c_pt,nbti_ptr) ! M.S.Lubell, Scaling formulas for critical current and critical field ! for commercial NbTi, IEEE Trans. Mag. ,19, (1983). Blow=1.0e-3_dp Blim=max(abs(B),Blow) bb0 = Blim/nbti_ptr%Bc20 if(bb0>0.0_dp .and. bb0<1.0_dp) then tt = (1.0_dp-bb0)**(1.0_dp/nbti_ptr%nu) else if(abs(bb0)<=1.0e-12_dp) then tt = 1.0_dp else if(bb0>1.0_dp) then tt = 0.0_dp endif Tc = nbti_ptr%Tc0_p * tt critical_temperature = Tc end function critical_temperature_nbti