Piston expanderΒΆ

This example explains how to use properly PDSim to simulate a piston expander. The same methodology can be readily applied to other positive displacement machines.

[1]:
## COMMON IMPORTS ##
from __future__ import division, print_function
from math import pi, cos, sin
from timeit import default_timer
import os, sys
import matplotlib.pyplot as plt, numpy as np
%matplotlib inline
[2]:
#From PDSim we import the different elements that allows us to built a positive displacement simulation code.
from PDSim.flow.flow import FlowPath
from PDSim.flow import flow_models
from PDSim.misc.datatypes import empty_arraym
from PDSim.core.containers import ControlVolume, Tube
from PDSim.core.core import PDSimCore

[3]:
# We need also to import CoolProp as property library to define suction and discharge states of the expander
# (or compressor).
from CoolProp import State
from CoolProp import CoolProp as CP
[4]:
# We create a class derived from PDSimCore that holds the piston expander model

class PistonExpander(PDSimCore):

    #: Displacement of the cylinder above the dead volume [m^3]
    Vdisp = 20e-6

    #: Dead volume of the cylinder at TDC [m^3]
    Vdead = 3e-6

    #: Rotational speed [rad/s]
    omega = 377

    def __init__(self):
        #Initialize the base class that PistonExpander is derived from
        PDSimCore.__init__(self)

    # We define the working chamber volume as function of the crank angle and its derivative.
    # In this case we assume a simplified mathematical formulation
    def V_dV(self, theta):

        V = self.Vdead+self.Vdisp/2*(1-cos(theta))
        dVdtheta = self.Vdisp/2*sin(theta)
        return V, dVdtheta

    # We define the suction and discharge port area profiles as well as the flow model through such ports.
    def Suction(self, FlowPath):
        if 0 <= self.theta <= pi/4:
            FlowPath.A = pi*0.006**2/4*(1-cos(8*self.theta))/2
            mdot = flow_models.IsentropicNozzle(FlowPath.A,
                                                FlowPath.State_up,
                                                FlowPath.State_down)
        else:
            FlowPath.A = 0.0
            mdot = 0
        return mdot

    def Discharge(self, FlowPath):
        if pi <= self.theta <= 7*pi/4:
            FlowPath.A = pi*0.006**2/4*(1-cos(4*self.theta))/2
            mdot = flow_models.IsentropicNozzle(FlowPath.A,
                                            FlowPath.State_up,
                                            FlowPath.State_down)
        else:
            FlowPath.A = 0.0
            mdot = 0
        return mdot

    # We define a tube flow model to connect the inlet of the expander shell with the actual suction port.
    # Similar model is applied on the discharge side.
    def TubeCode(self, Tube):

        Tube.Q = flow_models.IsothermalWallTube(Tube.mdot,
                                                Tube.State1,
                                                Tube.State2,
                                                Tube.fixed,
                                                Tube.L,
                                                Tube.ID,
                                                T_wall = self.Tlumps[0])

    # In this case we neglect the in-chamber heat transfer which eventually can be added
    # depending on the type of machine
    def heat_transfer_callback(self, theta):
        return empty_arraym(self.CVs.N)

    # We also neglect the mechanical losses for simplicity
    def mechanical_losses(self):
        return 0

    # We define the heat transfer between the expander shell and the ambient by defining
    # a constant heat transfer coefficient
    def ambient_heat_transfer(self):
        return self.h_shell*self.A_shell*(self.Tamb-self.Tlumps[0]) #[kW]

    # At this point we are able to define an overall energy balance of the expander shell
    # with a single lumped temperature
    def lump_energy_balance_callback(self):

        #Mechanical losses are added to the lump
        self.Wdot_mechanical = self.mechanical_losses() #[kW]
        #Heat transfer between the shell and the ambient
        self.Qamb = self.ambient_heat_transfer() #[kW]
        return self.Wdot_mechanical + self.Qamb

    # Callback function for the stepsize of the solver
    def step_callback(self,theta,h,Itheta):
        self.theta = theta
        return False, h
