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

refact: typo atractive -> attractive #290

Merged
merged 1 commit into from
Jan 13, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ public double calcViscosity() {
}
visk0 = Math.exp(visk0);
double Prepulsive = 1;
double Patractive = 1;
double Pattractive = 1;
try {
// frictional term
Prepulsive = ((neqsim.thermo.phase.PhaseEosInterface) phase.getPhase())
.getPressureRepulsive();
Patractive = ((neqsim.thermo.phase.PhaseEosInterface) phase.getPhase())
.getPressureAtractive();
Pattractive = ((neqsim.thermo.phase.PhaseEosInterface) phase.getPhase())
.getPressureAttractive();
// logger.info("P rep " + Prepulsive);
// logger.info("P atr " + Patractive);
// logger.info("P atr " + Pattractive);
} catch (Exception e) {
logger.error("error", e);
}
Expand Down Expand Up @@ -141,7 +141,7 @@ public double calcViscosity() {
kaprrmx += zi * nci * kaprri / (phase.getPhase().getComponent(i).getPC()
* phase.getPhase().getComponent(i).getPC());
}
visk1 = kaprmx * Prepulsive + kapamx * Patractive + kaprrmx * Prepulsive * Prepulsive;
visk1 = kaprmx * Prepulsive + kapamx * Pattractive + kaprrmx * Prepulsive * Prepulsive;

