Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit a2a0d24

Browse files
authored
Merge pull request #682 from ORNL-AMO/develop
dev into master
2 parents 6c5d0ec + 2612c45 commit a2a0d24

31 files changed

+7397
-1822
lines changed

Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = AMO-Tools-Suite
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = v.1.0.1
41+
PROJECT_NUMBER = v.1.0.3
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

bin/amo_tools_suite.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bin/amo_tools_suite.wasm

1.6 KB
Binary file not shown.

bin/client.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bin/client.wasm

2.39 KB
Binary file not shown.

bindings-wasm/calculator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ EMSCRIPTEN_BINDINGS(insulatedPipeCalculator_class)
241241
EMSCRIPTEN_BINDINGS(insulatedTankCalculator_class)
242242
{
243243
class_<InsulatedTankInput>("InsulatedTankInput")
244-
.constructor<int, double, double, double, double, double, double, double, double, double, double, double>();
244+
.constructor<int, double, double, double, double, double, double, double, double, double, double, double, double>();
245245

246246
class_<InsulatedTankOutput>("InsulatedTankOutput")
247247
.function("getHeatLoss", &InsulatedTankOutput::getHeatLoss)

bindings-wasm/psat/psat.cpp

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ EMSCRIPTEN_BINDINGS(pumpData_class)
2424
std::string,
2525
std::string,
2626
std::string,
27-
std::string,
28-
std::string,
27+
std::string,
28+
std::string,
2929
std::string,
3030
std::string,
3131
std::string,
@@ -59,10 +59,10 @@ EMSCRIPTEN_BINDINGS(pumpData_class)
5959
double,
6060
double,
6161
double,
62-
bool,
63-
bool>()
62+
double,
63+
double,
64+
double>()
6465
.function("getId", &PumpData::getId)
65-
.function("getOutOfService", &PumpData::getOutOfService)
6666
.function("getInletDiameter", &PumpData::getInletDiameter)
6767
.function("getOutletDiameter", &PumpData::getOutletDiameter)
6868
.function("getStaticSuctionHead", &PumpData::getStaticSuctionHead)
@@ -86,8 +86,6 @@ EMSCRIPTEN_BINDINGS(pumpData_class)
8686
.function("getSerialNumber", &PumpData::getSerialNumber)
8787
.function("getStatus", &PumpData::getStatus)
8888
.function("getPumpType", &PumpData::getPumpType)
89-
.function("getRadialBearingType", &PumpData::getRadialBearingType)
90-
.function("getThrustBearingType", &PumpData::getThrustBearingType)
9189
.function("getShaftOrientation", &PumpData::getShaftOrientation)
9290
.function("getShaftSealType", &PumpData::getShaftSealType)
9391
.function("getFluidType", &PumpData::getFluidType)
@@ -98,20 +96,23 @@ EMSCRIPTEN_BINDINGS(pumpData_class)
9896
.function("getMotorFullLoadAmps", &PumpData::getMotorFullLoadAmps)
9997
.function("getOperatingFlowRate", &PumpData::getOperatingFlowRate)
10098
.function("getOperatingHead", &PumpData::getOperatingHead)
99+
.function("getMeasuredCurrent", &PumpData::getMeasuredCurrent)
100+
.function("getMeasuredPower", &PumpData::getMeasuredPower)
101+
.function("getMeasuredVoltage", &PumpData::getMeasuredVoltage)
101102
.function("getMotorEfficiency", &PumpData::getMotorEfficiency)
102-
.function("getSpare", &PumpData::getSpare)
103103
.function("getDriveType", &PumpData::getDriveType)
104104
.function("getFlangeConnectionClass", &PumpData::getFlangeConnectionClass)
105105
.function("getFlangeConnectionSize", &PumpData::getFlangeConnectionSize)
106106
.function("getManufacturer", &PumpData::getManufacturer)
107107
.function("getComponentId", &PumpData::getComponentId)
108+
.function("getSystem", &PumpData::getSystem)
109+
.function("getLocation", &PumpData::getLocation)
108110
.function("getMotorEfficiencyClass", &PumpData::getMotorEfficiencyClass)
109111
.function("getModel", &PumpData::getModel)
110112
.function("getPriority", &PumpData::getPriority)
111113
.function("getFinalMotorRpm", &PumpData::getFinalMotorRpm)
112114
.function("getMotorRatedVoltage", &PumpData::getMotorRatedVoltage)
113115
.function("setId", &PumpData::setId)
114-
.function("setOutOfService", &PumpData::setOutOfService)
115116
.function("setInletDiameter", &PumpData::setInletDiameter)
116117
.function("setOutletDiameter", &PumpData::setOutletDiameter)
117118
.function("setStaticSuctionHead", &PumpData::setStaticSuctionHead)
@@ -134,8 +135,6 @@ EMSCRIPTEN_BINDINGS(pumpData_class)
134135
.function("setSerialNumber", &PumpData::setSerialNumber)
135136
.function("setStatus", &PumpData::setStatus)
136137
.function("setPumpType", &PumpData::setPumpType)
137-
.function("setRadialBearingType", &PumpData::setRadialBearingType)
138-
.function("setThrustBearingType", &PumpData::setThrustBearingType)
139138
.function("setShaftOrientation", &PumpData::setShaftOrientation)
140139
.function("setShaftSealType", &PumpData::setShaftSealType)
141140
.function("setFluidType", &PumpData::setFluidType)
@@ -149,14 +148,16 @@ EMSCRIPTEN_BINDINGS(pumpData_class)
149148
.function("setPriority", &PumpData::setPriority)
150149
.function("setFinalMotorRpm", &PumpData::setFinalMotorRpm)
151150
.function("setMotorRatedVoltage", &PumpData::setMotorRatedVoltage)
152-
.function("setSpare", &PumpData::setSpare)
153151
.function("setDesignHead", &PumpData::setDesignHead)
154152
.function("setDesignFlow", &PumpData::setDesignFlow)
155153
.function("setDesignEfficiency", &PumpData::setDesignEfficiency)
156154
.function("setMotorRatedPower", &PumpData::setMotorRatedPower)
157155
.function("setMotorFullLoadAmps", &PumpData::setMotorFullLoadAmps)
158156
.function("setOperatingFlowRate", &PumpData::setOperatingFlowRate)
159157
.function("setOperatingHead", &PumpData::setOperatingHead)
158+
.function("setMeasuredCurrent", &PumpData::setMeasuredCurrent)
159+
.function("setMeasuredPower", &PumpData::setMeasuredPower)
160+
.function("setMeasuredVoltage", &PumpData::setMeasuredVoltage)
160161
.function("setMotorEfficiency", &PumpData::setMotorEfficiency);
161162

162163
register_vector<PumpData>("PumpDataV");

bindings/calculator.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,6 +995,7 @@ NAN_METHOD(tankInsulationReduction)
995995
double insulationThickness = GetDouble("insulationThickness", inp);
996996
double insulationConductivity = GetDouble("insulationConductivity", inp);
997997
double jacketEmissivity = GetDouble("jacketEmissivity", inp);
998+
double surfaceTemperature = GetDouble("surfaceTemperature", inp);
998999

9991000
InsulatedTankInput input(
10001001
operatingHours,
@@ -1008,7 +1009,8 @@ NAN_METHOD(tankInsulationReduction)
10081009
systemEfficiency,
10091010
insulationThickness,
10101011
insulationConductivity,
1011-
jacketEmissivity);
1012+
jacketEmissivity,
1013+
surfaceTemperature);
10121014
InsulatedTankCalculator calculator(input);
10131015
InsulatedTankOutput output = calculator.calculate();
10141016

