diff --git a/src/main/java/neqsim/physicalproperties/physicalpropertymethods/commonphasephysicalproperties/viscosity/Viscosity.java b/src/main/java/neqsim/physicalproperties/physicalpropertymethods/commonphasephysicalproperties/viscosity/Viscosity.java index f064cb04b..ebc04177b 100644 --- a/src/main/java/neqsim/physicalproperties/physicalpropertymethods/commonphasephysicalproperties/viscosity/Viscosity.java +++ b/src/main/java/neqsim/physicalproperties/physicalpropertymethods/commonphasephysicalproperties/viscosity/Viscosity.java @@ -10,7 +10,7 @@ * * @author Even Solbraa */ -abstract class Viscosity extends CommonPhysicalPropertyMethod implements ViscosityInterface { +public abstract class Viscosity extends CommonPhysicalPropertyMethod implements ViscosityInterface { private static final long serialVersionUID = 1000; static Logger logger = LogManager.getLogger(Viscosity.class); diff --git a/src/main/java/neqsim/physicalproperties/physicalpropertymethods/gasphysicalproperties/GasPhysicalPropertyMethod.java b/src/main/java/neqsim/physicalproperties/physicalpropertymethods/gasphysicalproperties/GasPhysicalPropertyMethod.java index dea072c75..337b904a8 100644 --- a/src/main/java/neqsim/physicalproperties/physicalpropertymethods/gasphysicalproperties/GasPhysicalPropertyMethod.java +++ b/src/main/java/neqsim/physicalproperties/physicalpropertymethods/gasphysicalproperties/GasPhysicalPropertyMethod.java @@ -18,13 +18,6 @@ public abstract class GasPhysicalPropertyMethod extends PhysicalPropertyMethod { public double[][] binaryEnergyParameter; public double[][] binaryMolecularMass; - /** - *
- * Constructor for GasPhysicalPropertyMethod. - *
- */ - public GasPhysicalPropertyMethod() {} - /** ** Constructor for GasPhysicalPropertyMethod. diff --git a/src/main/java/neqsim/physicalproperties/physicalpropertymethods/gasphysicalproperties/density/Density.java b/src/main/java/neqsim/physicalproperties/physicalpropertymethods/gasphysicalproperties/density/Density.java index 4323808de..d662044cc 100644 --- a/src/main/java/neqsim/physicalproperties/physicalpropertymethods/gasphysicalproperties/density/Density.java +++ b/src/main/java/neqsim/physicalproperties/physicalpropertymethods/gasphysicalproperties/density/Density.java @@ -28,13 +28,13 @@ public class Density extends GasPhysicalPropertyMethod implements DensityInterfa * Constructor for Density. *
* - * @param gasPhase a + * @param phase a * {@link neqsim.physicalproperties.physicalpropertysystem.PhysicalPropertiesInterface} * object */ public Density( - neqsim.physicalproperties.physicalpropertysystem.PhysicalPropertiesInterface gasPhase) { - this.gasPhase = gasPhase; + neqsim.physicalproperties.physicalpropertysystem.PhysicalPropertiesInterface phase) { + super(phase); } /** {@inheritDoc} */ diff --git a/src/main/java/neqsim/physicalproperties/physicalpropertymethods/gasphysicalproperties/viscosity/Viscosity.java b/src/main/java/neqsim/physicalproperties/physicalpropertymethods/gasphysicalproperties/viscosity/Viscosity.java index 24ca65cc9..f64303559 100644 --- a/src/main/java/neqsim/physicalproperties/physicalpropertymethods/gasphysicalproperties/viscosity/Viscosity.java +++ b/src/main/java/neqsim/physicalproperties/physicalpropertymethods/gasphysicalproperties/viscosity/Viscosity.java @@ -6,11 +6,11 @@ import neqsim.physicalproperties.physicalpropertymethods.methodinterface.ViscosityInterface; /** - * * Abstract class for Viscosity property. + * Abstract class for Viscosity property. * * @author Even Solbraa */ -abstract class Viscosity extends GasPhysicalPropertyMethod implements ViscosityInterface { +public abstract class Viscosity extends GasPhysicalPropertyMethod implements ViscosityInterface { private static final long serialVersionUID = 1000; static Logger logger = LogManager.getLogger(Viscosity.class); diff --git a/src/main/java/neqsim/physicalproperties/physicalpropertymethods/liquidphysicalproperties/LiquidPhysicalPropertyMethod.java b/src/main/java/neqsim/physicalproperties/physicalpropertymethods/liquidphysicalproperties/LiquidPhysicalPropertyMethod.java index b4e584b31..65f38884f 100644 --- a/src/main/java/neqsim/physicalproperties/physicalpropertymethods/liquidphysicalproperties/LiquidPhysicalPropertyMethod.java +++ b/src/main/java/neqsim/physicalproperties/physicalpropertymethods/liquidphysicalproperties/LiquidPhysicalPropertyMethod.java @@ -1,6 +1,7 @@ package neqsim.physicalproperties.physicalpropertymethods.liquidphysicalproperties; import neqsim.physicalproperties.physicalpropertymethods.PhysicalPropertyMethod; +import neqsim.physicalproperties.physicalpropertysystem.PhysicalPropertiesInterface; /** *@@ -10,18 +11,11 @@ * @author Even Solbraa * @version $Id: $Id */ -public class LiquidPhysicalPropertyMethod extends PhysicalPropertyMethod { +public abstract class LiquidPhysicalPropertyMethod extends PhysicalPropertyMethod { private static final long serialVersionUID = 1000; protected neqsim.physicalproperties.physicalpropertysystem.PhysicalPropertiesInterface liquidPhase; - /** - *
- * Constructor for LiquidPhysicalPropertyMethod. - *
- */ - public LiquidPhysicalPropertyMethod() {} - /** ** Constructor for LiquidPhysicalPropertyMethod. @@ -31,15 +25,13 @@ public LiquidPhysicalPropertyMethod() {} * {@link neqsim.physicalproperties.physicalpropertysystem.PhysicalPropertiesInterface} * object */ - public LiquidPhysicalPropertyMethod( - neqsim.physicalproperties.physicalpropertysystem.PhysicalPropertiesInterface liquidPhase) { - this.liquidPhase = liquidPhase; + public LiquidPhysicalPropertyMethod(PhysicalPropertiesInterface phase) { + setPhase(phase); } /** {@inheritDoc} */ @Override - public void setPhase( - neqsim.physicalproperties.physicalpropertysystem.PhysicalPropertiesInterface phase) { + public void setPhase(PhysicalPropertiesInterface phase) { this.liquidPhase = phase; } } diff --git a/src/main/java/neqsim/physicalproperties/physicalpropertymethods/liquidphysicalproperties/density/Costald.java b/src/main/java/neqsim/physicalproperties/physicalpropertymethods/liquidphysicalproperties/density/Costald.java index 5edb9417e..d3c45ae4d 100644 --- a/src/main/java/neqsim/physicalproperties/physicalpropertymethods/liquidphysicalproperties/density/Costald.java +++ b/src/main/java/neqsim/physicalproperties/physicalpropertymethods/liquidphysicalproperties/density/Costald.java @@ -34,7 +34,7 @@ public class Costald extends LiquidPhysicalPropertyMethod implements DensityInte */ public Costald( neqsim.physicalproperties.physicalpropertysystem.PhysicalPropertiesInterface liquidPhase) { - this.liquidPhase = liquidPhase; + super(liquidPhase); } /** {@inheritDoc} */ diff --git a/src/main/java/neqsim/physicalproperties/physicalpropertymethods/liquidphysicalproperties/density/Density.java b/src/main/java/neqsim/physicalproperties/physicalpropertymethods/liquidphysicalproperties/density/Density.java index 128fdc4c5..0e4f85c15 100644 --- a/src/main/java/neqsim/physicalproperties/physicalpropertymethods/liquidphysicalproperties/density/Density.java +++ b/src/main/java/neqsim/physicalproperties/physicalpropertymethods/liquidphysicalproperties/density/Density.java @@ -33,8 +33,8 @@ public class Density extends LiquidPhysicalPropertyMethod implements DensityInte * object */ public Density( - neqsim.physicalproperties.physicalpropertysystem.PhysicalPropertiesInterface liquidPhase) { - this.liquidPhase = liquidPhase; + neqsim.physicalproperties.physicalpropertysystem.PhysicalPropertiesInterface phase) { + super(phase); } /** {@inheritDoc} */ diff --git a/src/main/java/neqsim/physicalproperties/physicalpropertymethods/solidphysicalproperties/SolidPhysicalPropertyMethod.java b/src/main/java/neqsim/physicalproperties/physicalpropertymethods/solidphysicalproperties/SolidPhysicalPropertyMethod.java index 79c02f261..6ec51c56d 100644 --- a/src/main/java/neqsim/physicalproperties/physicalpropertymethods/solidphysicalproperties/SolidPhysicalPropertyMethod.java +++ b/src/main/java/neqsim/physicalproperties/physicalpropertymethods/solidphysicalproperties/SolidPhysicalPropertyMethod.java @@ -10,7 +10,7 @@ * @author Even Solbraa * @version $Id: $Id */ -public class SolidPhysicalPropertyMethod extends PhysicalPropertyMethod { +public abstract class SolidPhysicalPropertyMethod extends PhysicalPropertyMethod { private static final long serialVersionUID = 1000; protected neqsim.physicalproperties.physicalpropertysystem.PhysicalPropertiesInterface solidPhase; @@ -25,8 +25,8 @@ public class SolidPhysicalPropertyMethod extends PhysicalPropertyMethod { * object */ public SolidPhysicalPropertyMethod( - neqsim.physicalproperties.physicalpropertysystem.PhysicalPropertiesInterface solidPhase) { - this.solidPhase = solidPhase; + neqsim.physicalproperties.physicalpropertysystem.PhysicalPropertiesInterface phase) { + setPhase(phase); } /** {@inheritDoc} */ diff --git a/src/main/java/neqsim/physicalproperties/physicalpropertysystem/PhysicalProperties.java b/src/main/java/neqsim/physicalproperties/physicalpropertysystem/PhysicalProperties.java index d55ca97f2..0384a996a 100644 --- a/src/main/java/neqsim/physicalproperties/physicalpropertysystem/PhysicalProperties.java +++ b/src/main/java/neqsim/physicalproperties/physicalpropertysystem/PhysicalProperties.java @@ -8,6 +8,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import neqsim.physicalproperties.mixingrule.PhysicalPropertyMixingRuleInterface; import neqsim.physicalproperties.physicalpropertymethods.commonphasephysicalproperties.conductivity.PFCTConductivityMethodMod86; import neqsim.physicalproperties.physicalpropertymethods.commonphasephysicalproperties.diffusivity.CorrespondingStatesDiffusivity; import neqsim.physicalproperties.physicalpropertymethods.commonphasephysicalproperties.viscosity.FrictionTheoryViscosityMethod; @@ -16,9 +17,13 @@ import neqsim.physicalproperties.physicalpropertymethods.commonphasephysicalproperties.viscosity.PFCTViscosityMethodMod86; import neqsim.physicalproperties.physicalpropertymethods.gasphysicalproperties.conductivity.ChungConductivityMethod; import neqsim.physicalproperties.physicalpropertymethods.gasphysicalproperties.diffusivity.WilkeLeeDiffusivity; +import neqsim.physicalproperties.physicalpropertymethods.liquidphysicalproperties.density.Costald; import neqsim.physicalproperties.physicalpropertymethods.liquidphysicalproperties.diffusivity.AmineDiffusivity; import neqsim.physicalproperties.physicalpropertymethods.liquidphysicalproperties.diffusivity.SiddiqiLucasMethod; import neqsim.physicalproperties.physicalpropertymethods.methodinterface.ConductivityInterface; +import neqsim.physicalproperties.physicalpropertymethods.methodinterface.DensityInterface; +import neqsim.physicalproperties.physicalpropertymethods.methodinterface.DiffusivityInterface; +import neqsim.physicalproperties.physicalpropertymethods.methodinterface.ViscosityInterface; import neqsim.thermo.ThermodynamicConstantsInterface; import neqsim.thermo.phase.PhaseInterface; @@ -38,12 +43,11 @@ public abstract class PhysicalProperties public PhaseInterface phase; protected int binaryDiffusionCoefficientMethod; protected int multicomponentDiffusionMethod; - private neqsim.physicalproperties.mixingrule.PhysicalPropertyMixingRuleInterface mixingRule = - null; - public neqsim.physicalproperties.physicalpropertymethods.methodinterface.ConductivityInterface conductivityCalc; - public neqsim.physicalproperties.physicalpropertymethods.methodinterface.ViscosityInterface viscosityCalc; - public neqsim.physicalproperties.physicalpropertymethods.methodinterface.DiffusivityInterface diffusivityCalc; - public neqsim.physicalproperties.physicalpropertymethods.methodinterface.DensityInterface densityCalc; + private PhysicalPropertyMixingRuleInterface mixingRule = null; + public ConductivityInterface conductivityCalc; + public ViscosityInterface viscosityCalc; + public DiffusivityInterface diffusivityCalc; + public DensityInterface densityCalc; public double kinematicViscosity = 0; public double density = 0; public double viscosity = 0; @@ -105,14 +109,13 @@ public PhaseInterface getPhase() { /** {@inheritDoc} */ @Override - public neqsim.physicalproperties.mixingrule.PhysicalPropertyMixingRuleInterface getMixingRule() { + public PhysicalPropertyMixingRuleInterface getMixingRule() { return mixingRule; } /** {@inheritDoc} */ @Override - public void setMixingRule( - neqsim.physicalproperties.mixingrule.PhysicalPropertyMixingRuleInterface mixingRule) { + public void setMixingRule(PhysicalPropertyMixingRuleInterface mixingRule) { this.mixingRule = mixingRule; } @@ -124,7 +127,7 @@ public void setMixingRuleNull() { /** {@inheritDoc} */ @Override - public neqsim.physicalproperties.physicalpropertymethods.methodinterface.ViscosityInterface getViscosityModel() { + public ViscosityInterface getViscosityModel() { return viscosityCalc; } @@ -136,9 +139,7 @@ public void setDensityModel(String model) { new neqsim.physicalproperties.physicalpropertymethods.liquidphysicalproperties.density.Density( this); } else if ("Costald".equals(model)) { - densityCalc = - new neqsim.physicalproperties.physicalpropertymethods.liquidphysicalproperties.density.Costald( - this); + densityCalc = new Costald(this); } } diff --git a/src/main/java/neqsim/thermo/component/ComponentGEUniquacmodifiedHV.java b/src/main/java/neqsim/thermo/component/ComponentGEUniquacmodifiedHV.java index 86d78508f..609e32ab3 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGEUniquacmodifiedHV.java +++ b/src/main/java/neqsim/thermo/component/ComponentGEUniquacmodifiedHV.java @@ -14,7 +14,7 @@ * * @author Even Solbraa */ -abstract class ComponentGEUniquacmodifiedHV extends ComponentGEUniquac { +public abstract class ComponentGEUniquacmodifiedHV extends ComponentGEUniquac { private static final long serialVersionUID = 1000; /** diff --git a/src/main/java/neqsim/thermo/component/ComponentPrCPA.java b/src/main/java/neqsim/thermo/component/ComponentPrCPA.java index 2f42683da..a261a4e6e 100644 --- a/src/main/java/neqsim/thermo/component/ComponentPrCPA.java +++ b/src/main/java/neqsim/thermo/component/ComponentPrCPA.java @@ -8,7 +8,7 @@ * * @author Even Solbraa */ -abstract class ComponentPrCPA extends ComponentPR implements ComponentCPAInterface { +public abstract class ComponentPrCPA extends ComponentPR implements ComponentCPAInterface { private static final long serialVersionUID = 1000; int cpaon = 1;