Skip to content

Commit

Permalink
refact: rename packages
Browse files Browse the repository at this point in the history
  • Loading branch information
asmfstatoil committed Oct 16, 2024
1 parent 4efcea6 commit 93e315c
Show file tree
Hide file tree
Showing 36 changed files with 267 additions and 248 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,17 @@ NeqSim is built upon six base modules:
>neqsim/thermo/: Main path for thermodynamic routines
>neqsim/thermo/util/examples/: examples of use of Thermodynamic Models and Routines
>
>neqsim/thermodynamicOperation: Main path for flash routines (TPflash, phase envelopes, etc.)
>neqsim/thermodynamicOperation/util/example/: examples of use of thermodynamic operations (eg. flash calculations etc.)
>neqsim/thermodynamicoperation: Main path for flash routines (TPflash, phase envelopes, etc.)
>neqsim/thermodynamicoperation/util/example/: examples of use of thermodynamic operations (eg. flash calculations etc.)
>
>neqsim/physicalProperties: Main path for Physical Property methods
>neqsim/physicalProperties/util/examples/: Examples of use of physical properties calculations
>neqsim/physicalproperties: Main path for Physical Property methods
>neqsim/physicalproperties/util/examples/: Examples of use of physical properties calculations
>
>neqsim/physicalProperties: Main path for Physical Property methods
>neqsim/physicalProperties/util/examples/: Examples of use of physical properties calculations
>neqsim/physicalproperties: Main path for Physical Property methods
>neqsim/physicalproperties/util/examples/: Examples of use of physical properties calculations
>
>neqsim/processSimulation: Main path for Process Simulation Calculations
>neqsim/processSimulation/util/examples/: Examples of use of Process Simulation calculations
>neqsim/processsimulation: Main path for Process Simulation Calculations
>neqsim/processsimulation/util/examples/: Examples of use of Process Simulation calculations
>
>changelog.txt : History of what changed between each version.
>license.txt: license document
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,9 @@
<version>0.8.12</version>
<configuration>
<excludes>
<exclude>neqsim/physicalProperties/util/parameterFitting/**/*</exclude>
<exclude>neqsim/statistics/util/parameterFitting/**/*</exclude>
<exclude>neqsim/PVTsimulation/util/parameterfitting/**/*</exclude>
<exclude>neqsim/physicalproperties/util/parameterfitting/**/*</exclude>
<exclude>neqsim/statistics/util/parameterfitting/**/*</exclude>
<exclude>neqsim/pvtsimulation/util/parameterfitting/**/*</exclude>
</excludes>
</configuration>
<executions>
Expand Down
6 changes: 3 additions & 3 deletions pomJava21.xml
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,9 @@
<version>0.8.12</version>
<configuration>
<excludes>
<exclude>neqsim/physicalProperties/util/parameterFitting/**/*</exclude>
<exclude>neqsim/statistics/util/parameterFitting/**/*</exclude>
<exclude>neqsim/PVTsimulation/util/parameterfitting/**/*</exclude>
<exclude>neqsim/physicalproperties/util/parameterfitting/**/*</exclude>
<exclude>neqsim/statistics/util/parameterfitting/**/*</exclude>
<exclude>neqsim/pvtsimulation/util/parameterfitting/**/*</exclude>
</excludes>
</configuration>
<executions>
Expand Down
6 changes: 3 additions & 3 deletions pomJava8.xml
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@
<version>0.8.12</version>
<configuration>
<excludes>
<exclude>neqsim/physicalProperties/util/parameterFitting/**/*</exclude>
<exclude>neqsim/statistics/util/parameterFitting/**/*</exclude>
<exclude>neqsim/PVTsimulation/util/parameterfitting/**/*</exclude>
<exclude>neqsim/physicalproperties/util/parameterfitting/**/*</exclude>
<exclude>neqsim/statistics/util/parameterfitting/**/*</exclude>
<exclude>neqsim/pvtsimulation/util/parameterfitting/**/*</exclude>
</excludes>
</configuration>
<executions>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package neqsim.fluidmechanics.flownode.fluidboundary.interphasetransportcoefficient.interphasetwophase.interphaseReactorFlow;
package neqsim.fluidmechanics.flownode.fluidboundary.interphasetransportcoefficient.interphasetwophase.interphasereactorflow;

