Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor changes #1115

Merged
merged 4 commits into from
Sep 26, 2024
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
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
},
"java.format.settings.url": "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml",
"java.saveActions.organizeImports": true,
"java.checkstyle.version": "10.15.0",
"java.checkstyle.version": "10.18.1",
"java.checkstyle.configuration": "${workspaceFolder}/checkstyle_neqsim.xml",
"[xml]": {
"editor.tabSize": 4,
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"java.format.settings.url": "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml",
"java.saveActions.organizeImports": true,
"java.checkstyle.version": "10.15.0",
"java.checkstyle.version": "10.18.1",
"java.checkstyle.configuration": "${workspaceFolder}/checkstyle_neqsim.xml",
"java.debug.settings.hotCodeReplace": "never",
"[xml]": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1425,5 +1425,4 @@ public void setIsSetMaxOutletPressure(boolean isSetMaxOutletPressure) {
public double getActualCompressionRatio() {
return actualCompressionRatio;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public void readData() {
file.readLine();
}
do {
System.out.println("test");
String s = file.readLine();
tokenizer = new StringTokenizer(s);
tokenizer.nextToken();
Expand All @@ -78,7 +77,8 @@ public void readData() {
* Getter for the field <code>sampleObjectList</code>.
* </p>
*
* @return a {@link java.util.ArrayList} of {@link neqsim.statistics.experimentalSampleCreation.readDataFromFile.DataObject}
* @return a {@link java.util.ArrayList} of
* {@link neqsim.statistics.experimentalSampleCreation.readDataFromFile.DataObject}
*/
public ArrayList<DataObject> getSampleObjectList() {
return sampleObjectList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,15 @@ public class sysNewtonRhapsonPhaseEnvelope implements java.io.Serializable {
* Constructor for sysNewtonRhapsonPhaseEnvelope.
* </p>
*/
public sysNewtonRhapsonPhaseEnvelope() {
}
public sysNewtonRhapsonPhaseEnvelope() {}

/**
* <p>
* Constructor for sysNewtonRhapsonPhaseEnvelope.
* </p>
*
* @param system a {@link neqsim.thermo.system.SystemInterface}
* object
* @param numberOfPhases a int
* @param system a {@link neqsim.thermo.system.SystemInterface} object
* @param numberOfPhases a int
* @param numberOfComponents a int
*/
public sysNewtonRhapsonPhaseEnvelope(SystemInterface system, int numberOfPhases,
Expand Down Expand Up @@ -182,7 +180,8 @@ public void findSpecEq() {
int speceq2 = 0;

for (int i = 0; i < numberOfComponents + 2; i++) {
double testVal = Math.abs((Math.exp(u.get(i, 0)) - Math.exp(uold.get(i, 0))) / Math.exp(uold.get(i, 0)));
double testVal =
Math.abs((Math.exp(u.get(i, 0)) - Math.exp(uold.get(i, 0))) / Math.exp(uold.get(i, 0)));

// the most sensitive variable is calculated not by the difference,
// but from the sensibility vector in the original Michelsen code
Expand Down Expand Up @@ -266,8 +265,9 @@ public void setJac2() {
+ system.getPhase(1).getComponents()[i].getK() * dxidlnk[i];
}
for (int i = 0; i < numberOfComponents; i++) {
double dlnxdlnK = -1.0 / (1.0 + system.getBeta() * system.getPhase(0).getComponents()[i].getK()
- system.getBeta()) * system.getBeta() * system.getPhase(0).getComponents()[i].getK();
double dlnxdlnK =
-1.0 / (1.0 + system.getBeta() * system.getPhase(0).getComponents()[i].getK()
- system.getBeta()) * system.getBeta() * system.getPhase(0).getComponents()[i].getK();
double dlnydlnK = 1.0 - 1.0
/ (system.getPhase(0).getComponents()[i].getK() * system.getBeta() + 1 - system.getBeta())
* system.getBeta() * system.getPhase(0).getComponents()[i].getK();
Expand Down Expand Up @@ -645,7 +645,5 @@ public void solve(int np) {
init();

uold = u.copy();

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,9 @@ public void runProcessTEG() throws InterruptedException {
p.add(feedToAbsorber);

WaterDewPointAnalyser waterDewPointAnalyserToAbsorber =
new WaterDewPointAnalyser(feedToAbsorber);
new WaterDewPointAnalyser("water dew point gas to absorber", feedToAbsorber);
waterDewPointAnalyserToAbsorber.setMethod("multiphase");
waterDewPointAnalyserToAbsorber.setReferencePressure(85.0);
waterDewPointAnalyserToAbsorber.setName("water dew point gas to absorber");
p.add(waterDewPointAnalyserToAbsorber);

StreamInterface TEGFeed = new Stream("TEG feed", feedTEG);
Expand Down Expand Up @@ -144,9 +143,9 @@ public void runProcessTEG() throws InterruptedException {
new Stream("pipelineSetTP stream", pipelineSetTP.getOutStream());
p.add(pipelineSetTPStream);

WaterDewPointAnalyser waterDewPointAnalyser3 = new WaterDewPointAnalyser(dehydratedGasSetWater);
WaterDewPointAnalyser waterDewPointAnalyser3 =
new WaterDewPointAnalyser("water dew point analyser3", dehydratedGasSetWater);
waterDewPointAnalyser3.setReferencePressure(70.0);
waterDewPointAnalyser3.setName("water dew point analyser3");
p.add(waterDewPointAnalyser3);

StreamInterface dehydratedGas = new Stream("dry gas from absorber", absorber.getGasOutStream());
Expand All @@ -155,13 +154,12 @@ public void runProcessTEG() throws InterruptedException {
StreamInterface richTEG = new Stream("rich TEG from absorber", absorber.getLiquidOutStream());
p.add(richTEG);

WaterDewPointAnalyser waterDewPointAnalyser2 = new WaterDewPointAnalyser(dehydratedGas);
WaterDewPointAnalyser waterDewPointAnalyser2 =
new WaterDewPointAnalyser("water dew point analyser", dehydratedGas);
waterDewPointAnalyser2.setReferencePressure(70.0);
waterDewPointAnalyser2.setName("water dew point analyser");
p.add(waterDewPointAnalyser2);

ThrottlingValve glycol_flash_valve = new ThrottlingValve(richTEG);
glycol_flash_valve.setName("Rich TEG HP flash valve");
ThrottlingValve glycol_flash_valve = new ThrottlingValve("Rich TEG HP flash valve", richTEG);
glycol_flash_valve.setOutletPressure(4.8);
p.add(glycol_flash_valve);

Expand Down Expand Up @@ -210,8 +208,7 @@ public void runProcessTEG() throws InterruptedException {
strippingGas.setPressure(1.2, "bara");
p.add(strippingGas);

StreamInterface gasToReboiler = strippingGas.clone();
gasToReboiler.setName("gas to reboiler");
StreamInterface gasToReboiler = strippingGas.clone("gas to reboiler");
p.add(gasToReboiler);

DistillationColumn column = new DistillationColumn("TEG regeneration column", 1, true, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,5 @@ public void testProcess() {
assertEquals(15.0, gasMixer.getOutStream().getTemperature("C"), 0.01);
assertEquals(2278.2594247, exportgas.getFlowRate("Sm3/hr") / exportoil.getFlowRate("idSm3/hr"),
0.01);

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ public void runProcess2() throws InterruptedException {
* inlet_stream_test_sep.setFlowRate(472.5621656362427, "kg/hr"); inlet_stream_test_sep.run();
*
* neqsim.processSimulation.processEquipment.separator.ThreePhaseSeparator test_separator = new
* neqsim.processSimulation.processEquipment.separator.ThreePhaseSeparator(
* inlet_stream_test_sep); test_separator.setName("TEST_SEPARATOR"); test_separator.run();
* neqsim.processSimulation.processEquipment.separator.ThreePhaseSeparator("TEST_SEPARATOR",
* inlet_stream_test_sep); test_separator.run();
*
* neqsim.processSimulation.processEquipment.heatExchanger.Heater heater_TP_setter_test_stream =
* new neqsim.processSimulation.processEquipment.heatExchanger.Heater(
Expand All @@ -235,8 +235,7 @@ public void runProcess2() throws InterruptedException {
* heater_TP_setter_test_stream.run();
*
* neqsim.processSimulation.processEquipment.mixer.StaticMixer mixing_degasser = new
* neqsim.processSimulation.processEquipment.mixer.StaticMixer();
* mixing_degasser.setName("MIXING_BEFORE_THE_DEGASSER");
* neqsim.processSimulation.processEquipment.mixer.StaticMixer(MIXING_BEFORE_THE_DEGASSER);
* mixing_degasser.addStream(heater_TP_setter_main_stream.getOutStream());
* mixing_degasser.addStream(heater_TP_setter_test_stream.getOutStream());
* mixing_degasser.run();
Expand Down
Loading