Skip to content

vFilipaki/CycleSolver.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

CycleSolver



Package for solving steady state thermodynamic cycles
Explore the docs »

How to install · How to cite this project · See examples


The CycleSolver.jl package uses metaprogramming to provide a unique formatting structure for representing cycles and supplying already known properties. Based on this, the algorithm seeks to automatically discover other unknown properties of the system.

In addition to cycle solving, the presented package also offers result visualization features, generating tables and graphs to clearly illustrate cycle properties. This way, the tool allows for a quick and reliable analysis of thermodynamic cycles.

Installation

To install CycleSolver.jl, use the Julia package manager. In Julia REPL, type ] to enter Pkg REPL mode and run:

pkg> add CycleSolver

Alternatively, you can install it via the Pkg API:

julia> using Pkg

julia> Pkg.add("CycleSolver")

Additionally, you have the option to use the CycleSolver.jl package in an online environment, without the need for any local software installation. You can access it through the following link:

Documentation

For information on how to use the package, see the documentation.

Citations

How to cite this project:

@Misc{2023-FilipakiV-CycleSolver,
  author       = {V. Filipaki},
  title        = {{CycleSolver.jl} -- Solver for thermodynamic cycles},
  howpublished = {Online},
  month        = {August},
  year         = {2023},
  journal      = {GitHub repository},
  publisher    = {GitHub},
  url          = {https://github.com/vFilipaki/CycleSolver.jl},
}

Example

Cycle data - Ideal Simple Rankine Cycle

Known properties:
> Temperature at the boiler outlet 250 °C;
> Pressure before turbine 1000 kPa;
> Pressure after turbine 10 kPa.

Input code

using CycleSolver

@solve begin
    st3.T = 250 + 273
    st3.p = 1000
    st1.p = 10

    newCycle[]
        pump(st1, st2)
        boiler(st2, st3)
        turbine(st3, st4)
        condenser(st4, st1) 
end

PrintResults()

Output:

1- CYCLE [water]

State
Name
T [K] P [kPa] h [kJ/kg] s [kJ/kg.K] x ṁ [kg/s] Mass-flux
fraction
st1 318.956 10.0 191.806 0.6492 0.0 1.0
st2 318.989 1000.0 192.806 0.6492 1.0
st3 523.0 1000.0 2942.79 6.9258 1.0
st4 318.956 10.0 2193.78 6.9258 0.8369 1.0

Cycle Properties:

Total Component Value
qin
Q̇in
2749.9849 kJ/kg
0.0 kW
boiler:
st2 >> st3
2749.9849 kJ/kg
qout
Q̇out
2001.9783 kJ/kg
0.0 kW
condenser:
st4 >> st1
2001.9783 kJ/kg
win
Ẇin
1.0 kJ/kg
0.0 kW
pump:
st1 >> st2
1.0 kJ/kg
wout
Ẇout
749.0066 kJ/kg
0.0 kW
turbine:
st3 >> st4
749.0066 kJ/kg

Thermal efficiency (n) = 27.2004 %