import neqsim.fluidmechanics.flownode.FlowNodeInterface;

Expand All @@ -19,7 +19,8 @@ public class InterphasePackedBed extends InterphaseReactorFlow
* Constructor for InterphasePackedBed.
* </p>
*/
public InterphasePackedBed() {}
public InterphasePackedBed() {
}

/**
* <p>
Expand Down Expand Up @@ -77,21 +78,19 @@ public double calcInterphaseMassTransferCoefficient(int phase, double schmidtNum
double massTrans = 0;
if (phase == 1) {
// massTrans = 0.0002;
redMassTrans =
0.0051 * Math.pow(node.getReynoldsNumber(phase), 0.67) * Math.pow(schmidtNumber, -0.5)
* Math.pow(node.getGeometry().getPacking().getSurfaceAreaPrVolume()
* node.getGeometry().getPacking().getSize(), 0.4);
redMassTrans = 0.0051 * Math.pow(node.getReynoldsNumber(phase), 0.67) * Math.pow(schmidtNumber, -0.5)
* Math.pow(node.getGeometry().getPacking().getSurfaceAreaPrVolume()
* node.getGeometry().getPacking().getSize(), 0.4);
massTrans = redMassTrans * Math.pow(
node.getBulkSystem().getPhases()[phase].getPhysicalProperties().getKinematicViscosity()
* gravity,
1.0 / 3.0);
System.out.println("mas trans liq " + massTrans);
}
if (phase == 0) {
redMassTrans =
3.6 * Math.pow(node.getReynoldsNumber(phase), 0.7) * Math.pow(schmidtNumber, 0.33)
* Math.pow(node.getGeometry().getPacking().getSurfaceAreaPrVolume()
* node.getGeometry().getPacking().getSize(), -2.0);
redMassTrans = 3.6 * Math.pow(node.getReynoldsNumber(phase), 0.7) * Math.pow(schmidtNumber, 0.33)
* Math.pow(node.getGeometry().getPacking().getSurfaceAreaPrVolume()
* node.getGeometry().getPacking().getSize(), -2.0);
massTrans = redMassTrans * node.getGeometry().getPacking().getSurfaceAreaPrVolume()
* node.getBulkSystem().getPhases()[phase].getPhysicalProperties().getKinematicViscosity()
/ schmidtNumber;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package neqsim.fluidmechanics.flownode.fluidboundary.interphasetransportcoefficient.interphasetwophase.interphaseReactorFlow;
package neqsim.fluidmechanics.flownode.fluidboundary.interphasetransportcoefficient.interphasetwophase.interphasereactorflow;

import neqsim.fluidmechanics.flownode.FlowNodeInterface;
import neqsim.fluidmechanics.flownode.fluidboundary.interphasetransportcoefficient.interphasetwophase.InterphaseTwoPhase;
Expand All @@ -17,7 +17,8 @@ public class InterphaseReactorFlow extends InterphaseTwoPhase {
* Constructor for InterphaseReactorFlow.
* </p>
*/
public InterphaseReactorFlow() {}
public InterphaseReactorFlow() {
}

/**
* <p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package neqsim.fluidmechanics.flownode.twophasenode.twophasereactorflownode;

import neqsim.fluidmechanics.flownode.FlowNodeInterface;
import neqsim.fluidmechanics.flownode.fluidboundary.interphasetransportcoefficient.interphasetwophase.interphaseReactorFlow.InterphasePackedBed;
import neqsim.fluidmechanics.flownode.fluidboundary.interphasetransportcoefficient.interphasetwophase.interphasereactorflow.InterphasePackedBed;
import neqsim.fluidmechanics.flownode.twophasenode.TwoPhaseFlowNode;
import neqsim.fluidmechanics.geometrydefinitions.GeometryDefinitionInterface;
import neqsim.fluidmechanics.geometrydefinitions.reactor.ReactorData;
Expand Down Expand Up @@ -35,36 +35,36 @@ public TwoPhasePackedBedFlowNode() {
* </p>
*
* @param system a {@link neqsim.thermo.system.SystemInterface} object
* @param pipe a {@link neqsim.fluidmechanics.geometrydefinitions.GeometryDefinitionInterface}
* object
* @param pipe a
* {@link neqsim.fluidmechanics.geometrydefinitions.GeometryDefinitionInterface}
* object
*/
public TwoPhasePackedBedFlowNode(SystemInterface system, GeometryDefinitionInterface pipe) {
super(system, pipe);
this.flowNodeType = "packed bed";
this.interphaseTransportCoefficient = new InterphasePackedBed(this);
this.fluidBoundary =
new neqsim.fluidmechanics.flownode.fluidboundary.heatmasstransfercalc.nonequilibriumfluidboundary.filmmodelboundary.KrishnaStandartFilmModel(
this);
this.fluidBoundary = new neqsim.fluidmechanics.flownode.fluidboundary.heatmasstransfercalc.nonequilibriumfluidboundary.filmmodelboundary.KrishnaStandartFilmModel(
this);
}