[5]:
# We have completely defined the class that hold the general piston expander model.
# Now we can actually define a function to run the model
def Expander():

    expander = PistonExpander() #Instantiate the class

    # We specify the working fluid, the inlet state conditions (temperature and pressure in this case),
    # the outlet state for which the the pressure is specified and the temperature is guessed.
    # Last, we need to provide a guess for the inlet mass flow rate. The model calculate the actual
    # mass flow rate through the machine as well as the discharge temperature.
    Ref = 'Nitrogen'
    inletState = State.State(Ref,dict(T = 298.15, P = 501.325))
    outletState = State.State(Ref,dict(T = 200, P = inletState.p/10))
    mdot_guess = inletState.rho*expander.Vdisp*expander.omega/(2*pi)

    # The piston expander has only one working chamber and therefore we add one control volume
    expander.add_CV(ControlVolume(key='A',
                                  initialState=inletState.copy(),
                                  VdVFcn=expander.V_dV,)
                    )

    # We define the necessary constants for ambient heat transfer
    expander.h_shell = 0.010               #[kW/m2/K]
    expander.A_shell = pi*10*2*(0.0254**2) #[m2]
    expander.Tamb = 298                    #[K]
    expander.Wdot_parasitic = 0.01         #Parasitic losses [kW]

    """
    We add the inlet and outlet tubes. The states of the tube are defines as:

            inlet tube:
            __________________
     inlet.1                    inlet.2
            __________________


            outlet tube:
            __________________
    outlet.2                   outlet.1
            __________________
    """
    #Add the inlet tube
    expander.add_tube(Tube(key1 = 'inlet.1',
                           key2 = 'inlet.2',
                           L = 0.03,
                           ID = 0.01,
                           mdot = mdot_guess,
                           State1 = inletState.copy(),
                           fixed = 1,
                           TubeFcn = expander.TubeCode)
                      )

    #Add the outlet tube
    expander.add_tube(Tube(key1 = 'outlet.1',
                           key2 = 'outlet.2',
                           L = 0.03,
                           ID = 0.01,
                           mdot = mdot_guess,
                           State2 = outletState.copy(),
                           fixed = 2,
                           TubeFcn = expander.TubeCode)
                      )

    # We define flow paths to connect the nodes of the tubes with the suction or discharge states
    expander.add_flow(FlowPath(key1='inlet.2',key2='A',MdotFcn=expander.Suction))
    expander.add_flow(FlowPath(key1='outlet.1',key2='A',MdotFcn=expander.Discharge))

    # We connect together the energy balance of the expander shell
    t1=default_timer()
    expander.connect_callbacks(step_callback = expander.step_callback,
                               endcycle_callback=expander.endcycle_callback, # Provided by PDSimCore
                               heat_transfer_callback=expander.heat_transfer_callback,
                               lumps_energy_balance_callback = expander.lump_energy_balance_callback)

    # We choose the solver and the integration options
    expander.EulerN = 5000
    expander.solve(key_inlet='inlet.1',
                   key_outlet='outlet.2',
                   solver_method = 'Euler',
                   OneCycle = False,
                   eps_cycle = 1.1e-5,
                   UseNR = True,
                   plot_every_cycle = False,
                   eps_energy_balance = 1e-3
                   )

    print('time taken',default_timer()-t1,'s')

    return expander
[6]:
#Finally, we can run the piston expander model and have access to the variables for plotting
piston = Expander()

#We plot out the PV diagram
p = piston.p.T     #[kPa]
V = piston.V.T*1e6 #[cm^3]

plt.plot(V,p, 'b-',lw = 2)
plt.plot([0,100],[piston.inlet_state.p,piston.inlet_state.p],'k--',lw = 2)
plt.plot([0,100],[piston.outlet_state.p,piston.outlet_state.p],'k--',lw = 2)
plt.xlabel(r'V [cm$^3$]',fontsize = 10)
plt.ylabel(r'p [kPa]',fontsize = 10)
plt.xlim(0,30)
lb = plt.ylim(0,600)

