Skip to content

Commit

Permalink
v0.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienledigabel committed Mar 9, 2021
1 parent 86680c5 commit 2e38320
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions src/CentralReceiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ double CentralReceiver::computeEnergyToFluid ( double Q_in ) {
m_dot_2 = 0.0;
}
}
catch (std::runtime_error) {
catch ( const std::runtime_error & ) {
m_dot_2 = 0.0;
eff = 0.0;
Q_loss = 0.0;
Expand Down Expand Up @@ -271,7 +271,7 @@ double CentralReceiver::computeConductionLosses ( double T ) const {
throw std::runtime_error ( "Could not find converging value for receiver conduction losses rate" );

}
catch ( std::runtime_error ) {
catch ( const std::runtime_error & ) {
q_2 = q_out;
}

Expand Down Expand Up @@ -309,7 +309,7 @@ double CentralReceiver::fSolveForT ( double coef_T4, double coef_T, double T_max
if ( count >= 150 )
throw std::runtime_error ("Newton method could not converge to an external surface temperature (Receiver)");
}
catch ( std::runtime_error ) {
catch ( const std::runtime_error & ) {
T_2 = T_max;
}
return T_2;
Expand Down
Empty file modified src/Clock.cpp
100755 → 100644
Empty file.
Empty file modified src/Clock.hpp
100755 → 100644
Empty file.
Empty file modified src/Evaluator.cpp
100755 → 100644
Empty file.
Empty file modified src/Evaluator.hpp
100755 → 100644
Empty file.
Empty file modified src/RNG.cpp
100755 → 100644
Empty file.
Empty file modified src/RNG.hpp
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion src/Scenario.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1835,7 +1835,7 @@ bool Scenario::check_apriori_constraints_minCost_C1 ( void ) const {
if (_receiverNbOfTubes * _receiverTubesOutsideDiam > PI*_receiverApertureWidth / 2.0)
return false;

if (_receiverTubesOutsideDiam < _receiverTubesInsideDiam + 0.0005)
if (_receiverTubesOutsideDiam < _receiverTubesInsideDiam + 0.0005)
return false;

if (_towerHeight < 2 * _heliostatHeight)
Expand Down
14 changes: 7 additions & 7 deletions src/ThermalStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ double ThermalStorage::fComputeEnergyLosses ( double T, double H ) {
if ( count >= 150 )
throw Simulation_Interruption ("could not converge to storage external surface temperature for wetted section");
}
catch ( Simulation_Interruption ) {
catch ( const Simulation_Interruption & ) {
q_wet_2 = Q_out_wet;
}

Expand Down Expand Up @@ -348,7 +348,7 @@ double ThermalStorage::fComputeEnergyLosses ( double T, double H ) {
throw Simulation_Interruption ( "Cannot converge on heat loss through top surface of storage" );
}
}
catch ( Simulation_Interruption ) {
catch ( const Simulation_Interruption & ) {
//Setting temperature to worst case
T_o_t = (T_ATM + T)/2.;
q_t_cond_2 = (T_i_t_1 - T_ATM) / R_t_cond;
Expand Down Expand Up @@ -376,7 +376,7 @@ double ThermalStorage::fComputeEnergyLosses ( double T, double H ) {
throw Simulation_Interruption ("Cannot converge on heat loss through dry wall surface of storage");
}
}
catch (Simulation_Interruption) {
catch ( const Simulation_Interruption & ) {
//Setting temperature to worst case
T_o_w = (T_ATM + T) / 2.;;
q_w_cond_2 = (T_i_w_1 - T_ATM) / R_w_cond;
Expand Down Expand Up @@ -423,7 +423,7 @@ double ThermalStorage::fComputeEnergyLosses ( double T, double H ) {
//The total radiative losses are obtained using the final value of Jm
Q_out_rad = (BOLTZMANN*pow(T, 4.0) - J_m) / ((1 - EPSILON_MS) / (EPSILON_MS*A_floor));
}
catch (Simulation_Interruption) {
catch ( const Simulation_Interruption & ) {
//Assuming worst case losses
J_m = BOLTZMANN*pow((T + T_ATM)/2.0,4.0);
Q_out_rad = (BOLTZMANN*pow(T, 4.0) - J_m) /
Expand Down Expand Up @@ -479,7 +479,7 @@ double ThermalStorage::fComputeEnergyLosses ( double T, double H ) {
throw Simulation_Interruption ("Could not find convergence for conduction losses through top wetted surface");
}
}
catch (Simulation_Interruption) {
catch ( const Simulation_Interruption & ) {
//Setting to preliminary value
q_t_cond_2 = Q_top_cond;
}
Expand Down Expand Up @@ -566,7 +566,7 @@ double ThermalStorage::fSolveForT ( double coef_T4,
if ( count >= 150 )
throw Simulation_Interruption ("Newton's method could not converge to a valid external temperature for storage");
}
catch ( Simulation_Interruption ) {
catch ( const Simulation_Interruption & ) {
T_2 = (T_max + T_min) / 2.0;
}
return T_2;
Expand Down Expand Up @@ -621,7 +621,7 @@ double ThermalStorage::fSolveForT_i ( double coef_T4 ,
T_2 = (T_1 + T_2) / 2.0;
}
}
catch (Simulation_Interruption) {
catch ( const Simulation_Interruption & ) {
T_2 = T_min;
}
return T_2;
Expand Down
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* SOLAR - The solar thermal power plant simulator - version 0.2.1 */
/* https://github.com/bbopt/solar */
/* */
/* 2021-02-26 */
/* 2021-03-09 */
/* */
/* Miguel Diago, Sebastien Le Digabel, Mathieu Lemyre-Garneau, Bastien Talgorn */
/* */
Expand All @@ -26,7 +26,7 @@
#include "Evaluator.hpp"

// version:
const std::string VERSION = "0.2.2, 2021-02-26";
const std::string VERSION = "0.2.3, 2021-03-09";

// validation functions:
bool check ( bool fast );
Expand Down
2 changes: 1 addition & 1 deletion src/makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
EXE = ../bin/solar
COMPILATOR = g++
COMPILATOR_OPTIONS = -O2 -Wall -Wextra -pedantic -Wcast-align
COMPILATOR_OPTIONS = -O3 -Wall -Wextra -pedantic -Wcast-align
LIBS = -lc -lm
INCLUDE = -I.
COMPILE = $(COMPILATOR) $(COMPILATOR_OPTIONS) $(INCLUDE) -c
Expand Down

0 comments on commit 2e38320

Please sign in to comment.