/**
* <p>
* Constructor for TwoPhasePackedBedFlowNode.
* </p>
*
* @param system a {@link neqsim.thermo.system.SystemInterface} object
* @param system a {@link neqsim.thermo.system.SystemInterface} object
* @param interphaseSystem a {@link neqsim.thermo.system.SystemInterface} object
* @param pipe a {@link neqsim.fluidmechanics.geometrydefinitions.GeometryDefinitionInterface}
* object
* @param pipe a
* {@link neqsim.fluidmechanics.geometrydefinitions.GeometryDefinitionInterface}
* object
*/
public TwoPhasePackedBedFlowNode(SystemInterface system, SystemInterface interphaseSystem,
GeometryDefinitionInterface pipe) {
super(system, pipe);
this.flowNodeType = "packed bed";
this.interphaseTransportCoefficient = new InterphasePackedBed(this);
this.fluidBoundary =
new neqsim.fluidmechanics.flownode.fluidboundary.heatmasstransfercalc.nonequilibriumfluidboundary.filmmodelboundary.KrishnaStandartFilmModel(
this);
this.fluidBoundary = new neqsim.fluidmechanics.flownode.fluidboundary.heatmasstransfercalc.nonequilibriumfluidboundary.filmmodelboundary.KrishnaStandartFilmModel(
this);
}

