Replies: 1 comment 1 reply
-
Hi. A simplification can be to assume the ions to be only Na+ and Cl-. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using Electrolyte-CPA-EoS for hydrate Equilibrium calculations. Trying to optimize MeOH fraction to inhibit hydrate formation for a given gas composition. Trying to update fluid composition in a loop with "fluidComposition". It works fine if no ions are present. When I added ions (Na, Cl etc.) I had the following error. Is there a work around? Appreciate any help.
Error:
fluidComposition(fluid1, fluidcomposition)
File "C:\Users\mcinar\anaconda3\Lib\site-packages\neqsim\thermo\thermoTools.py", line 1040, in fluidComposition
testSystem.setMolarComposition(JDouble:)
java.lang.java.lang.ArrayIndexOutOfBoundsException: java.lang.ArrayIndexOutOfBoundsException: Index 22 out of bounds for length 22
Relevant section of the Python code:
fluidcomposition = [nitrogen,methane,ethane,propane,ibutane,nbutane,ipentane,npentane,hexane, WaterMolRate,MeOHCo,Sodium, Chloride,Magnesium,Calcium,Barium,Potassium,Iron,Hydroxyl,Sulfate,Carbonate,Bicarbonate]
fluidComposition(fluid1, fluidcomposition)
hydt(fluid1)
HydrTemp = fluid1.getTemperature()
Beta Was this translation helpful? Give feedback.
All reactions