Skip to content

Commit ecbc931

Browse files
James CraigJames Craig
authored andcommitted
v484 - added additional units conversions (M. Chernos)
1 parent 6580f1b commit ecbc931

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/DemandExpressionHandling.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,10 @@ bool CDemandOptimizer::ConvertToExpressionTerm(const string s, expressionTerm* t
690690
if (units == "CMS_TO_ACREFTD") {term->value=ACREFTD_PER_CMS; found=true;}
691691
if (units == "INCHES_TO_MM" ) {term->value=MM_PER_INCH; found=true;}
692692
if (units == "MM_TO_INCHES" ) {term->value=1.0/MM_PER_INCH; found=true;}
693+
if (units == "FEET_TO_METER" ) {term->value=1.0/FEET_PER_METER; found=true;}
694+
if (units == "METER_TO_FEET" ) {term->value=FEET_PER_METER; found=true;}
695+
if (units == "CMS_TO_CFS" ) {term->value=1.0/CFS_PER_CMS; found=true;}
696+
if (units == "CFS_TO_CMS" ) {term->value=CFS_PER_CMS; found=true;}
693697
term->nested_exp1 =x_in;
694698
term->type =TERM_CONVERT;
695699
if (!found) {

src/RavenInclude.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ const double MJ_PER_M2_LANGLEY =0.04184;
148148
const double INCH_PER_METER =39.37; ///< [m] to [in]
149149
const double FEET_PER_METER =3.28; ///< [m] to [ft]
150150
const double ACREFTD_PER_CMS =70.0456; ///< [acre-ft/d] to [m3/s]
151+
const double CFS_PER_CMS =0.0283168; ///< [ft3/s] to [m3/s]
151152
const double CDM_PER_DAY_PER_CMS =86.4; ///< [cdm/day] to [m3/s]
152153
const double MPH_PER_KPH =1.609; ///< [kph] to [mph]
153154
const double MPH_PER_MPS =2.237; ///< [m/s] to [mph]

0 commit comments

Comments
 (0)