initialize_energy Subroutine

public subroutine initialize_energy(mesh, params, energy, species_Y)

Initialize energy fields from case parameters.

Arguments

Type IntentOptional Attributes Name
type(mesh_t), intent(in) :: mesh
type(case_params_t), intent(in) :: params
type(energy_fields_t), intent(inout) :: energy
real(kind=rk), intent(in), optional :: species_Y(:,:)

Calls

proc~~initialize_energy~~CallsGraph proc~initialize_energy mod_energy::initialize_energy proc~allocate_energy mod_energy::allocate_energy proc~initialize_energy->proc~allocate_energy proc~update_enthalpy_from_temperature_constant_cp mod_energy::update_enthalpy_from_temperature_constant_cp proc~initialize_energy->proc~update_enthalpy_from_temperature_constant_cp proc~update_thermo_from_temperature_cantera mod_energy::update_thermo_from_temperature_cantera proc~initialize_energy->proc~update_thermo_from_temperature_cantera proc~zero_radiation_source mod_energy::zero_radiation_source proc~initialize_energy->proc~zero_radiation_source proc~finalize_energy mod_energy::finalize_energy proc~allocate_energy->proc~finalize_energy proc~fatal_error mod_kinds::fatal_error proc~update_enthalpy_from_temperature_constant_cp->proc~fatal_error interface~cantera_update_thermo_c mod_energy::cantera_update_thermo_c proc~update_thermo_from_temperature_cantera->interface~cantera_update_thermo_c proc~build_c_species_names mod_energy::build_c_species_names proc~update_thermo_from_temperature_cantera->proc~build_c_species_names proc~build_thermo_y mod_energy::build_thermo_Y proc~update_thermo_from_temperature_cantera->proc~build_thermo_y proc~update_thermo_from_temperature_cantera->proc~fatal_error proc~build_thermo_y->proc~fatal_error

Called by

proc~~initialize_energy~~CalledByGraph proc~initialize_energy mod_energy::initialize_energy program~lowmach_react_hex lowmach_react_hex program~lowmach_react_hex->proc~initialize_energy

Source Code

   subroutine initialize_energy(mesh, params, energy, species_Y)
      type(mesh_t), intent(in) :: mesh
      type(case_params_t), intent(in) :: params
      type(energy_fields_t), intent(inout) :: energy
      real(rk), intent(in), optional :: species_Y(:,:)

      call allocate_energy(mesh, energy)

      energy%T = params%initial_T
      energy%T_old = energy%T

      if (params%enable_cantera_thermo) then
         call update_thermo_from_temperature_cantera(mesh, params, energy, species_Y)
      else
         call update_enthalpy_from_temperature_constant_cp(params, energy)
         energy%cp = params%energy_cp
         energy%lambda = params%energy_lambda
         energy%rho_thermo = params%rho
      end if

      energy%h_old = energy%h
      call zero_radiation_source(energy)
   end subroutine initialize_energy