Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ docs/html/

# OS specifics
.DS_Store

*/CMakeFiles/
111 changes: 111 additions & 0 deletions data/gsi/smb_ACA_model.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<gsi gsi_mechanism = "detailed_mass">

<surface_properties type = "detailed" steady_coverage = "true">
<site label = "s" sites_per_m2 = "6.022e18" species = "N O O*" />
<surface label="b" species="C" />
</surface_properties>

<surface_chemistry>
<!-- Adsorption of O Atoms -->
<reaction type="detailed" formula="O + s => O-s">
<adsorption stick_coef = "0.3" T = "0.0" />
</reaction>

<!-- Thermal Desorption of O Atoms -->
<reaction type="detailed" formula="O-s => O + s">
<desorption_tst T = "44277."/>
</reaction>

<!-- Gas Phase CO Production -->
<reaction type="detailed" formula="O + O-s + C-b => CO + O + s">
<ER_arrhenius pre_exp = "100." T = "4000."/>
</reaction>

<!-- Gas Phase CO2 Production -->
<reaction type="detailed" formula="O + O-s + C-b => CO2 + s">
<ER_arrhenius pre_exp = "1." T = "500."/>
</reaction>

<!-- High Energy O Adsorption -->
<reaction type="detailed" formula="O + s => O*-s">
<adsorption stick_coef = "0.7" T = "0.0"/>
</reaction>

<!-- High Energy O Desorption -->
<reaction type="detailed" formula="O*-s => O + s">
<desorption_tst T = "96500."/>
</reaction>

<!-- CO Production via High Energy O -->
<reaction type="detailed" formula="O + O*-s + C-b => CO + O + s">
<ER_arrhenius pre_exp = "1000." T = "4000."/>
</reaction>

<!-- O2 Production via High Energy O -->
<reaction type="detailed" formula="O*-s + O*-s => O2 + 2s">
<LH_arrhenius pre_exp= "1.0e-3" T = "15000."/>
</reaction>

<!-- O2 Production via Adsorped O -->
<reaction type="detailed" formula="O-s + O-s => O2 + 2s">
<LH_arrhenius pre_exp = "5.e-5" T = "15000."/>
</reaction>

<!-- Adsorption of N Atoms -->
<reaction type="detailed" formula="N + s => N-s">
<adsorption stick_coef = "1." T = "2500." />
</reaction>

<!-- Thermal Desorption of N Atoms -->
<reaction type="detailed" formula="N-s => N + s">
<desorption_tst T = "73971.6"/>
</reaction>

<!-- ER CN production -->
<reaction type="detailed" formula="N + N-s + C-b => CN + N + s">
<ER_arrhenius pre_exp = "1.5" T = "7000.0"/>
</reaction>

<!-- ER N2 production -->
<reaction type="detailed" formula="N + N-s => N2 + s">
<ER_arrhenius pre_exp = "0.5" T = "2000.0"/>
</reaction>

<!-- LH N2 production -->
<reaction type="detailed" formula="N-s + N-s => N2 + 2s">
<LH_arrhenius pre_exp = "0.1" T = "21000.0"/>
</reaction>

<!-- LH CN production -->
<reaction type="detailed" formula="N-s + C-b => CN + s">
<LH_abla_arrhenius pre_exp = "1.0e8" T = "20676.0"/>
</reaction>

<!-- Adbsorbed O Production via O2 -->
<reaction type="detailed" formula="O2 + 2s => 2O-s">
<ER_2_arrhenius pre_exp = "1." T = "8000."/>
</reaction>

<!-- CO Production via O2 and O-s -->
<reaction type="detailed" formula="O2 + O-s + C-b => CO + O2 + s">
<ER_arrhenius pre_exp = "100." T = "4000."/>
</reaction>

<!-- CO2 Production via O2 and O-s -->
<reaction type="detailed" formula="O2 + O-s + C-b => CO2 + O + s">
<ER_arrhenius pre_exp = "1." T = "500."/>
</reaction>

<!-- O-s Production via O2 -->
<reaction type="detailed" formula="O2 + 2s => 2O*-s">
<ER_2_arrhenius pre_exp = "1." T = "8000."/>
</reaction>

<!-- CO Production via O2 and O* -->
<reaction type="detailed" formula="O2 + O*-s + C-b => CO + O2 + s">
<ER_arrhenius pre_exp = "1000." T = "4000."/>
</reaction>

</surface_chemistry>

</gsi>
4 changes: 2 additions & 2 deletions data/thermo/elements.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- Electron (treated as element in mutation++) -->
<element name="e-" charge="-1">
<mw units="g/mol">0.00055</mw>
<mw units="g/mol">0.000548579903</mw>
</element>

<!-- Aluminium -->
Expand Down Expand Up @@ -62,7 +62,7 @@

<!-- Carbon -->
<element name="C">
<mw units="g/mol">12.011</mw>
<mw units="g/mol">12.0107</mw>
</element>

<!-- Chlorine -->
Expand Down
43 changes: 40 additions & 3 deletions src/fortran/cwrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ void NAME_MANGLE(species_name)(int* index, F_STRING species, F_STRLEN species_le
string_to_char(p_mix->speciesName(*index-1), species, species_length);
}