bindings/db.h

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,6 @@ void SetPumpData(Local<Object> &obj, const PumpData &pump)
120120
SetObj(obj, "serialNumber", pump.getSerialNumber());
121121
SetObj(obj, "status", pump.getStatus());
122122
SetObj(obj, "pumpType", pump.getPumpType());
123-
SetObj(obj, "radialBearingType", pump.getRadialBearingType());
124-
SetObj(obj, "thrustBearingType", pump.getThrustBearingType());
125123
SetObj(obj, "shaftOrientation", pump.getShaftOrientation());
126124
SetObj(obj, "shaftSealType", pump.getShaftSealType());
127125
SetObj(obj, "fluidType", pump.getFluidType());
@@ -130,6 +128,8 @@ void SetPumpData(Local<Object> &obj, const PumpData &pump)
130128
SetObj(obj, "flangeConnectionClass", pump.getFlangeConnectionClass());
131129
SetObj(obj, "flangeConnectionSize", pump.getFlangeConnectionSize());
132130
SetObj(obj, "componentId", pump.getComponentId());
131+
SetObj(obj, "system", pump.getSystem());
132+
SetObj(obj, "location", pump.getLocation());
133133
SetObj(obj, "motorEfficiencyClass", pump.getMotorEfficiencyClass());
134134
SetObj(obj, "speed", pump.getSpeed());
135135
SetObj(obj, "numStages", pump.getNumStages());
@@ -160,9 +160,10 @@ void SetPumpData(Local<Object> &obj, const PumpData &pump)
160160
SetObj(obj, "motorFullLoadAmps", pump.getMotorFullLoadAmps());
161161
SetObj(obj, "operatingFlowRate", pump.getOperatingFlowRate());
162162
SetObj(obj, "operatingHead", pump.getOperatingHead());
163+
SetObj(obj, "measuredCurrent", pump.getMeasuredCurrent());
164+
SetObj(obj, "measuredPower", pump.getMeasuredPower());
165+
SetObj(obj, "measuredVoltage", pump.getMeasuredVoltage());
163166
SetObj(obj, "motorEfficiency", pump.getMotorEfficiency());
164-
SetObj(obj, "outOfService", pump.getOutOfService());
165-
SetObj(obj, "spare", pump.getSpare());
166167
}
167168

