Skip to content

Commit

Permalink
update Rachford rice method (#1204)
Browse files Browse the repository at this point in the history
* update Rachford rice method

* turn off logging

* added logging via logger

* update

* update flash

* update

* update

* update

* update

* update version
  • Loading branch information
EvenSol authored Dec 8, 2024
1 parent 656d9d6 commit 0a880ae
Show file tree
Hide file tree
Showing 66 changed files with 880 additions and 128 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<version>${revision}${sha1}${changelist}</version>

<properties>
<revision>3.0.8</revision>
<revision>3.0.9</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<sha1/>
Expand Down
2 changes: 1 addition & 1 deletion pomJava21.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<version>${revision}${sha1}${changelist}</version>

<properties>
<revision>3.0.8</revision>
<revision>3.0.9</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<sha1/>
Expand Down
2 changes: 1 addition & 1 deletion pomJava8.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<version>${revision}${sha1}${changelist}-Java8</version>

<properties>
<revision>3.0.8</revision>
<revision>3.0.9</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<sha1 />
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/neqsim/fluidmechanics/flownode/FlowNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import neqsim.fluidmechanics.flownode.fluidboundary.heatmasstransfercalc.FluidBoundaryInterface;
import neqsim.fluidmechanics.flownode.fluidboundary.interphasetransportcoefficient.InterphaseTransportCoefficientBaseClass;
import neqsim.fluidmechanics.flownode.fluidboundary.interphasetransportcoefficient.InterphaseTransportCoefficientInterface;
import neqsim.fluidmechanics.flownode.twophasenode.TwoPhaseFlowNode;
import neqsim.fluidmechanics.geometrydefinitions.GeometryDefinitionInterface;
import neqsim.thermo.ThermodynamicConstantsInterface;
import neqsim.thermo.system.SystemInterface;
Expand All @@ -31,6 +34,7 @@
*/
public abstract class FlowNode implements FlowNodeInterface, ThermodynamicConstantsInterface {
private static final long serialVersionUID = 1000;
static Logger logger = LogManager.getLogger(FlowNode.class);

protected double distanceToCenterOfNode = 0;
protected double lengthOfNode = 0;
Expand Down Expand Up @@ -229,7 +233,7 @@ public FlowNode clone() {
try {
clonedSystem = (FlowNode) super.clone();
} catch (Exception ex) {
ex.printStackTrace();
logger.error(ex.getMessage());;
}

clonedSystem.bulkSystem = bulkSystem.clone();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public FluidBoundary clone() {
try {
clonedSystem = (FluidBoundary) super.clone();
} catch (Exception ex) {
ex.printStackTrace();
logger.error(ex.getMessage());;
}

clonedSystem.interphaseSystem = interphaseSystem.clone();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package neqsim.fluidmechanics.flownode.fluidboundary.heatmasstransfercalc.nonequilibriumfluidboundary;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import Jama.Matrix;
import neqsim.fluidmechanics.flownode.FlowNodeInterface;
import neqsim.fluidmechanics.flownode.fluidboundary.heatmasstransfercalc.nonequilibriumfluidboundary.filmmodelboundary.KrishnaStandartFilmModel;
import neqsim.thermo.system.SystemInterface;

/**
Expand All @@ -15,6 +18,7 @@
public abstract class NonEquilibriumFluidBoundary
extends neqsim.fluidmechanics.flownode.fluidboundary.heatmasstransfercalc.FluidBoundary {
private static final long serialVersionUID = 1000;
static Logger logger = LogManager.getLogger(NonEquilibriumFluidBoundary.class);

protected int neq = 0;
protected Matrix dx;
Expand Down Expand Up @@ -98,7 +102,7 @@ public NonEquilibriumFluidBoundary clone() {
try {
clonedSystem = (NonEquilibriumFluidBoundary) super.clone();
} catch (Exception ex) {
ex.printStackTrace();
logger.error(ex.getMessage());;
}

return clonedSystem;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package neqsim.fluidmechanics.flownode.fluidboundary.heatmasstransfercalc.nonequilibriumfluidboundary.filmmodelboundary;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import Jama.Matrix;
import neqsim.fluidmechanics.flownode.FlowNodeInterface;
import neqsim.fluidmechanics.flownode.fluidboundary.heatmasstransfercalc.nonequilibriumfluidboundary.filmmodelboundary.reactivefilmmodel.ReactiveFluidBoundary;
import neqsim.fluidmechanics.flownode.twophasenode.twophasepipeflownode.AnnularFlow;
import neqsim.fluidmechanics.geometrydefinitions.pipe.PipeData;
import neqsim.thermo.ThermodynamicConstantsInterface;
Expand All @@ -22,7 +25,7 @@ public class KrishnaStandartFilmModel extends
neqsim.fluidmechanics.flownode.fluidboundary.heatmasstransfercalc.nonequilibriumfluidboundary.NonEquilibriumFluidBoundary
implements ThermodynamicConstantsInterface {
private static final long serialVersionUID = 1000;

static Logger logger = LogManager.getLogger(KrishnaStandartFilmModel.class);
Matrix phiMatrix;
Matrix redPhiMatrix;
Matrix redCorrectionMatrix;
Expand Down Expand Up @@ -77,7 +80,7 @@ public KrishnaStandartFilmModel clone() {
try {
clonedSystem = (KrishnaStandartFilmModel) super.clone();
} catch (Exception ex) {
ex.printStackTrace();
logger.error(ex.getMessage());;
}

return clonedSystem;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package neqsim.fluidmechanics.flownode.fluidboundary.heatmasstransfercalc.nonequilibriumfluidboundary.filmmodelboundary.reactivefilmmodel;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import Jama.Matrix;
import neqsim.fluidmechanics.flownode.FlowNodeInterface;
import neqsim.fluidmechanics.flownode.fluidboundary.heatmasstransfercalc.nonequilibriumfluidboundary.filmmodelboundary.KrishnaStandartFilmModel;
import neqsim.process.equipment.util.StreamSaturatorUtil;
import neqsim.thermo.system.SystemInterface;

/**
Expand All @@ -14,6 +17,7 @@
* @version $Id: $Id
*/
public abstract class ReactiveFluidBoundary extends KrishnaStandartFilmModel {
static Logger logger = LogManager.getLogger(ReactiveFluidBoundary.class);
private static final long serialVersionUID = 1000;

protected int neq = 0;
Expand Down Expand Up @@ -85,7 +89,7 @@ public ReactiveFluidBoundary clone() {
try {
clonedSystem = (ReactiveFluidBoundary) super.clone();
} catch (Exception ex) {
ex.printStackTrace();
logger.error(ex.getMessage());;
}

return clonedSystem;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package neqsim.fluidmechanics.flownode.multiphasenode;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import neqsim.fluidmechanics.flownode.FlowNode;
import neqsim.fluidmechanics.flownode.multiphasenode.waxnode.WaxDepositionFlowNode;
import neqsim.fluidmechanics.flownode.twophasenode.TwoPhaseFlowNode;
import neqsim.fluidmechanics.geometrydefinitions.GeometryDefinitionInterface;
import neqsim.thermo.system.SystemInterface;
Expand All @@ -15,6 +18,7 @@
*/
public abstract class MultiPhaseFlowNode extends FlowNode {
private static final long serialVersionUID = 1000;
static Logger logger = LogManager.getLogger(MultiPhaseFlowNode.class);

/**
* <p>
Expand Down Expand Up @@ -46,7 +50,7 @@ public TwoPhaseFlowNode clone() {
try {
clonedSystem = (TwoPhaseFlowNode) super.clone();
} catch (Exception ex) {
ex.printStackTrace();
logger.error(ex.getMessage());;
}

return clonedSystem;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package neqsim.fluidmechanics.flownode.multiphasenode.waxnode;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import neqsim.fluidmechanics.flownode.FlowNodeInterface;
import neqsim.fluidmechanics.flownode.fluidboundary.heatmasstransfercalc.nonequilibriumfluidboundary.NonEquilibriumFluidBoundary;
import neqsim.fluidmechanics.flownode.fluidboundary.interphasetransportcoefficient.interphasetwophase.interphasepipeflow.InterphaseStratifiedFlow;
import neqsim.fluidmechanics.flownode.multiphasenode.MultiPhaseFlowNode;
import neqsim.fluidmechanics.flownode.twophasenode.twophasepipeflownode.StratifiedFlowNode;
Expand All @@ -21,6 +24,7 @@
*/
public class WaxDepositionFlowNode extends MultiPhaseFlowNode {
private static final long serialVersionUID = 1000;
static Logger logger = LogManager.getLogger(WaxDepositionFlowNode.class);

/**
* <p>
Expand Down Expand Up @@ -71,7 +75,7 @@ public StratifiedFlowNode clone() {
try {
clonedSystem = (StratifiedFlowNode) super.clone();
} catch (Exception ex) {
ex.printStackTrace();
logger.error(ex.getMessage());;
}

return clonedSystem;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package neqsim.fluidmechanics.flownode.onephasenode;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import neqsim.fluidmechanics.flownode.FlowNode;
import neqsim.fluidmechanics.flownode.onephasenode.onephasepipeflownode.onePhasePipeFlowNode;
import neqsim.fluidmechanics.geometrydefinitions.GeometryDefinitionInterface;
import neqsim.thermo.system.SystemInterface;

Expand All @@ -14,6 +17,7 @@
*/
public abstract class onePhaseFlowNode extends FlowNode {
private static final long serialVersionUID = 1000;
static Logger logger = LogManager.getLogger(onePhaseFlowNode.class);

/**
* <p>
Expand Down Expand Up @@ -51,7 +55,7 @@ public onePhaseFlowNode clone() {
try {
clonedSystem = (onePhaseFlowNode) super.clone();
} catch (Exception ex) {
ex.printStackTrace();
logger.error(ex.getMessage());;
}

return clonedSystem;
Expand Down Expand Up @@ -132,7 +136,7 @@ public void init() {
volumetricFlowRate[0] = superficialVelocity[0] * pipe.getArea();
this.updateMolarFlow();
calcReynoldsNumber();
//System.out.println("specifiedFrictionFactor " +specifiedFrictionFactor[0]);
// System.out.println("specifiedFrictionFactor " +specifiedFrictionFactor[0]);
if (specifiedFrictionFactor[0] == null) {
wallFrictionFactor[0] = interphaseTransportCoefficient.calcWallFrictionFactor(this);
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package neqsim.fluidmechanics.flownode.onephasenode.onephasepipeflownode;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import neqsim.fluidmechanics.flownode.FlowNodeInterface;
import neqsim.fluidmechanics.flownode.fluidboundary.interphasetransportcoefficient.interphaseonephase.interphasepipeflow.InterphasePipeFlow;
import neqsim.fluidmechanics.flownode.multiphasenode.MultiPhaseFlowNode;
import neqsim.fluidmechanics.flownode.onephasenode.onePhaseFlowNode;
import neqsim.fluidmechanics.geometrydefinitions.GeometryDefinitionInterface;
import neqsim.fluidmechanics.geometrydefinitions.pipe.PipeData;
Expand All @@ -20,6 +23,7 @@
*/
public class onePhasePipeFlowNode extends onePhaseFlowNode {
private static final long serialVersionUID = 1000;
static Logger logger = LogManager.getLogger(onePhasePipeFlowNode.class);

/**
* <p>
Expand Down Expand Up @@ -52,7 +56,7 @@ public onePhasePipeFlowNode clone() {
try {
clonedSystem = (onePhasePipeFlowNode) super.clone();
} catch (Exception ex) {
ex.printStackTrace();
logger.error(ex.getMessage());;
}
return clonedSystem;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package neqsim.fluidmechanics.flownode.twophasenode;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import neqsim.fluidmechanics.flownode.FlowNode;
import neqsim.fluidmechanics.flownode.twophasenode.twophasestirredcellnode.StirredCellNode;
import neqsim.fluidmechanics.geometrydefinitions.GeometryDefinitionInterface;
import neqsim.thermo.system.SystemInterface;

Expand All @@ -14,6 +17,7 @@
*/
public abstract class TwoPhaseFlowNode extends FlowNode {
private static final long serialVersionUID = 1000;
static Logger logger = LogManager.getLogger(TwoPhaseFlowNode.class);

// public double[] molarMassTransferFlux;
// public double[] molarMassTransfer;
Expand Down Expand Up @@ -56,7 +60,7 @@ public TwoPhaseFlowNode clone() {
try {
clonedSystem = (TwoPhaseFlowNode) super.clone();
} catch (Exception ex) {
ex.printStackTrace();
logger.error(ex.getMessage());;
}

// clonedSystem.molarMassTransferFlux = (double[])
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package neqsim.fluidmechanics.flownode.twophasenode.twophasepipeflownode;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import neqsim.fluidmechanics.flownode.FlowNodeInterface;
import neqsim.fluidmechanics.flownode.fluidboundary.interphasetransportcoefficient.interphasetwophase.interphasepipeflow.InterphaseStratifiedFlow;
import neqsim.fluidmechanics.flownode.onephasenode.onePhaseFlowNode;
import neqsim.fluidmechanics.flownode.twophasenode.TwoPhaseFlowNode;
import neqsim.fluidmechanics.geometrydefinitions.GeometryDefinitionInterface;
import neqsim.fluidmechanics.geometrydefinitions.internalgeometry.wall.MaterialLayer;
Expand All @@ -23,6 +26,7 @@
*/
public class AnnularFlow extends TwoPhaseFlowNode {
private static final long serialVersionUID = 1000;
static Logger logger = LogManager.getLogger(AnnularFlow.class);
// ThermodynamicOperations interphaseOps = new ThermodynamicOperations();
// double liquidFilmThickness=0;

Expand Down Expand Up @@ -80,7 +84,7 @@ public AnnularFlow clone() {
try {
clonedSystem = (AnnularFlow) super.clone();
} catch (Exception ex) {
ex.printStackTrace();
logger.error(ex.getMessage());;
}
return clonedSystem;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package neqsim.fluidmechanics.flownode.twophasenode.twophasepipeflownode;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import neqsim.fluidmechanics.flownode.FlowNodeInterface;
import neqsim.fluidmechanics.flownode.fluidboundary.interphasetransportcoefficient.interphasetwophase.interphasepipeflow.InterphaseDropletFlow;
import neqsim.fluidmechanics.flownode.twophasenode.TwoPhaseFlowNode;
Expand All @@ -19,6 +21,7 @@
*/
public class BubbleFlowNode extends TwoPhaseFlowNode {
private static final long serialVersionUID = 1000;
static Logger logger = LogManager.getLogger(BubbleFlowNode.class);
private double averageBubbleDiameter = 0.001;

/**
Expand Down Expand Up @@ -94,7 +97,7 @@ public BubbleFlowNode clone() {
try {
clonedSystem = (BubbleFlowNode) super.clone();
} catch (Exception ex) {
ex.printStackTrace();
logger.error(ex.getMessage());;
}

return clonedSystem;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package neqsim.fluidmechanics.flownode.twophasenode.twophasepipeflownode;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import neqsim.fluidmechanics.flownode.FlowNodeInterface;
import neqsim.fluidmechanics.flownode.fluidboundary.interphasetransportcoefficient.interphasetwophase.interphasepipeflow.InterphaseStratifiedFlow;
import neqsim.fluidmechanics.flownode.twophasenode.TwoPhaseFlowNode;
Expand All @@ -19,6 +21,7 @@
*/
public class StratifiedFlowNode extends TwoPhaseFlowNode {
private static final long serialVersionUID = 1000;
static Logger logger = LogManager.getLogger(StratifiedFlowNode.class);

/**
* <p>
Expand Down Expand Up @@ -74,7 +77,7 @@ public StratifiedFlowNode clone() {
try {
clonedSystem = (StratifiedFlowNode) super.clone();
} catch (Exception ex) {
ex.printStackTrace();
logger.error(ex.getMessage());;
}

return clonedSystem;
Expand Down
Loading

0 comments on commit 0a880ae

Please sign in to comment.