11.2 Initializing Species Information in Simulation_initSpecies

Before you can work with the properties of a fluid, you must initialize the data in the Multispecies unit. Normally, initialization is done in the routine Simulation_initSpecies. An example procedure is shown below and consists of setting relevant properties for all fluids/SPECIES defined in the Config file. Fluids do not have to be isotopes; any molecular substance which can be defined by the properties shown in Figure 11.4 is a valid input to the Multispecies unit.

Figure 11.4: A Simulation_initSpecies.F90 file showing Multispecies initialization
 
subroutine Simulation_initSpecies()


implicit none
#include "Multispecies.h"
#include "Flash.h"


! These two variables are defined in the Config file as
! SPECIES SF6 and SPECIES AIR
  call Multispecies_setProperty(SF6_SPEC, A, 146.)
  call Multispecies_setProperty(SF6_SPEC, Z, 70.)
  call Multispecies_setProperty(SF6_SPEC, GAMMA, 1.09)


call Multispecies_setProperty(AIR_SPEC, A, 28.66)
  call Multispecies_setProperty(AIR_SPEC, Z, 14.)
  call Multispecies_setProperty(AIR_SPEC, GAMMA, 1.4)
end subroutine Simulation_initSpecies

FLASH3 Transition: For nuclear burning networks, a Simulation_initSpecies routine is already predefined. It automatically initializes all isotopes found in the Config file. To use this shortcut, REQUIRE the module Simulation/SimulationComposition in the Config file.