Skip to content

Commit

Permalink
test a new method for phase envelope calculation (#1074)
Browse files Browse the repository at this point in the history
* test a new method for phase envelope calculation

* update test

* further improvements

* update model

* update

* update

* added one test

* update method name to calcPTphaseEnvelope2

* updated method name in test

---------

Co-authored-by: Åsmund Våge Fannemel <[email protected]>
  • Loading branch information
EvenSol and asmfstatoil authored Aug 9, 2024
1 parent e01a5d8 commit 2a89f70
Show file tree
Hide file tree
Showing 5 changed files with 797 additions and 86 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
import neqsim.thermodynamicOperations.phaseEnvelopeOps.multicomponentEnvelopeOps.CricondenThermFlash;
import neqsim.thermodynamicOperations.phaseEnvelopeOps.multicomponentEnvelopeOps.HPTphaseEnvelope;
import neqsim.thermodynamicOperations.phaseEnvelopeOps.multicomponentEnvelopeOps.pTphaseEnvelope;
import neqsim.thermodynamicOperations.phaseEnvelopeOps.multicomponentEnvelopeOps.pTphaseEnvelopeNew2;
import neqsim.thermodynamicOperations.phaseEnvelopeOps.reactiveCurves.pLoadingCurve2;
import neqsim.thermodynamicOperations.propertyGenerator.OLGApropertyTableGeneratorWaterStudents;
import neqsim.thermodynamicOperations.propertyGenerator.OLGApropertyTableGeneratorWaterStudentsPH;
Expand Down Expand Up @@ -1539,6 +1540,23 @@ public void calcPTphaseEnvelope() {
getOperation().run();
}

// public void dewPointPressureFlash(){
// constantDutyFlashInterface operation = new constantDutyPressureFlash(system);
// operation.setBeta((1-1e-7));
// operation.run();
// }
/**
* <p>
* calcPTphaseEnvelopeNew.
* </p>
*/
public void calcPTphaseEnvelope2() {
operation = new pTphaseEnvelopeNew2(system, fileName, (1.0 - 1e-10), 1.0, false);
// thisThread = new Thread(operation);
// thisThread.start();
getOperation().run();
}

/**
* <p>
* calcPTphaseEnvelope.
Expand Down Expand Up @@ -2074,7 +2092,8 @@ public CalculationResult propertyFlash(List<Double> Spec1, List<Double> Spec2, i
}

if (hasOnlineFractions) {
// Assure that fraction is inserted for the correct component (in case of mismatch of
// Assure that fraction is inserted for the correct component (in case of
// mismatch of
// component input and fluid component list)
double[] fraction = new double[this.system.getNumberOfComponents()];
// For all components defined in system
Expand Down
Loading

0 comments on commit 2a89f70

Please sign in to comment.