friction_factor_central_spiral Function

public function friction_factor_central_spiral(c_pt, Re) result(friction) bind(C)

Arguments

Type IntentOptional Attributes Name
type(c_ptr), value :: c_pt
real(kind=dp), value :: Re

Return Value real(kind=dp)


Source Code

  function friction_factor_central_spiral(c_pt,Re) result(friction) bind(C)
    type(c_ptr), value :: c_pt
    real(dp), value :: Re
    real(dp) :: friction
    type(central_spiral_cfg_t), pointer :: central_spiral_ptr
    call c_f_pointer(c_pt,central_spiral_ptr)    

    if(Re>0.0_dp) then
      friction=0.25_dp*central_spiral_ptr%alpha/Re**central_spiral_ptr%beta
    else
      friction=0.0_dp
    endif
  end function friction_factor_central_spiral