Pressure Changers

Valve

A Valve is used to simulate the pressure manipulation process of a material stream.

The valve model has two material streams connection ports as:

  • feed stream
  • outlet stream

To simulate a valve, one of the following variables must be provided:

  • Outlet Pressure Pout
  • Pressure Drop Pdel

These variables are declared of type Real. During simulation, value of one of these variables need to be defined in the equation section.

Simulating a Valve

  1. Create a package named Valve

  2. Create a model named MS inside Valve. This is to extend MaterialStream model

  3. Extend the model MaterialStream and necessary property method from ThermodynamicPackages

    extends Simulator.Streams.MaterialStreams;
    extends Simulator.Files.ThermodynamicPackages.RaoultsLaw;
    
  4. Create another new model named ValveSimulation

  5. Similar to the MaterialStream example model, import ChemsepDatabase and create variables for the compounds which are to be used from ChemsepDatabase

    import data = Simulator.Files.ChemsepDatabase;
    parameter data.Ethanol eth;
    parameter data.Methanol meth;
    parameter data.Water wat;
    
  6. Define variables for Number of components Nc and component array of size Nc C[Nc]. Also assign the variables created for the compounds to the component array

    parameter Integer Nc = 3;
    parameter data.GeneralProperties C[Nc] = {meth, eth, wat};
    
  7. Now, create two instances of the MaterialStream model MS as one material stream instance will act as input and the other one will act as output. To do this, open diagram view of ValveSimulation model, drag & drop MS twice. Name the instances as S1 and S2.

    ../_images/valve-ms-drop.png
  8. Now, Drag and drop the Valve model available under UnitOperations. Name the instance as B1

    ../_images/valve-drop.png
  9. Now double click on S1. Component Parameters window opens. Go to Stream Specifications tab. There are two parameters C and ``Nc for which the values are to be entered. As the value for Nc and C are already declared earlier in step 6 while defining the variables, these variables are directly passed here instead of the values. Repeat this for remaining output instance as well.

    ../_images/valve-in-par.png
  10. Now double click on B1. Component Parameters window opens. Go to Valve Specifications tab. Similar to material stream instance, there are two parameters available here C and Nc. Therefore repeat the same step as material stream instances.

    ../_images/valve-par.png
  11. Switch to text view, following lines of code will be autogenerated

    MS S1(Nc = Nc, C = C) annotation( ...);
    MS S2(Nc = Nc, C = C) annotation( ...);
    Simulator.UnitOperations.Valve B1(Nc = Nc, C = C) annotation( ...);
    
  12. Now, connect the streams with unit operations. For this, switch back to Diagram view.

    ../_images/valve-connected.png
  13. Switch to text view. Following lines of code will be autogenrated under equation section

    connect(B1.Out, S2.In) annotation( ...);
    connect(S1.Out, B1.In) annotation( ...);
    
  14. Specify the pressure, temperature, component mole fractions and molar flow rate for the inlet material stream

    S1.x_pc[1, :] = {0.33, 0.33, 0.34};
    S1.P = 202650;
    S1.T = 372;
    S1.F_p[1] = 100;
    
  15. Now specify the one of the calculation variables for the valve as mentioned earlier. Here, pressure drop Pdel is specified

    B1.Pdel = 101325;
    
  1. This completes the Valve package. Now click on Simulate button to simulate the ValveSimulation model. Switch to Plotting Perspective to view the results.

Note

You can also find this package named Valve in the Simulator library under Examples package.

Centrifugal Pump

A Centrifugal Pump is generally used to provide energy to a liquid material stream. The energy supplied is in form of pressure.

The centrifugal pump model have following connection ports:

  • Two Material Streams:

    • feed stream
    • outlet stream
  • One Energy Stream:

    • power required

To simulate a centrifugal pump, Efficiency Eff of the pump should be provided as calculation parameter. The variable Eff is defined as of type parameter Real. During simulation, its value can specified directly under Pump Specifications by double clicking on the pump model instance.

Additionally one of the following input variables must be defined:

  • Outlet Pressure Pout
  • Pressure Increase Pdel
  • Power Required Q

These variables are declared of type Real. During simulation, value of one of these variables need to be defined in the equation section.

