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

Reorder systemthermo #687

Merged
merged 9 commits into from
May 19, 2023
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
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