@@ -43,6 +43,102 @@ void testRun() {
43
43
*/
44
44
}
45
45
46
+ @ Test
47
+ void testRunTransientRes2 () {
48
+ neqsim .thermo .system .SystemInterface fluid1 =
49
+ new neqsim .thermo .system .SystemPrEos (298.15 , 38.0 );
50
+ fluid1 .addComponent ("water" , 3.599 );
51
+ fluid1 .addComponent ("nitrogen" , 0.599 );
52
+ fluid1 .addComponent ("CO2" , 0.51 );
53
+ fluid1 .addComponent ("methane" , 99.8 );
54
+ fluid1 .setMixingRule (2 );
55
+ fluid1 .setMultiPhaseCheck (true );
56
+
57
+ double producxtionIndex = 10.000100751427403E-3 ;
58
+
59
+ neqsim .processSimulation .processEquipment .reservoir .SimpleReservoir reservoirOps =
60
+ new neqsim .processSimulation .processEquipment .reservoir .SimpleReservoir ("Well 1 reservoir" );
61
+ reservoirOps .setReservoirFluid (fluid1 .clone (), 700000000.0 , 1.0 , 10.0e7 );
62
+ reservoirOps .setLowPressureLimit (10.0 , "bara" );
63
+
64
+ StreamInterface producedGasStream = reservoirOps .addGasProducer ("SLP_A32566GI" );
65
+ producedGasStream .setFlowRate (9.0 , "MSm3/day" );
66
+
67
+ neqsim .processSimulation .processEquipment .reservoir .WellFlow wellflow =
68
+ new neqsim .processSimulation .processEquipment .reservoir .WellFlow ("well flow unit" );
69
+ wellflow .setInletStream (producedGasStream );
70
+ wellflow .setWellProductionIndex (producxtionIndex );
71
+
72
+ neqsim .processSimulation .processEquipment .pipeline .PipeBeggsAndBrills pipe =
73
+ new neqsim .processSimulation .processEquipment .pipeline .PipeBeggsAndBrills (
74
+ wellflow .getOutletStream ());
75
+ pipe .setPipeWallRoughness (5e-6 );
76
+ pipe .setLength (170.0 );
77
+ pipe .setElevation (170 );
78
+ pipe .setDiameter (0.625 );
79
+
80
+ neqsim .processSimulation .processEquipment .compressor .Compressor compressor =
81
+ new neqsim .processSimulation .processEquipment .compressor .Compressor ("subcomp" );
82
+ compressor .setInletStream (pipe .getOutletStream ());
83
+ compressor .setUsePolytropicCalc (true );
84
+ compressor .setPolytropicEfficiency (0.6 );
85
+ compressor .setCompressionRatio (2.0 );
86
+
87
+ neqsim .processSimulation .processEquipment .heatExchanger .Cooler intercooler =
88
+ new neqsim .processSimulation .processEquipment .heatExchanger .Cooler (
89
+ compressor .getOutletStream ());
90
+ intercooler .setOutTemperature (25.0 , "C" );
91
+
92
+ neqsim .processSimulation .processEquipment .compressor .Compressor compressor2 =
93
+ new neqsim .processSimulation .processEquipment .compressor .Compressor ("subcomp2" );
94
+ compressor2 .setInletStream (intercooler .getOutletStream ());
95
+ compressor2 .setUsePolytropicCalc (true );
96
+ compressor2 .setPolytropicEfficiency (0.6 );
97
+ compressor2 .setCompressionRatio (2.0 );
98
+
99
+
100
+ neqsim .processSimulation .processEquipment .heatExchanger .Heater cooler1 =
101
+ new neqsim .processSimulation .processEquipment .heatExchanger .Heater ("cooler 1" ,
102
+ compressor2 .getOutletStream ());
103
+ cooler1 .setOutTemperature (30.0 , "C" );
104
+
105
+ neqsim .processSimulation .processEquipment .pipeline .PipeBeggsAndBrills pipeline =
106
+ new neqsim .processSimulation .processEquipment .pipeline .PipeBeggsAndBrills (
107
+ cooler1 .getOutletStream ());
108
+ pipeline .setPipeWallRoughness (50e-6 );
109
+ pipeline .setLength (50 * 1e3 );
110
+ pipeline .setElevation (0 );
111
+ pipeline .setDiameter (17.0 * 0.0254 );
112
+ double richgas_inlet_pressure = 150.0 ;
113
+ double max_gas_production = 9.0 ;
114
+
115
+ neqsim .processSimulation .processEquipment .util .Adjuster adjuster =
116
+ new neqsim .processSimulation .processEquipment .util .Adjuster ("adjuster" );
117
+ adjuster .setTargetVariable (pipeline .getOutletStream (), "pressure" , richgas_inlet_pressure ,
118
+ "bara" );
119
+ adjuster .setAdjustedVariable (producedGasStream , "flow" , "MSm3/day" );
120
+ adjuster .setMaxAdjustedValue (max_gas_production );
121
+ adjuster .setMinAdjustedValue (1.0 );
122
+
123
+
124
+ neqsim .processSimulation .processSystem .ProcessSystem process =
125
+ new neqsim .processSimulation .processSystem .ProcessSystem ();
126
+ process .add (reservoirOps );
127
+ process .add (wellflow );
128
+ process .add (pipe );
129
+ process .add (compressor );
130
+ process .add (intercooler );
131
+ process .add (compressor2 );
132
+ process .add (cooler1 );
133
+ process .add (pipeline );
134
+ process .add (adjuster );
135
+ process .run ();
136
+
137
+ System .out
138
+ .println ("gas production " + reservoirOps .getGasProdution ("Sm3/day" ) / 1e6 + " MSm3/day" );
139
+
140
+ }
141
+
46
142
@ Test
47
143
void testRunTransient () {
48
144
neqsim .thermo .system .SystemInterface fluid1 =
0 commit comments