Skip to content
Merged
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
12 changes: 12 additions & 0 deletions src/gsi/GasSurfaceInteraction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
14 changes: 14 additions & 0 deletions src/gsi/GasSurfaceInteraction.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
24 changes: 24 additions & 0 deletions src/gsi/Surface.h
Original file line number Diff line number Diff line change
Expand Up @@ -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!";
}

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

};
Expand Down
18 changes: 18 additions & 0 deletions src/gsi/SurfaceBalanceSolverMassEnergy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions src/gsi/SurfaceRadiation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions src/gsi/SurfaceRadiation.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down
Loading