diff --git a/src/gsi/GasSurfaceInteraction.cpp b/src/gsi/GasSurfaceInteraction.cpp index 31095b85..73450ad7 100644 --- a/src/gsi/GasSurfaceInteraction.cpp +++ b/src/gsi/GasSurfaceInteraction.cpp @@ -216,6 +216,18 @@ void GasSurfaceInteraction::getMassBlowingRate(double& mdot){ //============================================================================== +void GasSurfaceInteraction::getRadiativeHeatFlux(double& qrad){ + qrad = mp_surf->radiativeHeatFlux(); +} + +//============================================================================== + +void GasSurfaceInteraction::getSurfaceEmissivity(double& eps){ + eps = mp_surf->surfaceEmissivity(); +} + +//============================================================================== + inline void GasSurfaceInteraction::errorWrongTypeofGSIFile( const std::string& gsi_root_tag) { diff --git a/src/gsi/GasSurfaceInteraction.h b/src/gsi/GasSurfaceInteraction.h index 3a7313a2..74e07ce5 100644 --- a/src/gsi/GasSurfaceInteraction.h +++ b/src/gsi/GasSurfaceInteraction.h @@ -179,6 +179,20 @@ class GasSurfaceInteraction */ void getMassBlowingRate(double& mdot); + /** + * Function which returns the total radiative flux. + * + * @param qrad on return radiative heat flux W/m^2 + */ + void getRadiativeHeatFlux(double& qrad); + + /** + * Function which returns the surface emissivity. + * + * @param eps on return surface emissivity + */ + void getSurfaceEmissivity(double& eps); + private: /** * Error function; wrong type of Gas Surface Interaction input file. diff --git a/src/gsi/Surface.h b/src/gsi/Surface.h index 8e2f7b54..b2ca4e8a 100644 --- a/src/gsi/Surface.h +++ b/src/gsi/Surface.h @@ -193,6 +193,30 @@ class Surface */ virtual double massBlowingRate() = 0; +//============================================================================== + + /** + * Purely virtual function returning the net radiative heat flux. + */ + virtual double radiativeHeatFlux() + { + throw LogicError() + << "radiativeHeatFlux can be called only when solving " + << "the surface energy balance!"; + } + +//============================================================================== + + /** + * Purely virtual function returning the surface emissivity. + */ + virtual double surfaceEmissivity() + { + throw LogicError() + << "emissivity can be called only when solving " + << "the surface energy balance!"; + } + //============================================================================== }; diff --git a/src/gsi/SurfaceBalanceSolverMassEnergy.cpp b/src/gsi/SurfaceBalanceSolverMassEnergy.cpp index 01087b2a..31a76e9b 100644 --- a/src/gsi/SurfaceBalanceSolverMassEnergy.cpp +++ b/src/gsi/SurfaceBalanceSolverMassEnergy.cpp @@ -239,6 +239,24 @@ class SurfaceBalanceSolverMassEnergy : return 0.; } +//============================================================================== + + double radiativeHeatFlux() + { + if (mp_surf_rad != NULL) + return mp_surf_rad->surfaceNetRadiativeHeatFlux(); + return 0.; + } + +//============================================================================== + + double surfaceEmissivity() + { + if (mp_surf_rad != NULL) + return mp_surf_rad->surfaceEmissivity(); + return 0.; + } + //============================================================================== void updateFunction(Eigen::VectorXd& v_X) diff --git a/src/gsi/SurfaceRadiation.cpp b/src/gsi/SurfaceRadiation.cpp index 1c7f31e2..fb324732 100644 --- a/src/gsi/SurfaceRadiation.cpp +++ b/src/gsi/SurfaceRadiation.cpp @@ -72,5 +72,12 @@ double SurfaceRadiation::surfaceNetRadiativeHeatFlux() return m_eps * (Mutation::SB * std::pow(T_surf, 4.0) - m_gas_rad_heat_flux); } +//============================================================================== + +double SurfaceRadiation::surfaceEmissivity() +{ + return m_eps; +} + } // namespace GasSurfaceInteraction } // namespace Mutation diff --git a/src/gsi/SurfaceRadiation.h b/src/gsi/SurfaceRadiation.h index 98d21197..e99f8e16 100644 --- a/src/gsi/SurfaceRadiation.h +++ b/src/gsi/SurfaceRadiation.h @@ -73,6 +73,12 @@ class SurfaceRadiation */ double surfaceNetRadiativeHeatFlux(); +//============================================================================== + /** + * Function which returns the surface emissivity. + */ + double surfaceEmissivity(); + //============================================================================== /** * Function which takes the incoming radiative heat from the gas .