9999 }
100100 ],
101101 "source" : [
102- " # Create reference fluid at standard conditions (15°C = 288.15 K, 1.01325 bara)\n " ,
102+ " # Create reference fluid at standard conditions (15\u00b0 C = 288.15 K, 1.01325 bara)\n " ,
103103 " reference_fluid = SystemSrkEos(288.15, 1.01325)\n " ,
104104 " \n " ,
105105 " # Add components (typical light oil composition)\n " ,
531531 " \n " ,
532532 " ax1.plot(valid_rates, bhps, 'o-', linewidth=2, markersize=8, label=f'GOR={gor:.0f}')\n " ,
533533 " \n " ,
534- " ax1.set_xlabel('Liquid Rate (m³ /h)', fontsize=12)\n " ,
534+ " ax1.set_xlabel('Liquid Rate (m\u00b3 /h)', fontsize=12)\n " ,
535535 " ax1.set_ylabel('Bottom Hole Pressure (bara)', fontsize=12)\n " ,
536536 " ax1.set_title(f'VFP Curves at THP={target_thp} bara, WC=0%', fontsize=14)\n " ,
537537 " ax1.legend(fontsize=10)\n " ,
565565 " \n " ,
566566 " ax2.plot(valid_rates, bhps, 's-', linewidth=2, markersize=8, label=f'WC={wc*100:.0f}%')\n " ,
567567 " \n " ,
568- " ax2.set_xlabel('Liquid Rate (m³ /h)', fontsize=12)\n " ,
568+ " ax2.set_xlabel('Liquid Rate (m\u00b3 /h)', fontsize=12)\n " ,
569569 " ax2.set_ylabel('Bottom Hole Pressure (bara)', fontsize=12)\n " ,
570570 " ax2.set_title(f'VFP Curves at THP={target_thp} bara, GOR={fixed_gor}', fontsize=14)\n " ,
571571 " ax2.legend(fontsize=10)\n " ,
666666 " ax1.set_xticklabels([f'{g:.0f}' for g in gor_values])\n " ,
667667 " ax1.set_yticks(range(len(wc_values)))\n " ,
668668 " ax1.set_yticklabels([f'{w*100:.0f}%' for w in wc_values])\n " ,
669- " ax1.set_xlabel('GOR (Sm³ /Sm³ )', fontsize=12)\n " ,
669+ " ax1.set_xlabel('GOR (Sm\u00b3 /Sm\u00b3 )', fontsize=12)\n " ,
670670 " ax1.set_ylabel('Water Cut', fontsize=12)\n " ,
671- " ax1.set_title(f'VFP Feasibility (BHP ≤ {max_bhp} bara)\\ nRate={test_rate} m³ /h, THP={target_thp} bara', fontsize=14)\n " ,
671+ " ax1.set_title(f'VFP Feasibility (BHP \u2264 {max_bhp} bara)\\ nRate={test_rate} m\u00b3 /h, THP={target_thp} bara', fontsize=14)\n " ,
672672 " cbar1 = plt.colorbar(im1, ax=ax1, ticks=[0, 1])\n " ,
673673 " cbar1.set_ticklabels(['Infeasible', 'Feasible'])\n " ,
674674 " \n " ,
675675 " # Add text annotations\n " ,
676676 " for i in range(len(wc_values)):\n " ,
677677 " for j in range(len(gor_values)):\n " ,
678- " text = '✓ ' if feasibility[i, j] == 1 else '✗ '\n " ,
678+ " text = '\u2713 ' if feasibility[i, j] == 1 else '\u2717 '\n " ,
679679 " color = 'white' if feasibility[i, j] == 1 else 'red'\n " ,
680680 " ax1.text(j, i, text, ha='center', va='center', color=color, fontsize=16, fontweight='bold')\n " ,
681681 " \n " ,
686686 " ax2.set_xticklabels([f'{g:.0f}' for g in gor_values])\n " ,
687687 " ax2.set_yticks(range(len(wc_values)))\n " ,
688688 " ax2.set_yticklabels([f'{w*100:.0f}%' for w in wc_values])\n " ,
689- " ax2.set_xlabel('GOR (Sm³ /Sm³ )', fontsize=12)\n " ,
689+ " ax2.set_xlabel('GOR (Sm\u00b3 /Sm\u00b3 )', fontsize=12)\n " ,
690690 " ax2.set_ylabel('Water Cut', fontsize=12)\n " ,
691- " ax2.set_title(f'Required BHP (bara)\\ nRate={test_rate} m³ /h, THP={target_thp} bara', fontsize=14)\n " ,
691+ " ax2.set_title(f'Required BHP (bara)\\ nRate={test_rate} m\u00b3 /h, THP={target_thp} bara', fontsize=14)\n " ,
692692 " cbar2 = plt.colorbar(im2, ax=ax2)\n " ,
693693 " cbar2.set_label('BHP (bara)')\n " ,
694694 " \n " ,
734734 " import neqsim.process.util.optimizer.*;\n " ,
735735 " \n " ,
736736 " // 1. Create fluid input (using convenience methods)\n " ,
737- " FluidMagicInput fluidInput = FluidMagicInput.fromFluid(referenceFluid, 120.0, 0.0 );\n " ,
737+ " FluidMagicInput fluidInput = FluidMagicInput.fromFluid(referenceFluid);\n " ,
738738 " fluidInput.setGORRange(80.0, 350.0, 5); // min, max, count\n " ,
739739 " fluidInput.setWaterCutRange(0.0, 0.6, 4); // min, max, count\n " ,
740740 " \n " ,
741741 " // 2. Define process factory (well model)\n " ,
742- " ProcessFactory wellFactory = (fluid, rate ) -> {\n " ,
742+ " Supplier<ProcessSystem> wellFactory = () -> {\n " ,
743743 " ProcessSystem process = new ProcessSystem();\n " ,
744744 " \n " ,
745+ " SystemInterface fluid = referenceFluid.clone();\n " ,
745746 " Stream wellhead = new Stream(\" wellhead\" , fluid);\n " ,
746- " wellhead.setFlowRate(rate , \" m3/hr\" );\n " ,
747+ " wellhead.setFlowRate(100.0 , \" m3/hr\" );\n " ,
747748 " process.add(wellhead);\n " ,
748749 " \n " ,
749750 " AdiabaticPipe tubing = new AdiabaticPipe(\" tubing\" , wellhead);\n " ,
772773 " VFPTable table = vfpGen.generateVFPTable();\n " ,
773774 " vfpGen.exportVFPEXP(\" WELL_A_VFP.inc\" , 1);\n " ,
774775 " \n " ,
775- " double coverage = 100.0 * table.getFeasibleCount() / table.getTotalCount ();\n " ,
776- " System.out.println(\" Feasible: \" + table.getFeasibleCount() + \" / \" + table.getTotalCount ());\n " ,
776+ " double coverage = 100.0 * table.getFeasibleCount() / table.getTotalPoints ();\n " ,
777+ " System.out.println(\" Feasible: \" + table.getFeasibleCount() + \" / \" + table.getTotalPoints ());\n " ,
777778 " System.out.println(\" Coverage: \" + String.format(\" %.1f\" , coverage) + \" %\" );\n " ,
778779 " \n " ,
779780 " if (coverage < 50.0) {\n " ,
841842 },
842843 "nbformat" : 4 ,
843844 "nbformat_minor" : 5
844- }
845+ }
0 commit comments