friction_correlation_der Function

public function friction_correlation_der(me, Re)

Type Bound

friction_t

Arguments

Type IntentOptional Attributes Name
class(friction_t), intent(inout) :: me
real(kind=dp), intent(in) :: Re

Return Value real(kind=dp)


Called by

proc~~friction_correlation_der~~CalledByGraph proc~friction_correlation_der friction_t%friction_correlation_der proc~friction_source_term friction_source_term proc~friction_source_term->proc~friction_correlation_der proc~main_loop main_loop proc~main_loop->proc~friction_source_term program~reims_p reims_p program~reims_p->proc~main_loop

Source Code

  function friction_correlation_der(me,Re)
    class(friction_t),  intent(inout) :: me
    real(dp), intent(in) :: Re
    real(dp) :: friction_correlation_der
    real(dp) :: eps
    if(associated(me%frict_der)) then
        friction_correlation_der=me%frict_der(me%frict_cfg,Re)
    else
        eps=2.0e-1_dp
        friction_correlation_der=(me%frict(me%frict_cfg,Re+0.5_dp*eps) &
                                 -me%frict(me%frict_cfg,Re-0.5_dp*eps))/eps
    endif
  end function friction_correlation_der