Elapsed time for cycle is 0.272712 s
Running single-lump analysis
New outlet T: 200.0 K
===========
|| # 000 ||
===========
||.............|..........@.........................|| energy balance kW  [0.03972586636124382]  Tlumps:  [201.35118811149215] K
||.............|.......................@............|| discharge state 2.0967804404036485 h_pump_set:  186.27746076986546 kJ/kg 207.24526517390194 kJ/kg
||.................................@................|| cycle-cycle     0.623900308505571
||..................................|............@..|| mdot [%] 60.775820550335816 || in: 0.6225160844691532 g/s || out: 1.0008553428631026 g/s
Elapsed time for cycle is 0.224009 s
Running single-lump analysis
New outlet T: 200.0 K
===========
|| # 001 ||
===========
||.............|..........@.........................|| energy balance kW  [0.039178140663835265]  Tlumps:  [269.005356433448] K
||.............|......................@.............|| discharge state 1.7689965935385148 h_pump_set:  189.48566529554114 kJ/kg 207.17563123092629 kJ/kg
||........................@.........................|| cycle-cycle     0.03355234537243069
||..................................|.@.............|| mdot [%] 1.9208001292969623 || in: 0.9685999240278232 g/s || out: 0.9872047926209199 g/s
Elapsed time for cycle is 0.228561 s
Running single-lump analysis
New outlet T: 200.0 K
===========
|| # 002 ||
===========
||.............|......@.............................|| energy balance kW  [0.01175344219915043]  Tlumps:  [289.3016069300344] K
||.............|.....................@..............|| discharge state 1.1243627815765536 h_pump_set:  192.3746567988569 kJ/kg 203.61828461462244 kJ/kg
||.......................@..........................|| cycle-cycle     0.026213159006432833
||..................................|@..............|| mdot [%] 1.426653068348993 || in: 0.9622846992977097 g/s || out: 0.9760131634864933 g/s
Elapsed time for cycle is 0.211386 s
Running single-lump analysis
New outlet T: 200.0 K
===========
|| # 003 ||
===========
||.............|...@................................|| energy balance kW  [0.003526032659745138]  Tlumps:  [295.3904820790103] K
||.............|....................@...............|| discharge state 0.8555294905519191 h_pump_set:  193.9856046670554 kJ/kg 202.5408995725746 kJ/kg
||.....................@............................|| cycle-cycle     0.014440392870004896
||.................................@|...............|| mdot [%] 0.775941181940154 || in: 0.9622083915163047 g/s || out: 0.9696745626821636 g/s
Elapsed time for cycle is 0.210754 s
Running single-lump analysis
New outlet T: 200.0 K
===========
|| # 004 ||
===========
||.............@....................................|| energy balance kW  [0.0010578097979235368]  Tlumps:  [297.2171446237031] K
||.............|...................@................|| discharge state 0.7440455471674995 h_pump_set:  194.77338500791063 kJ/kg 202.21384047958563 kJ/kg
||...................@..............................|| cycle-cycle     0.007012317944709847
||...............................@..|...............|| mdot [%] 0.37399565338931406 || in: 0.9629643569764481 g/s || out: 0.9665658018152284 g/s
Elapsed time for cycle is 0.212157 s
Running single-lump analysis
New outlet T: 200.0 K
===========
|| # 005 ||
===========
||.........@...|....................................|| energy balance kW  [0.0003173429393770518]  Tlumps:  [297.7651433871109] K
||.............|...................@................|| discharge state 0.6981142376949748 h_pump_set:  195.13321187120835 kJ/kg 202.1143542481581 kJ/kg
||................@.................................|| cycle-cycle     0.003192188830013153
||.............................@....|...............|| mdot [%] 0.16963228793236418 || in: 0.9635082365474729 g/s || out: 0.9651426576135451 g/s
Elapsed time for cycle is 0.215055 s
Running single-lump analysis
New outlet T: 200.0 K
===========
|| # 006 ||
===========
||.....@.......|....................................|| energy balance kW  [9.520288181312015e-05]  Tlumps:  [297.92954301613327] K
||.............|...................@................|| discharge state 0.6792718100344332 h_pump_set:  195.2912718276764 kJ/kg 202.08398992802074 kJ/kg
||..............@...................................|| cycle-cycle     0.0014001541290797068
||..........................@.......|...............|| mdot [%] 0.07428240721296664 || in: 0.9638002552653164 g/s || out: 0.9645161892956521 g/s
Elapsed time for cycle is 0.263224 s
Running single-lump analysis
New outlet T: 200.0 K
===========
|| # 007 ||
===========
||..@..........|....................................|| energy balance kW  [2.8560864543940657e-05]  Tlumps:  [297.97886290483996] K
||.............|...................@................|| discharge state 0.6715608598077409 h_pump_set:  195.35906712009842 kJ/kg 202.07467571817583 kJ/kg
||...........@......................................|| cycle-cycle     0.0006001958927776068
||........................@.........|...............|| mdot [%] 0.03182032891992925 || in: 0.9639402582284005 g/s || out: 0.9642469871891604 g/s
Elapsed time for cycle is 0.210884 s
Running single-lump analysis
New outlet T: 200.0 K
===========
|| # 008 ||
===========
|@.............|....................................|| energy balance kW  [8.568259363191414e-06]  Tlumps:  [297.993658871452] K
||.............|...................@................|| discharge state 0.668409424757229 h_pump_set:  195.38770461741845 kJ/kg 202.07179886499074 kJ/kg
||.........@........................................|| cycle-cycle     0.00025347356130787403
||.....................@............|...............|| mdot [%] 0.013434666077838386 || in: 0.964003593431028 g/s || out: 0.9641331040947838 g/s
Elapsed time for cycle is 0.213124 s
Running single-lump analysis
New outlet T: 200.0 K
===========
|| # 009 ||
===========
|@.............|....................................|| energy balance kW  [2.5704778089528157e-06]  Tlumps:  [297.9980976614356] K
||.............|...................@................|| discharge state 0.6671223662947257 h_pump_set:  195.3996786020745 kJ/kg 202.07090226502174 kJ/kg
||......@...........................................|| cycle-cycle     0.00010597600265626364
||..................@...............|...............|| mdot [%] 0.005616427176535765 || in: 0.9640312884974249 g/s || out: 0.9640854326127024 g/s
Elapsed time for cycle is 0.214775 s
Running single-lump analysis
New outlet T: 200.0 K
===========
|| # 010 ||
===========
|@.............|....................................|| energy balance kW  [7.711433426766277e-07]  Tlumps:  [297.9994292984307] K
||.............|...................@................|| discharge state 0.6665969397124002 h_pump_set:  195.404650225721 kJ/kg 202.07061962284502 kJ/kg
||...@..............................................|| cycle-cycle     4.400111385604077e-05
||...............@..................|...............|| mdot [%] 0.0023318724528875734 || in: 0.9640431421325111 g/s || out: 0.9640656223889764 g/s
Elapsed time for cycle is 0.213259 s
Running single-lump analysis
New outlet T: 200.0 K
===========
|| # 011 ||
===========
|@.............|....................................|| energy balance kW  [2.3134300279837984e-07]  Tlumps:  [297.9998287895292] K
||.............|...................@................|| discharge state 0.6663824927134897 h_pump_set:  195.4067043329895 kJ/kg 202.0705292601244 kJ/kg
||@.................................................|| cycle-cycle     1.817998182421929e-05
||.............@....................|...............|| mdot [%] 0.0009634610423248091 || in: 0.9640481440750914 g/s || out: 0.9640574323033889 g/s
Elapsed time for cycle is 0.211407 s
Running single-lump analysis
New outlet T: 200.0 K
===========
|| # 012 ||
===========
|@.............|....................................|| energy balance kW  [6.940290084181819e-08]  Tlumps:  [297.99994863685873] K
||.............|...................@................|| discharge state 0.6662949821490713 h_pump_set:  195.40755005809416 kJ/kg 202.07049987958487 kJ/kg
|@..................................................|| cycle-cycle     7.485248108934391e-06
||..........@.......................|...............|| mdot [%] 0.00039668880744692103 || in: 0.9640502344070153 g/s || out: 0.9640540586863934 g/s
Elapsed time for cycle is 0.269497 s
Running single-lump analysis
New outlet T: 200.0 K
===========
|| # 013 ||
===========
|@.............|....................................|| energy balance kW  [2.082087026406665e-08]  Tlumps:  [297.9999845910576] K
||.............|...................@................|| discharge state 0.6662592749413847 h_pump_set:  195.4078973893804 kJ/kg 202.07049013879424 kJ/kg
|@..................................................|| cycle-cycle     3.074163867072736e-06
||.......@..........................|...............|| mdot [%] 0.00016291998783390937 || in: 0.9640511020718987 g/s || out: 0.964052672703837 g/s
Elapsed time for cycle is 0.213681 s
Running single-lump analysis
New outlet T: 200.0 K
===========
|| # 014 ||
===========
|@.............|....................................|| energy balance kW  [6.246261076915756e-09]  Tlumps:  [297.9999953773173] K
||.............|...................@................|| discharge state 0.6662447062676109 h_pump_set:  195.40803977589454 kJ/kg 202.07048683857064 kJ/kg
|@..................................................|| cycle-cycle     1.2602507716239347e-06
||....@.............................|...............|| mdot [%] 6.678940438487047e-05 || in: 0.964051460502834 g/s || out: 0.9640521043870625 g/s
Elapsed time for cycle is 0.21727 s
Running single-lump analysis
[[207.24652935776777, np.float64(0.6662387624983694)]]
New outlet T: 204.8022033559183 K
===========
|| # 015 ||
===========
|@.............|....................................|| energy balance kW  [1.8738783161620103e-09]  Tlumps:  [297.9999986131952] K
||.............|...................@................|| discharge state 0.6662387624983694 h_pump_set:  195.40809806933063 kJ/kg 202.07048569431433 kJ/kg
|@..................................................|| cycle-cycle     5.159547960726496e-07
||..@...............................|...............|| mdot [%] 2.7344182251809457e-05 || in: 0.9640516080623037 g/s || out: 0.9640518716743325 g/s
Elapsed time for cycle is 0.214071 s
Running single-lump analysis
New outlet T: 204.8022033559183 K
===========
|| # 016 ||
===========
|@.............|....................................|| energy balance kW  [5.621634902401255e-10]  Tlumps:  [297.9999995839586] K
||.............|.....................@..............|| discharge state 1.1893799835637793 h_pump_set:  195.40837615413338 kJ/kg 207.30217598977117 kJ/kg
|@..................................................|| cycle-cycle     2.278860726750507e-06
||......@...........................|...............|| mdot [%] -0.00012650808303149574 || in: 0.9640516686594927 g/s || out: 0.9640504490562072 g/s
Elapsed time for cycle is 0.210253 s
Running single-lump analysis
[[207.24652935776777, np.float64(0.6662387624983694)], [212.2465293577677, np.float64(1.1893816268437065)]]
New outlet T: 196.6140801287183 K
===========
|| # 017 ||
===========
|@.............|....................................|| energy balance kW  [1.6864903785508228e-10]  Tlumps:  [297.9999998751876] K
||.............|.....................@..............|| discharge state 1.1893816268437065 h_pump_set:  195.40835830782572 kJ/kg 207.3021745762628 kJ/kg
|@..................................................|| cycle-cycle     1.5760008116849993e-07
|@..................................|...............|| mdot [%] -8.34661763038369e-06 || in: 0.9640506008538878 g/s || out: 0.9640505203882704 g/s
Elapsed time for cycle is 0.210077 s
Running single-lump analysis
New outlet T: 196.6140801287183 K
===========
|| # 018 ||
===========
|@.............|....................................|| energy balance kW  [5.0594702139569335e-11]  Tlumps:  [297.9999999625563] K
||.............|................@...................|| discharge state 0.29752558456960115 h_pump_set:  195.40791831960564 kJ/kg 198.38317416530165 kJ/kg
|@..................................................|| cycle-cycle     4.046315136633952e-06
||........@.........................|...............|| mdot [%] 0.00023094929502143202 || in: 0.9640505822432307 g/s || out: 0.9640528087112541 g/s
Elapsed time for cycle is 0.265189 s
Running single-lump analysis
[[207.24652935776777, np.float64(0.6662387624983694)], [212.2465293577677, np.float64(1.1893816268437065)], [203.7207873384335, np.float64(0.29752142424821104)]]
New outlet T: 194.56570539892692 K
===========
|| # 019 ||
===========
|@.............|....................................|| energy balance kW  [1.517841294610964e-11]  Tlumps:  [297.9999999887669] K
||.............|................@...................|| discharge state 0.29752142424821104 h_pump_set:  195.40796231807934 kJ/kg 198.38317656056145 kJ/kg
|@..................................................|| cycle-cycle     3.888499605556096e-07
||.@................................|...............|| mdot [%] 2.059859536274189e-05 || in: 0.9640524343272996 g/s || out: 0.9640526329085595 g/s
Elapsed time for cycle is 0.214084 s
Running single-lump analysis
New outlet T: 194.56570539892692 K
===========
|| # 020 ||
===========
|@.............|....................................|| energy balance kW  [4.553521579594053e-12]  Tlumps:  [297.99999999663004] K
||.............|............@.......................|| discharge state 0.07451847886640621 h_pump_set:  195.40787258449302 kJ/kg 196.15305737315708 kJ/kg
|@..................................................|| cycle-cycle     1.119204505270787e-06
||....@.............................|...............|| mdot [%] 6.671818189030176e-05 || in: 0.9640524802117266 g/s || out: 0.9640531234100137 g/s
Elapsed time for cycle is 0.211054 s
Running single-lump analysis
[[207.24652935776777, np.float64(0.6662387624983694)], [212.2465293577677, np.float64(1.1893816268437065)], [203.7207873384335, np.float64(0.29752142424821104)], [201.58766919308135, np.float64(0.0745166316724351)]]
New outlet T: 194.05237836076887 K
===========
|| # 021 ||
===========
|@.............|....................................|| energy balance kW  [1.3660679950724058e-12]  Tlumps:  [297.99999999898904] K
||.............|............@.......................|| discharge state 0.0745166316724351 h_pump_set:  195.40789158165745 kJ/kg 196.1530578983818 kJ/kg
|@..................................................|| cycle-cycle     1.6800245349230415e-07
|@..................................|...............|| mdot [%] 8.901401993277602e-06 || in: 0.9640529617020815 g/s || out: 0.964053047516311 g/s
Elapsed time for cycle is 0.209341 s
Running single-lump analysis
[[207.24652935776777, np.float64(0.6662387624983694)], [212.2465293577677, np.float64(1.1893816268437065)], [203.7207873384335, np.float64(0.29752142424821104)], [201.58766919308135, np.float64(0.0745166316724351)], [201.0530861332902, np.float64(0.01863830867557965)]]
New outlet T: 193.92396371164338 K
===========
|| # 022 ||
===========
|@.............|....................................|| energy balance kW  [4.09808877327532e-13]  Tlumps:  [297.9999999996967] K
||.............|........@...........................|| discharge state 0.01863830867557965 h_pump_set:  195.40787238343424 kJ/kg 195.59425547019003 kJ/kg
|@..................................................|| cycle-cycle     3.0069475063754486e-07
||@.................................|...............|| mdot [%] 1.8224667908128822e-05 || in: 0.9640529815580662 g/s || out: 0.9640531572535205 g/s
Elapsed time for cycle is 0.210016 s
Running single-lump analysis
[[207.24652935776777, np.float64(0.6662387624983694)], [212.2465293577677, np.float64(1.1893816268437065)], [203.7207873384335, np.float64(0.29752142424821104)], [201.58766919308135, np.float64(0.0745166316724351)], [201.0530861332902, np.float64(0.01863830867557965)], [200.91935282384097, np.float64(0.0046597462831869055)]]
New outlet T: 193.89185856955254 K
===========
|| # 023 ||
===========
|@.............|....................................|| energy balance kW  [1.2295418439244931e-13]  Tlumps:  [297.999999999909] K
||.............|....@...............................|| discharge state 0.0046597462831869055 h_pump_set:  195.40787172878382 kJ/kg 195.4544691916157 kJ/kg
|@..................................................|| cycle-cycle     1.0520025512532119e-07
|@..................................|...............|| mdot [%] 6.500015081734034e-06 || in: 0.9640531054677085 g/s || out: 0.9640531681313058 g/s
Elapsed time for cycle is 0.209456 s
Running single-lump analysis
[[207.24652935776777, np.float64(0.6662387624983694)], [212.2465293577677, np.float64(1.1893816268437065)], [203.7207873384335, np.float64(0.29752142424821104)], [201.58766919308135, np.float64(0.0745166316724351)], [201.0530861332902, np.float64(0.01863830867557965)], [200.91935282384097, np.float64(0.0046597462831869055)], [200.88591787855734, np.float64(0.0011648014431415276)]]
New outlet T: 193.88383352995007 K
===========
|| # 024 ||
===========
|@.............|....................................|| energy balance kW  [3.689086379541067e-14]  Tlumps:  [297.9999999999727] K
||.............@....................................|| discharge state 0.0011648014431415276 h_pump_set:  195.40787325580436 kJ/kg 195.41952127023578 kJ/kg
|@..................................................|| cycle-cycle     4.006502979101484e-08
|@..................................|...............|| mdot [%] 2.4180331736900484e-06 || in: 0.9640531407862519 g/s || out: 0.9640531640973767 g/s
Elapsed time for cycle is 0.211466 s
Running single-lump analysis
[[207.24652935776777, np.float64(0.6662387624983694)], [212.2465293577677, np.float64(1.1893816268437065)], [203.7207873384335, np.float64(0.29752142424821104)], [201.58766919308135, np.float64(0.0745166316724351)], [201.0530861332902, np.float64(0.01863830867557965)], [200.91935282384097, np.float64(0.0046597462831869055)], [200.88591787855734, np.float64(0.0011648014431415276)], [200.87756043495662, np.float64(0.00029113288851476685)]]
New outlet T: 193.88182789010096 K
===========
|| # 025 ||
===========
|@.............|....................................|| energy balance kW  [1.1060346422109382e-14]  Tlumps:  [297.9999999999918] K
||.........@...|....................................|| discharge state 0.00029113288851476685 h_pump_set:  195.40787432727137 kJ/kg 195.41078565615652 kJ/kg
|@..................................................|| cycle-cycle     1.5923792248298332e-08
|@..................................|...............|| mdot [%] 9.279804036310679e-07 || in: 0.9640531513877959 g/s || out: 0.9640531603340203 g/s
Ntheta is 5001
mdot*(h2-h1),P-v,Qamb -0.10363362908762777 -0.10899685540585434 1.1060346422109382e-14
Mass flow rate is 0.9640531513877959 g/s
Volumetric efficiency is 14.167325428689029 %
Adiabatic efficiency is 72.21501435925663 %
time taken 5.80403728100282 s
../_images/notebooks_PistonExpander_IJR_7_1.png