/** {@inheritDoc} */
Expand Down Expand Up @@ -106,14 +106,12 @@ public double calcHydraulicDiameter() {
/** {@inheritDoc} */
@Override
public double calcReynoldNumber() {
reynoldsNumber[1] =
getSuperficialVelocity(1) / getGeometry().getPacking().getSurfaceAreaPrVolume()
* bulkSystem.getPhases()[1].getPhysicalProperties().getDensity()
/ bulkSystem.getPhases()[1].getPhysicalProperties().getViscosity();
reynoldsNumber[0] =
getSuperficialVelocity(0) / getGeometry().getPacking().getSurfaceAreaPrVolume()
* bulkSystem.getPhases()[0].getPhysicalProperties().getDensity()
/ bulkSystem.getPhases()[0].getPhysicalProperties().getViscosity();
reynoldsNumber[1] = getSuperficialVelocity(1) / getGeometry().getPacking().getSurfaceAreaPrVolume()
* bulkSystem.getPhases()[1].getPhysicalProperties().getDensity()
/ bulkSystem.getPhases()[1].getPhysicalProperties().getViscosity();
reynoldsNumber[0] = getSuperficialVelocity(0) / getGeometry().getPacking().getSurfaceAreaPrVolume()
* bulkSystem.getPhases()[0].getPhysicalProperties().getDensity()
/ bulkSystem.getPhases()[0].getPhysicalProperties().getViscosity();
System.out.println("rey liq " + reynoldsNumber[1]);
System.out.println("rey gas " + reynoldsNumber[0]);
return reynoldsNumber[1];
Expand All @@ -122,8 +120,7 @@ public double calcReynoldNumber() {
/** {@inheritDoc} */
@Override
public double calcContactLength() {
interphaseContactArea =
pipe.getPacking().getSurfaceAreaPrVolume() * getLengthOfNode() * pipe.getArea();
interphaseContactArea = pipe.getPacking().getSurfaceAreaPrVolume() * getLengthOfNode() * pipe.getArea();
return wallContactLength[0];
}

Expand Down Expand Up @@ -152,8 +149,8 @@ public void update() {
for (int componentNumber = 0; componentNumber < getBulkSystem().getPhases()[0]
.getNumberOfComponents(); componentNumber++) {
if (componentNumber == 1) {
double liquidMolarRate =
getFluidBoundary().getInterphaseMolarFlux(componentNumber) * getInterphaseContactArea(); // getInterphaseContactLength(0)*getGeometry().getNodeLength();
double liquidMolarRate = getFluidBoundary().getInterphaseMolarFlux(componentNumber)
* getInterphaseContactArea(); // getInterphaseContactLength(0)*getGeometry().getNodeLength();
double gasMolarRate = -getFluidBoundary().getInterphaseMolarFlux(componentNumber)
* getInterphaseContactArea(); // getInterphaseContactLength(0)*getGeometry().getNodeLength();
System.out.println("liquidMolarRate" + liquidMolarRate);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package neqsim.physicalproperties.util.parameterFitting.pureComponentParameterFitting.purecompinterfacetension;
package neqsim.physicalproperties.util.parameterfitting.purecomponentparameterfitting.purecompinterfacetension;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package neqsim.physicalproperties.util.parameterFitting.pureComponentParameterFitting.purecompinterfacetension;
package neqsim.physicalproperties.util.parameterfitting.purecomponentparameterfitting.purecompinterfacetension;

import java.sql.ResultSet;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package neqsim.physicalproperties.util.parameterFitting.pureComponentParameterFitting.purecompviscosity.chungMethod;
package neqsim.physicalproperties.util.parameterfitting.purecomponentparameterfitting.purecompviscosity.chungMethod;

import neqsim.statistics.parameterfitting.nonlinearparameterfitting.LevenbergMarquardtFunction;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package neqsim.physicalproperties.util.parameterFitting.pureComponentParameterFitting.purecompviscosity.chungMethod;
package neqsim.physicalproperties.util.parameterfitting.purecomponentparameterfitting.purecompviscosity.chungMethod;

import java.sql.ResultSet;
import java.util.ArrayList;
Expand Down Expand Up @@ -37,11 +37,11 @@ public static void main(String[] args) {

try (NeqSimDataBase database = new NeqSimDataBase();
ResultSet dataSet = database.getResultSet("SELECT * FROM purecomponentviscosity") // WHERE
// ComponentName='MDEA*'");
// ComponentName='MDEA*'");
) {
while (dataSet.next()) {
ChungFunction function = new ChungFunction();
double guess[] = {0.3211};
double guess[] = { 0.3211 };
function.setInitialGuess(guess);

SystemInterface testSystem = new SystemSrkEos(280, 0.001);
Expand All @@ -50,8 +50,8 @@ public static void main(String[] args) {
testSystem.createDatabase(true);
testSystem.init(0);
testSystem.setMixingRule(2);
double sample1[] = {Double.parseDouble(dataSet.getString("Temperature"))};
double standardDeviation1[] = {0.1};
double sample1[] = { Double.parseDouble(dataSet.getString("Temperature")) };
double standardDeviation1[] = { 0.1 };
SampleValue sample = new SampleValue(Double.parseDouble(dataSet.getString("Viscosity")),
0.001, sample1, standardDeviation1);
sample.setFunction(function);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package neqsim.physicalproperties.util.parameterFitting.pureComponentParameterFitting.purecompviscosity.linearLiquidModel;
package neqsim.physicalproperties.util.parameterfitting.purecomponentparameterfitting.purecompviscosity.linearliquidmodel;

import java.sql.ResultSet;
import java.util.ArrayList;
Expand Down Expand Up @@ -42,7 +42,7 @@ public static void main(String[] args) {
ViscosityFunction function = new ViscosityFunction();
// double guess[] = {-66.2, 11810, 0.1331, -0.0000983}; //mdea
// double guess[] = {-5.771E1, 7.647E3, 1.442E-1, -1.357E-4}; //water
double guess[] = {-10.14, 3868.803, -0.00550507}; // ,0.000001}; //,0.001}; //MEG
double guess[] = { -10.14, 3868.803, -0.00550507 }; // ,0.000001}; //,0.001}; //MEG
// double guess[] = { -53.92523097004079, 9741.992308,0,0.106066223998382};
// //TEG
function.setInitialGuess(guess);
Expand All @@ -55,8 +55,8 @@ public static void main(String[] args) {
double temp = Double.parseDouble(dataSet.getString("Temperature"));
testSystem.setTemperature(temp);
testSystem.init(0);
double sample1[] = {temp};
double standardDeviation1[] = {0.1};
double sample1[] = { temp };
double standardDeviation1[] = { 0.1 };
SampleValue sample = new SampleValue(Double.parseDouble(dataSet.getString("Viscosity")),
Double.parseDouble(dataSet.getString("StdDev")), sample1, standardDeviation1);
sample.setFunction(function);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Created on 24. januar 2001, 23:30
*/

package neqsim.physicalproperties.util.parameterFitting.pureComponentParameterFitting.purecompviscosity.linearLiquidModel;
package neqsim.physicalproperties.util.parameterfitting.purecomponentparameterfitting.purecompviscosity.linearliquidmodel;

import neqsim.statistics.parameterfitting.nonlinearparameterfitting.LevenbergMarquardtFunction;

Expand All @@ -22,7 +22,8 @@ public class ViscosityFunction extends LevenbergMarquardtFunction {
* Constructor for ViscosityFunction.
* </p>
*/
public ViscosityFunction() {}
public ViscosityFunction() {
}

/** {@inheritDoc} */
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import neqsim.processsimulation.processequipment.absorber.SimpleTEGAbsorber;
import neqsim.processsimulation.processequipment.separator.Separator;
import neqsim.processsimulation.processequipment.separator.SeparatorInterface;
import neqsim.processsimulation.processequipment.separator.sectionType.SeparatorSection;
import neqsim.processsimulation.processequipment.separator.sectiontype.SeparatorSection;

/**
* <p>
Expand All @@ -30,8 +30,9 @@ public class AbsorberMechanicalDesign extends SeparatorMechanicalDesign {
* Constructor for AbsorberMechanicalDesign.
* </p>
*
* @param equipment a {@link neqsim.processsimulation.processequipment.ProcessEquipmentInterface}
* object
* @param equipment a
* {@link neqsim.processsimulation.processequipment.ProcessEquipmentInterface}
* object
*/
public AbsorberMechanicalDesign(ProcessEquipmentInterface equipment) {
super(equipment);
Expand All @@ -45,9 +46,8 @@ public void readDesignSpecifications() {
if (getDesignStandard().containsKey("pressure vessel design code")) {
System.out.println("pressure vessel code standard: "
+ getDesignStandard().get("pressure vessel design code").getStandardName());
wallThickness =
((PressureVesselDesignStandard) getDesignStandard().get("pressure vessel design code"))
.calcWallThickness();
wallThickness = ((PressureVesselDesignStandard) getDesignStandard().get("pressure vessel design code"))
.calcWallThickness();
} else {
System.out.println("no pressure vessel code standard specified......");
return;
Expand All @@ -65,12 +65,10 @@ public void readDesignSpecifications() {
if (getDesignStandard().containsKey("separator process design")) {
System.out.println("separator process design: "
+ getDesignStandard().get("separator process design").getStandardName());
gasLoadFactor =
((SeparatorDesignStandard) getDesignStandard().get("separator process design"))
.getGasLoadFactor();
volumeSafetyFactor =
((SeparatorDesignStandard) getDesignStandard().get("separator process design"))
.getVolumetricDesignFactor();
gasLoadFactor = ((SeparatorDesignStandard) getDesignStandard().get("separator process design"))
.getGasLoadFactor();
volumeSafetyFactor = ((SeparatorDesignStandard) getDesignStandard().get("separator process design"))
.getVolumetricDesignFactor();
} else {
System.out.println("no separator process design specified......");
}
Expand Down Expand Up @@ -101,7 +99,7 @@ public void calcDesign() {
double gasDensity = ((Separator) getProcessEquipment()).getGasOutStream().getThermoSystem()
.getPhase(0).getPhysicalProperties().getDensity();
double liqDensity = 1000.0; // ((SimpleTEGAbsorber)
// getProcessEquipment()).getLiquidOutStream().getThermoSystem().getPhase(1).getPhysicalProperties().getDensity();
// getProcessEquipment()).getLiquidOutStream().getThermoSystem().getPhase(1).getPhysicalProperties().getDensity();

// maxDesignVolumeFlow = volumeSafetyFactor * ((Separator)
// getProcessEquipment()).getThermoSystem().getPhase(0).getVolume() / 1e5;
Expand Down
Loading

0 comments on commit 93e315c

Please sign in to comment.