//==============================================================================
bool NAME_MANGLE(has_electrons)()
{
return p_mix->hasElectrons();
}

//==============================================================================
double NAME_MANGLE(mixture_mw)()
{
Expand Down Expand Up @@ -366,16 +372,34 @@ double NAME_MANGLE(heavy_thermal_conductivity)()
return p_mix->heavyThermalConductivity();
}

//==============================================================================
double NAME_MANGLE(rotational_thermal_conductivity)()
{
return p_mix->rotationalThermalConductivity();
}

//==============================================================================
double NAME_MANGLE(vibrational_thermal_conductivity)()
{
return p_mix->vibrationalThermalConductivity();
}

//==============================================================================
double NAME_MANGLE(electronic_thermal_conductivity)()
{
return p_mix->electronicThermalConductivity();
}

//==============================================================================
double NAME_MANGLE(electron_thermal_conductivity)()
{
return p_mix->electronThermalConductivity();
}

//==============================================================================
double NAME_MANGLE(internal_thermal_conductivity)(double T)
double NAME_MANGLE(internal_thermal_conductivity)(double *T)
{
return p_mix->internalThermalConductivity(T);
return p_mix->internalThermalConductivity(*T);
}

//==============================================================================
Expand Down Expand Up @@ -483,4 +507,17 @@ void NAME_MANGLE(convert_ys_to_ye)(
p_mix->convert<Y_TO_YE>(species_y, elements_y);
}

//==============================================================================
//==============================================================================
double NAME_MANGLE(mixture_s_mass)()
{
return p_mix->mixtureSMass();
}

//==============================================================================

double NAME_MANGLE(mixture_equilibrium_sound_speed)()
{
return p_mix->equilibriumSoundSpeed();
}

//==============================================================================
35 changes: 34 additions & 1 deletion src/fortran/cwrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ int NAME_MANGLE(species_index)(
void NAME_MANGLE(species_name)(
int* index, F_STRING species, F_STRLEN species_length);

/**
* Returns true if the gas has electrons.
*/
bool NAME_MANGLE(has_electrons)();

/**
* Returns the mixture molecular weight in kg/mol.
*/
Expand Down Expand Up @@ -360,6 +365,24 @@ double NAME_MANGLE(equilibrium_thermal_conductivity)();
*/
double NAME_MANGLE(heavy_thermal_conductivity)();

/**
* Returns the rotational thermal conductivity using the
* set algorithm.
*/
double NAME_MANGLE(rotational_thermal_conductivity)();

/**
* Returns the vibrational thermal conductivity using the
* set algorithm.
*/
double NAME_MANGLE(vibrational_thermal_conductivity)();

/**
* Returns the electronic thermal conductivity using the
* set algorithm.
*/
double NAME_MANGLE(electronic_thermal_conductivity)();

/**
* Returns the electron translational thermal conductivity.
*/
Expand All @@ -368,7 +391,7 @@ double NAME_MANGLE(electron_thermal_conductivity)();
/**
* Returns the internal energy thermal conductivity using Euken's formulas.
*/
double NAME_MANGLE(internal_thermal_conductivity)(double T);
double NAME_MANGLE(internal_thermal_conductivity)(double *T);

/**
* Returns the reactive thermal conductivity which accounts for reactions
Expand Down Expand Up @@ -483,6 +506,16 @@ void NAME_MANGLE(convert_ye_to_xe)(
void NAME_MANGLE(convert_ys_to_ye)(
const double* species_y, double* elements_y);

/**
* Returns the equilibrium sound speed
*/
double NAME_MANGLE(mixture_equilibrium_sound_speed)();

/**
* Returns the entropy per unit mass
*/
double NAME_MANGLE(mixture_s_mass)();

#ifdef __cplusplus
}
#endif
Expand Down
21 changes: 20 additions & 1 deletion src/fortran/cwrapper_interface.f90
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,33 @@ real(kind=8) function mpp_heavy_thermal_conductivity()
real(kind=8) function mpp_electron_thermal_conductivity()
end function

real(kind=8) function mpp_internal_thermal_conductivity()
real(kind=8) function mpp_internal_thermal_conductivity(Tv)
real(kind=8), intent(in) :: Tv
end function

real(kind=8) function mpp_reactive_thermal_conductivity()
end function

real(kind=8) function mpp_sigma()
end function

logical function mpp_has_electrons()
end function

real(kind=8) function mpp_rotational_thermal_conductivity()
end function

real(kind=8) function mpp_vibrational_thermal_conductivity()
end function

real(kind=8) function mpp_electronic_thermal_conductivity()
end function

real(kind=8) function mpp_mixture_s_mass()
end function

real(kind=8) function mpp_mixture_equilibrium_sound_speed()
end function

end interface

Expand Down
3 changes: 3 additions & 0 deletions src/gsi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ add_sources(mutation++
GSIRateLawGammaConst.cpp
GSIRateLawGammaT.cpp
GSIRateLawERArrhenius.cpp
GSIRateLawER2Arrhenius.cpp
GSIRateLawHLArrhenius.cpp
GSIRateLawHLArrhenius_abla.cpp
GSIRateLawSublimation.cpp
GSIRateManagerDetailed.cpp
GSIRateManagerPhenomenological.cpp
Expand Down
Loading