|
| 1 | +package neqsim.physicalproperties.methods.commonphasephysicalproperties.viscosity; |
| 2 | + |
| 3 | +import neqsim.physicalproperties.system.PhysicalProperties; |
| 4 | + |
| 5 | +/** |
| 6 | + * <p> |
| 7 | + * KTAViscosityMethodMod class. |
| 8 | + * </p> |
| 9 | + */ |
| 10 | +public class KTAViscosityMethodMod extends Viscosity { |
| 11 | + /** |
| 12 | + * <p> |
| 13 | + * Constructor for KTAViscosityMethodMod. |
| 14 | + * </p> |
| 15 | + * |
| 16 | + * @param phase a {@link neqsim.physicalproperties.system.PhysicalProperties} object |
| 17 | + */ |
| 18 | + public KTAViscosityMethodMod(PhysicalProperties phase) { |
| 19 | + super(phase); |
| 20 | + } |
| 21 | + |
| 22 | + /** {@inheritDoc} */ |
| 23 | + @Override |
| 24 | + public double calcViscosity() { |
| 25 | + // Check if there are other components than helium |
| 26 | + if (phase.getPhase().getNumberOfComponents() > 1 |
| 27 | + || !phase.getPhase().getComponent(0).getName().equalsIgnoreCase("helium")) { |
| 28 | + throw new Error("This method only supports PURE HELIUM."); |
| 29 | + } |
| 30 | + |
| 31 | + double T = phase.getPhase().getTemperature(); |
| 32 | + double P = phase.getPhase().getPressure(); |
| 33 | + double P_crit = 0.22832; // [MPa] (Source: NIST) |
| 34 | + double A = Math.pow((2 - T / 300), 5.05); |
| 35 | + double B = Math.pow((2 - 300 / T), 2) - 1; |
| 36 | + double viscosity = 1e-7 * (3.817 * Math.pow(T, 0.6938) |
| 37 | + + Math.pow(P, A) / (T * P_crit) |
| 38 | + + Math.exp(-Math.pow(T - 325, 2) / 1000) |
| 39 | + * (Math.pow(P / 25, 2.7) - Math.pow(T, B))); |
| 40 | + return viscosity; // [Pa*s] |
| 41 | + } |
| 42 | +} |
0 commit comments