if ((visk0 + visk1) < 1e-20) {
return 1e-6;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
import neqsim.util.database.NeqSimDataBase;

/**
* <p>TestInfluenceParamGTFunction class.</p>
* <p>
* TestInfluenceParamGTFunction class.
* </p>
*
* @author Even Solbraa
* @version $Id: $Id
Expand All @@ -21,7 +23,9 @@ public class TestInfluenceParamGTFunction {
static Logger logger = LogManager.getLogger(TestInfluenceParamGTFunction.class);

/**
* <p>main.</p>
* <p>
* main.
* </p>
*
* @param args an array of {@link java.lang.String} objects
*/
Expand Down Expand Up @@ -83,7 +87,7 @@ public static void main(String[] args) {
// / 1.0e3, 0);
// logger.error(testSystem.getTemperature() + " " + influenceParam);
// double factor = influenceParam /
// (testSystem.getPhase(0).getComponent(0).getAtractiveTerm().aT(testSystem.getTemperature())
// (testSystem.getPhase(0).getComponent(0).getAttractiveTerm().aT(testSystem.getTemperature())
// * 1.0e-5) / Math.pow(((ComponentEosInterface)
// testSystem.getPhase(0).getComponent(0)).calcb() * 1e-5, 2.0 / 3.0);
// sample.setDescription((1.0 - testSystem.getTemperature() /
Expand Down Expand Up @@ -123,7 +127,7 @@ public static void main(String[] args) {
* ((GTSurfaceTension) testSystem.getInterphaseProperties().getSurfaceTensionModel(0)).
* getInfluenceParameter(surfTens / 1.0e3, 0); logger.error(testSystem.getTemperature() +
* " " + influenceParam); double factor = influenceParam /
* (testSystem.getPhase(0).getComponent(0).getAtractiveTerm().aT(testSystem.
* (testSystem.getPhase(0).getComponent(0).getAttractiveTerm().aT(testSystem.
* getTemperature()) * 1.0e-5) / Math.pow(((ComponentEosInterface)
* testSystem.getPhase(0).getComponent(0)).calcb() * 1e-5, 2.0 / 3.0);
* sample.setDescription((1.0 - testSystem.getTemperature() /
Expand Down
18 changes: 9 additions & 9 deletions src/main/java/neqsim/thermo/component/Component.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
import org.apache.logging.log4j.Logger;
import neqsim.thermo.ThermodynamicConstantsInterface;
import neqsim.thermo.atomElement.Element;
import neqsim.thermo.component.atractiveEosTerm.AtractiveTermInterface;
import neqsim.thermo.component.attractiveEosTerm.AttractiveTermInterface;
import neqsim.thermo.phase.PhaseInterface;
import neqsim.util.database.NeqSimDataBase;

abstract class Component implements ComponentInterface {
private static final long serialVersionUID = 1000;

double[] surfTensInfluenceParam = {0.28367, -0.05164, -0.81594, 1.06810, -1.1147};
protected int index, componentNumber, atractiveTermNumber = 0, numberOfAssociationSites = 0;
protected int index, componentNumber, attractiveTermNumber = 0, numberOfAssociationSites = 0;
protected double logFugasityCoeffisient = 0.0, associationVolume = 0.0, associationEnergy = 0.0,
aCPA = 0.0, bCPA = 0.0, mCPA = 0.0, srkacentricFactor = 0.0;
protected String componentName = "default", referenceStateType = "solvent",
Expand Down Expand Up @@ -1341,7 +1341,7 @@ public final String getName() {
@Override
public void setAcentricFactor(double val) {
acentricFactor = val;
getAtractiveTerm().init();
getAttractiveTerm().init();
}

/** {@inheritDoc} */
Expand All @@ -1352,13 +1352,13 @@ public void setRacketZ(double val) {

/** {@inheritDoc} */
@Override
public void setAtractiveTerm(int i) {
atractiveTermNumber = i;
public void setAttractiveTerm(int i) {
attractiveTermNumber = i;
}

/** {@inheritDoc} */
@Override
public AtractiveTermInterface getAtractiveTerm() {
public AttractiveTermInterface getAttractiveTerm() {
return null;
}

Expand Down Expand Up @@ -1497,11 +1497,11 @@ public final double getLogFugasityCoeffisient() {
/**
* {@inheritDoc}
*
* Getter for property atractiveTermNumber.
* Getter for property attractiveTermNumber.
*/
@Override
public final int getAtractiveTermNumber() {
return atractiveTermNumber;
public final int getAttractiveTermNumber() {
return attractiveTermNumber;
}

/** {@inheritDoc} */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public ComponentElectrolyteCPA(String component_name, double moles, double moles
a = aCPA;
b = bCPA;
}
setAtractiveTerm(0);
setAttractiveTerm(0);
}
// double[] surfTensInfluenceParamtemp = {-0.0286407191587279700,
// -1.85760887578596, 0.520588, -0.1386439759, 1.1216308727071944};
Expand Down Expand Up @@ -113,7 +113,7 @@ public ComponentElectrolyteCPA(int number, double TC, double PC, double M, doubl
a = aCPA;
b = bCPA;
}
setAtractiveTerm(0);
setAttractiveTerm(0);
}
// double[] surfTensInfluenceParamtemp = {-0.0286407191587279700,
// -1.85760887578596, 0.520588, -0.1386439759, 1.1216308727071944};
Expand Down Expand Up @@ -166,10 +166,10 @@ public void init(double temperature, double pressure, double totalNumberOfMoles,

/** {@inheritDoc} */
@Override
public void setAtractiveTerm(int i) {
super.setAtractiveTerm(i);
public void setAttractiveTerm(int i) {
super.setAttractiveTerm(i);
if (Math.abs(aCPA) > 1e-6 && cpaon == 1) {
getAtractiveTerm().setm(mCPA);
getAttractiveTerm().setm(mCPA);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public ComponentElectrolyteCPAOld(String component_name, double moles, double mo
a = aCPA;
b = bCPA;
}
setAtractiveTerm(0);
setAttractiveTerm(0);
}
}

Expand Down Expand Up @@ -109,7 +109,7 @@ public ComponentElectrolyteCPAOld(int number, double TC, double PC, double M, do
a = aCPA;
b = bCPA;
}
setAtractiveTerm(0);
setAttractiveTerm(0);
}
}

Expand Down Expand Up @@ -152,10 +152,10 @@ public double getVolumeCorrection() {

/** {@inheritDoc} */
@Override
public void setAtractiveTerm(int i) {
super.setAtractiveTerm(i);
public void setAttractiveTerm(int i) {
super.setAttractiveTerm(i);
if (Math.abs(aCPA) > 1e-6 && cpaon == 1) {
getAtractiveTerm().setm(mCPA);
getAttractiveTerm().setm(mCPA);
}
}

Expand Down
Loading