168169
// when creating sqlite, add table that has history, put in tools-suite number and the date so that we know where db's came from
@@ -1075,10 +1076,13 @@ NAN_METHOD(insertPump)
10751076

10761077
PumpData pump(
10771078
GetStr("manufacturer"), GetStr("model"), GetStr("serialNumber"), GetStr("status"),
1078-
GetStr("pumpType"), GetStr("radialBearingType"), GetStr("thrustBearingType"), GetStr("shaftOrientation"),
1079+
GetStr("pumpType"), GetStr("shaftOrientation"),
10791080
GetStr("shaftSealType"), GetStr("fluidType"), GetStr("priority"), GetStr("driveType"),
10801081
GetStr("flangeConnectionClass"), GetStr("flangeConnectionSize"),
1081-
GetStr("componentId"), GetStr("motorEfficiencyClass"),
1082+
GetStr("componentId"),
1083+
GetStr("system"),
1084+
GetStr("location"),
1085+
GetStr("motorEfficiencyClass"),
10821086
Get("speed"),
10831087
Get("numStages"), Get("yearlyOperatingHours"), Get("yearInstalled"),
10841088
Get("finalMotorRpm"),
@@ -1096,9 +1100,10 @@ NAN_METHOD(insertPump)
10961100
Get("motorFullLoadAmps"),
10971101
Get("operatingFlowRate"),
10981102
Get("operatingHead"),
1099-
Get("motorEfficiency"),
1100-
Get("outOfService"),
1101-
Get("spare")
1103+
Get("measuredCurrent"),
1104+
Get("measuredPower"),
1105+
Get("measuredVoltage"),
1106+
Get("motorEfficiency")
11021107
);
11031108
bool success = sql->insertPumpData(pump);
11041109
info.GetReturnValue().Set(success);
@@ -1118,10 +1123,13 @@ NAN_METHOD(updatePump)
11181123

11191124
PumpData pump(
11201125
GetStr("manufacturer"), GetStr("model"), GetStr("serialNumber"), GetStr("status"),
1121-
GetStr("pumpType"), GetStr("radialBearingType"), GetStr("thrustBearingType"),
1126+
GetStr("pumpType"),
11221127
GetStr("shaftOrientation"), GetStr("shaftSealType"), GetStr("fluidType"), GetStr("priority"),
11231128
GetStr("driveType"), GetStr("flangeConnectionClass"), GetStr("flangeConnectionSize"),
1124-
GetStr("componentId"), GetStr("motorEfficiencyClass"),
1129+
GetStr("componentId"),
1130+
GetStr("system"),
1131+
GetStr("location"),
1132+
GetStr("motorEfficiencyClass"),
11251133
Get("speed"), Get("numStages"), Get("yearlyOperatingHours"), Get("yearInstalled"), Get("finalMotorRpm"),
11261134
Get("motorRatedVoltage"),
11271135
Get("inletDiameter"), Get("outletDiameter"),
@@ -1137,9 +1145,11 @@ NAN_METHOD(updatePump)
11371145
Get("motorFullLoadAmps"),
11381146
Get("operatingFlowRate"),
11391147
Get("operatingHead"),
1140-
Get("motorEfficiency"),
1141-
Get("outOfService"),
1142-
Get("spare"));
1148+
Get("measuredCurrent"),
1149+
Get("measuredPower"),
1150+
Get("measuredVoltage"),
1151+
Get("motorEfficiency")
1152+
);
11431153

11441154
pump.setId(Get("id"));
11451155
bool success = sql->updatePumpData(pump);

