floortemperature Subroutine

public subroutine floortemperature(qdt, wCT, wnew, x, fl)

Arguments

Type IntentOptional Attributes Name
double precision, intent(in) :: qdt
double precision, intent(in) :: wCT(nw_phys)
double precision, intent(inout) :: wnew(nw_phys)
double precision, intent(in) :: x(1:ndim)
type(rc_fluid), intent(in) :: fl

Calls

proc~~floortemperature~3~~CallsGraph proc~floortemperature~3 floortemperature proc~get_pthermal~3 get_pthermal proc~floortemperature~3->proc~get_pthermal~3 proc~get_rfactor~3 get_Rfactor proc~floortemperature~3->proc~get_rfactor~3 proc~get_rho~3 get_rho proc~floortemperature~3->proc~get_rho~3

Called by

proc~~floortemperature~3~~CalledByGraph proc~floortemperature~3 floortemperature proc~radiative_cooling_add_source~3 radiative_cooling_add_source proc~radiative_cooling_add_source~3->proc~floortemperature~3

Source Code

    subroutine floortemperature(qdt,wCT,wnew,x,fl)
      
    !  Force minimum temperature to a fixed temperature
      double precision, intent(in)    :: qdt, wCT(nw_phys)
      double precision, intent(inout) :: wnew(nw_phys)
      double precision, intent(in)    :: x(1:ndim)
      type(rc_fluid), intent(in) :: fl
      double precision :: etherm, rho, emin, Rfactor

      etherm = get_pthermal(wCT,x)  
      rho = get_rho(wCT,x)  
      Rfactor = get_Rfactor()
      emin = rho*fl%tlow*Rfactor
      if(etherm < emin) then
        wnew(iw_e)=wnew(iw_e)+(emin-etherm)*invgam
      end if
    end subroutine floortemperature