diff --git a/src/main/java/neqsim/process/equipment/valve/ThrottlingValve.java b/src/main/java/neqsim/process/equipment/valve/ThrottlingValve.java index bb173f0a9..54f28437d 100644 --- a/src/main/java/neqsim/process/equipment/valve/ThrottlingValve.java +++ b/src/main/java/neqsim/process/equipment/valve/ThrottlingValve.java @@ -314,7 +314,7 @@ public double liquidValveCv(double P1, double P2, double rho, double m, double F * @return The calculated mass flow rate (in kg/s). */ public double calcmassflow(double Pus, double Pds, double rhous, double Cv, - double percentValveOpening, boolean isGasService) { // Add isGasService flag + double percentValveOpening, boolean isGasService) { double Cl = 30.0; // Define Cl value double sineFactor; @@ -370,6 +370,16 @@ public double calcValvePout(double Pus, double rhous, double Cv, double massFlow return Pds; } + /** + * Calculates the valve flow coefficient (Cv) for a throttling valve. + * + * @param Pus Upstream pressure (in bar). + * @param Pds Downstream pressure (in bar). + * @param rhous Upstream fluid density (in kg/m³). + * @param massFlowRate Mass flow rate through the valve (in kg/h). + * @param percentValveOpening Percentage of valve opening (0-100%). + * @return The calculated valve flow coefficient (Cv). + */ public double calcCv(double Pus, double Pds, double rhous, double massFlowRate, double percentValveOpening) { // Sine of 3417 / 30.0