Simulating a Centrifugal Pump

  1. Create a package named Pump

  2. Create a model named MS inside Pump. This is to extend MaterialStream model.

  3. Extend the model MaterialStream and necessary property method from ThermodynamicPackages

    extends Simulator.Streams.MaterialStreams;
    extends Simulator.Files.ThermodynamicPackages.RaoultsLaw;
    
  4. Create another new model named PumpSimulation

  5. Similar to the MaterialStream example model, import ChemsepDatabase and create variables for the compounds which are to be used from ChemsepDatabase

    import data = Simulator.Files.ChemsepDatabase;
    parameter data.Benzene benz;
    parameter data.Toluene tol;
    
  6. Define variables for Number of components Nc and component array of size Nc C[Nc]. Also assign the variables created for the compounds to the component array

    parameter Integer Nc = 2;
    parameter data.GeneralProperties C[Nc] = {benz, tol};
    
  7. Now, create two instances of the MaterialStream model MS as one material stream instance will act as input and the other one will act as output.

    To do this, open diagram view of PumpSimulation model, drag & drop MS twice. Name the instances as S1 and S2.

  8. Now, Drag and drop the EnergyStream model available under Streams. Name the instance as E1.

    ../_images/pump-ms-drop.png
  9. Now, Drag and drop the CentrifugalPump model available under UnitOperations. Name the instance as B1

    ../_images/pump-drop.png
  10. Now double click on S1. Component Parameters window opens. Go to Stream Specifications tab. There are two parameters C and ``Nc for which the values are to be entered. As the value for Nc and C are already declared earlier in step 6 while defining the variables, these variables are directly passed here instead of the values. Repeat this for remaining output instance as well.

    ../_images/pump-in-par.png
  11. Now double click on B1. Component Parameters window opens. Go to Pump Specifications tab and enter the values for parameters as mentioned below:

    • Nc and C can be entered same as material stream
      • Eff represents the efficiency of the pump. Enter the value of Eff as 0.75.

        ../_images/pump-par.png
  12. Switch to text view, following lines of code will be autogenerated

    Simulator.Examples.Pump.MS S1(Nc = Nc, C = C) annotation( ...);
    Simulator.UnitOperations.CentrifugalPump B1(C = C, Nc = Nc, Eff = 0.75) annotation( ...);
    Simulator.Examples.Pump.MS S2(Nc = Nc, C = C) annotation( ...);
    Simulator.Streams.EnergyStream E1 annotation( ...);
    
  1. Now, connect the streams with unit operations. For this, switch back to Diagram view.

    ../_images/pump-connected.png
  2. Switch to text view. Following lines of code will be autogenrated under equation section

    connect(E1.Out, B1.En) annotation( ...);
    connect(B1.Out, S2.In) annotation( ...);
    connect(S1.Out, B1.In) annotation( ...);
    
  3. Specify the pressure, temperature, component mole fractions and molar flow rate for the inlet material stream

    S1.F_p[1] = 100;
    S1.x_pc[1, :] = {0.5, 0.5};
    S1.P = 101325;
    S1.T = 300;
    
  4. Now specify the one of the calculation variables for the pump as mentioned earlier. Here, pressure drop Pdel is specified

    B1.Pdel = 101325;
    
  1. This completes the Pump package. Now click on Simulate button to simulate the PumpSimulation model. Switch to Plotting Perspective to view the results.

Note

You can also find this package named Pump in the Simulator library under Examples package.

Compressor

The Adiabatic Compressor is generally used to provide energy to a vapor material stream. The energy supplied is in form of pressure.

The adiabatic compressor model have following connection ports:

  • Two Material Streams:

    • feed stream
    • outlet stream
  • One Energy Stream:

    • power required

To simulate an adiabatic compressor, Efficiency Eff of the compressor should be provided as calculation parameter. The variable Eff is defined as of type parameter Real. During simulation, its value can specified directly under Compressor Specifications by double clicking on the compressor model instance.

Additionally one of the following input variables must be defined:

  • Outlet Pressure Pout
  • Pressure Increase Pdel
  • Power Required Q

These variables are declared of type Real. During simulation, value of one of these variables need to be defined in the equation section.

Simulating a Adiabatic Compressor

Expander

Simulating a Adiabatic Expander