recover_temperature_constant_cp Subroutine

public subroutine recover_temperature_constant_cp(params, energy)

Recover T from h using the constant-cp thermodynamic model.

Arguments

Type IntentOptional Attributes Name
type(case_params_t), intent(in) :: params
type(energy_fields_t), intent(inout) :: energy

Calls

proc~~recover_temperature_constant_cp~~CallsGraph proc~recover_temperature_constant_cp mod_energy::recover_temperature_constant_cp proc~fatal_error mod_kinds::fatal_error proc~recover_temperature_constant_cp->proc~fatal_error

Called by

proc~~recover_temperature_constant_cp~~CalledByGraph proc~recover_temperature_constant_cp mod_energy::recover_temperature_constant_cp proc~advance_energy_transport mod_energy::advance_energy_transport proc~advance_energy_transport->proc~recover_temperature_constant_cp program~lowmach_react_hex lowmach_react_hex program~lowmach_react_hex->proc~advance_energy_transport

Source Code

   subroutine recover_temperature_constant_cp(params, energy)
      type(case_params_t), intent(in) :: params
      type(energy_fields_t), intent(inout) :: energy

      if (.not. allocated(energy%T) .or. .not. allocated(energy%h)) then
         call fatal_error('energy', 'energy arrays are not allocated')
      end if

      if (params%energy_cp <= tiny_safe) then
         call fatal_error('energy', 'energy_cp must be positive')
      end if

      energy%T = params%energy_reference_T + &
                 (energy%h - params%energy_reference_h) / params%energy_cp
   end subroutine recover_temperature_constant_cp