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~2~~CallsGraph proc~floortemperature~2 floortemperature proc~get_pthermal~2 get_pthermal proc~floortemperature~2->proc~get_pthermal~2 proc~get_rfactor~2 get_Rfactor proc~floortemperature~2->proc~get_rfactor~2 proc~get_rho~2 get_rho proc~floortemperature~2->proc~get_rho~2

Called by

proc~~floortemperature~2~~CalledByGraph proc~floortemperature~2 floortemperature proc~radiative_cooling_add_source~2 radiative_cooling_add_source proc~radiative_cooling_add_source~2->proc~floortemperature~2

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