include/calculator/pump/PumpData.h

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ class PumpData {
1515
std::string serialNumber,
1616
std::string status,
1717
std::string pumpType,
18-
std::string radialBearingType,
19-
std::string thrustBearingType,
2018
std::string shaftOrientation,
2119
std::string shaftSealType,
2220
std::string fluidType,
@@ -25,6 +23,8 @@ class PumpData {
2523
std::string flangeConnectionClass,
2624
std::string flangeConnectionSize,
2725
std::string componentId,
26+
std::string system,
27+
std::string location,
2828
std::string motorEfficiencyClass,
2929
int speed,
3030
int numStages,
@@ -55,14 +55,11 @@ class PumpData {
5555
double motorFullLoadAmps,
5656
double operatingFlowRate,
5757
double operatingHead,
58-
double motorEfficiency,
59-
bool outOfService,
60-
bool spare
61-
);
58+
double measuredCurrent,
59+
double measuredPower,
60+
double measuredVoltage,
61+
double motorEfficiency);
6262

63-
bool getOutOfService() const;
64-
65-
void setOutOfService(const bool &outOfService);
6663

6764
double getInletDiameter() const;
6865

@@ -156,17 +153,17 @@ class PumpData {
156153

157154
void setPumpType(const std::string &pumpType);
158155

159-
std::string getRadialBearingType() const;
156+
std::string getShaftOrientation() const;
160157

161-
void setRadialBearingType(const std::string &radialBearingType);
158+
void setShaftOrientation(const std::string &shaftOrientation);
162159

163-
std::string getThrustBearingType() const;
160+
std::string getSystem() const;
164161

165-
void setThrustBearingType(const std::string &thrustBearingType);
162+
void setSystem(const std::string &system);
166163

167-
std::string getShaftOrientation() const;
164+
std::string getLocation() const;
168165

169-
void setShaftOrientation(const std::string &shaftOrientation);
166+
void setLocation(const std::string &location);
170167

171168
std::string getShaftSealType() const;
172169

@@ -232,7 +229,19 @@ class PumpData {
232229

233230
void setOperatingHead(const double &operatingHead);
234231

235-
double getMotorEfficiency() const;
232+
const double getMeasuredCurrent() const;
233+
234+
void setMeasuredCurrent(const double &measuredCurrent);
235+
236+
const double getMeasuredPower() const;
237+
238+
void setMeasuredPower(const double &measuredPower);
239+
240+
const double getMeasuredVoltage() const;
241+
242+
void setMeasuredVoltage(const double &measuredVoltage);
243+
244+
const double getMotorEfficiency() const;
236245

237246
void setMotorEfficiency(const double &motorEfficiency);
238247

@@ -248,32 +257,22 @@ class PumpData {
248257

249258
void setMotorRatedVoltage(const int &motorRatedVoltage);
250259

251-
bool getSpare() const;
252-
253-
void setSpare(const bool &spare);
254-
255-
256-
bool isOutOfService() const;
257-
258260
int getId() const;
259261

260262
void setId(int id);
261263

262264

263265
private:
264-
std::string manufacturer, model, serialNumber, status, pumpType, radialBearingType, thrustBearingType;
266+
std::string manufacturer, model, serialNumber, status, pumpType;
265267
std::string shaftOrientation, shaftSealType, fluidType, priority, driveType, flangeConnectionClass;
266-
std::string flangeConnectionSize, componentId, motorEfficiencyClass;
268+
std::string flangeConnectionSize, componentId, system, location, motorEfficiencyClass;
267269

268270
int speed, numStages, yearlyOperatingHours, yearInstalled, finalMotorRpm, motorRatedVoltage;
269271

270-
double inletDiameter, outletDiameter;
272+
double inletDiameter, outletDiameter, designHead, designFlow, designEfficiency, motorRatedPower, motorFullLoadAmps, operatingFlowRate, operatingHead, measuredCurrent, measuredPower, measuredVoltage, motorEfficiency;
271273
double staticSuctionHead, staticDischargeHead, fluidDensity, maxWorkingPressure;
272274
double maxAmbientTemperature, maxSuctionLift, displacement, startingTorque, ratedSpeed, impellerDiameter;
273275
double efficiency, lineFrequency, minFlowSize, pumpSize;
274-
double designHead, designFlow, designEfficiency, motorRatedPower, motorFullLoadAmps, operatingFlowRate, operatingHead, motorEfficiency;
275-
276-
bool outOfService, spare;
277276

278277
int id; // used for the database
279278

0 commit comments

Comments
 (0)