Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
EvenSol committed Jan 18, 2025
1 parent 5609624 commit 15e922c
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 15e922c

Please sign in to comment.