neqsim icon indicating copy to clipboard operation
neqsim copied to clipboard

add expander-compressor

Open EvenSol opened this issue 6 months ago • 1 comments

Turbo Expander-Compressor Simulation Plan

Given Inputs:

Inlet flow rate

Inlet pressure

Fluid composition

Inlet temperature

Target Output:

Desired outlet pressure after the expander

Use of equipment performance curves (e.g., efficiency and head)

Step-by-Step Calculation Logic:

  1. IGV Modeling:

The Inlet Guide Vanes (IGV) are modeled as a valve with a Cv-like formula.

The pressure drop across the IGV depends on the opening position.

For example: If inlet pressure is 65 bar and IGV opening is 80%, the outlet pressure after IGV might be approximately 63 bar.

  1. Initial Speed Guess:

Start with an initial guess for the rotational speed (N, in rpm).

Calculate the following:

U/C ratio (tip speed ratio)

Q/N ratio (flow per unit speed)

Calculate the isentropic efficiency using the formula: isentropic efficiency = design efficiency × correction factor 1 (based on U/C) × correction factor 2 (based on Q/N)

Use PS flash to calculate isentropic enthalpy at the outlet pressure.

Compute the isentropic work.

Calculate actual expander work: expander work = isentropic efficiency × isentropic work

Use the enthalpy change to determine the outlet temperature and flow properties after the expander.

  1. Mechanical Losses:

Calculate power losses due to bearings or other mechanical losses.

Example: W_bearing = constant value (e.g., 1000 W), or based on speed.

  1. Power Balance with Compressor:

Calculate the net power available to the compressor: W_compressor_corrected = W_expander - W_bearing

Use performance curves to calculate:

Polytropic head correction

Polytropic efficiency

Required compressor power (W_compressor)

  1. Iteration:

If W_compressor_corrected is not equal to W_compressor:

Adjust the rotational speed (N)

Repeat steps 2–4

Iterate until: W_compressor_corrected ≈ W_compressor (within a given tolerance)

Convergence Criteria:

Stop iterating when the absolute difference in power is within a specified tolerance (e.g., 50 W)

EvenSol avatar May 09 '25 14:05 EvenSol

Codecov Report

Attention: Patch coverage is 76.61871% with 65 lines in your changes missing coverage. Please review.

Project coverage is 42.95%. Comparing base (8c4a904) to head (1113393).

Files with missing lines Patch % Lines
...ss/equipment/expander/TurboExpanderCompressor.java 76.61% 54 Missing and 11 partials :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1341      +/-   ##
============================================
+ Coverage     42.82%   42.95%   +0.12%     
- Complexity     6625     6667      +42     
============================================
  Files           759      760       +1     
  Lines         71677    71955     +278     
  Branches       8615     8630      +15     
============================================
+ Hits          30694    30906     +212     
- Misses        39077    39130      +53     
- Partials       1906     1919      +13     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov-commenter avatar May 09 '25 14:05 codecov-commenter