Skip to content

Commit

Permalink
Reorder systemthermo (#687)
Browse files Browse the repository at this point in the history
* move_addHydratePhase2
* move changecomponentname
* move component name setters/getters
* move clone
* move addtocomponentnames
* hasPhaseType and moved hasSolidPhase
* reorder getphase
* marked a bug
  • Loading branch information
asmfstatoil authored and EvenSol committed May 22, 2023
1 parent 0512318 commit 251ec85
Show file tree
Hide file tree
Showing 2 changed files with 208 additions and 195 deletions.
37 changes: 25 additions & 12 deletions src/main/java/neqsim/thermo/system/SystemInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import neqsim.thermo.characterization.WaxModelInterface;
import neqsim.thermo.component.ComponentInterface;
import neqsim.thermo.phase.PhaseInterface;
import neqsim.thermo.phase.PhaseType;

/**
* <p>
Expand Down Expand Up @@ -997,14 +998,36 @@ public void addPlusFraction(String componentName, double numberOfMoles, double m
*/
public void setBmixType(int bmixType);

/**
* Verify if system has a phase of a specific type.
*
* @param pt PhaseType to look for
* @return True if system contains a phase of requested type
*/
public boolean hasPhaseType(PhaseType pt);

/**
* Verify if system has a phase of a specific type.
*
* @param phaseTypeName PhaseType to look for
* @return True if system contains a phase of requested type
* @deprecated Replaced by {@link hasPhaseType}
*/
@Deprecated
public default boolean hasPhaseType(String phaseTypeName) {
return hasPhaseType(PhaseType.byDesc(phaseTypeName));
}

/**
* <p>
* hasSolidPhase.
* </p>
*
* @return a boolean
* @return True if system contains a solid phase
*/
public boolean hasSolidPhase();
public default boolean hasSolidPhase() {
return hasPhaseType(PhaseType.SOLID);
}

/**
* <p>
Expand Down Expand Up @@ -2360,16 +2383,6 @@ public default double getNumberOfMoles() {
*/
public void setTotalNumberOfMoles(double totalNumberOfMoles);

/**
* <p>
* hasPhaseType.
* </p>
*
* @param phaseTypeName a {@link java.lang.String} object
* @return a boolean
*/
public boolean hasPhaseType(String phaseTypeName);

/**
* <p>
* getPhaseNumberOfPhase.
Expand Down
Loading

0 comments on commit 251ec85

Please sign in to comment.