From 238cc19f175ceb2eebeecea58a318a74ee465578 Mon Sep 17 00:00:00 2001 From: Even Solbraa <41290109+EvenSol@users.noreply.github.com> Date: Fri, 20 Dec 2024 08:43:28 +0000 Subject: [PATCH] update database parameters --- src/main/resources/data/COMP.csv | 2 +- src/main/resources/data/INTER.csv | 1 + .../thermo/component/NewComponentTest.java | 23 +++++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/main/resources/data/COMP.csv b/src/main/resources/data/COMP.csv index f433187c98..704107d1ae 100644 --- a/src/main/resources/data/COMP.csv +++ b/src/main/resources/data/COMP.csv @@ -201,6 +201,6 @@ "1193","iso-butene","115-11-7","iso-butene","200","C4H8","56.10632","0.6172935303955316","144.94","40.098","0.193","-7.004207835999978","56.10632","239.80815347700002","Classic","-17600.0","26.8640196138","0.1741796183502","0.000192313455174","-3.28338017502e-07","1.30204440468e-10","pow10KPa","8.80956","866.25","-38.51","0.0","0.0","0.5","0.215","0.2728","0.0","3.82","132.0","1.4375","5920.0","6.7618898108400006e-06","132.4","617.2935303955315","132.95","-17600.0","1.0947338969965856e-05","6020.0","22077.0419048734","0.0","0.0","0.0","0.0","2.92","0.0","0.0","0.0","0.0","2.92","0.0","0.0","0.0","0.0","293.59","no","1","207.0","8.16976","solute","900.0","0","1A","1","0","0.0","0.0","0.0","0.0","0.0","1.0",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, "1194","formic acid","64-18-6","acid","1194","CH2O2","46.02538","1.0798472538295498","314.85","58.1","0.3222","101.0","46.02538","115.89999999999999","Classic","-378700.0","31.6697773782","0.0130370729664","0.000298239673026","-3.6666767718e-07","1.39017767856e-10","log","-8.54","0.76","-3.1","1.54","0.0","1.0","0.215","0.0","0.0","3.82","132.0","0.9398892","3","0.0","0.0","0.0","0.0","0.0","8.16976","0.0","0.0","0.0","0.0","0","0.0","900.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","207.0","0.0","1079.8472538295498","0.0236","281.44968","281.45","-378700.0","248.7","2.92","0.0","0.0","0.0","0.0","2.92","0.0","0.0","0.0","0.0","35301.34509746398","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0","1A","0.0","0.0","0.0155","41917.0","53663.0","3.0","0.3338","0.0","0.0","0.0",,"1","0.0","0.0","0.0","12780.0","1.199459866355532e-05","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","no","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0" "1195","hydrochloric acid","7647-01-0","acid","1195","ClH","36.46094","1.172170470366168","51.53000000000003","83.135","0.129","-84.97739239499998","36.46094","84.2459983151","Classic","-92173.0","31.819437654599998","-0.024411253972799998","7.3084101642e-05","-8.5722080538e-08","3.6500478522e-11","pow10KPa","9.2949","745.78","-14.27","0.0","0.0","1.0","0.215","0.2653","0.0","3.339","344.7","0.11206604","3","0.0","0.0","0.0","0.0","0.0","8.16976","0.0","0.0","0.0","0.0","0","0.0","900.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","207.0","0.0","1172.170470366168","0.138284046785","159.07","203.55","-92173.0","186.9","2.92","0.0","0.0","0.0","0.0","2.92","0.0","0.0","0.0","0.0","16627.718180817672","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0","1A","0.0","0.0","0.0155","41917","56336","3","0.3338","0.0","0.0","0.0",,"1","0.0","0.0","0.0","2100.0","1.496671323296127e-05","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","no","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0" -"1196","sulfuric acid",7664-93-9,"acid",1196,H2O4S,98.07848,1.5331460079326602,650.85,64.0,0.494,337.0,98.07848,177.70000000000002,Classic,-735120.0,37.978352,-0.07461815,0.0003018813,0,0,pow10KPa,0,0,0,0.0,0.0,2.72,0.215,0.0,0.0,3.82,132.0,1.0,0.0,0.1,273.15,1000.0,277.305,-735120.0,1.7320510171355052e-05,10810.0,64685.920056315335,0.0,0.0,0.0,0.0,2.92,0.0,0.0,0.0,0.0,2.92,0.0,0.0,0.0,0.0,298.78,no,1,207.0,8.16976,solute,900.0,0,1A,1,0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +"1196","sulfuric acid",7664-93-9,"acid",1196,H2O4S,98.07848,1.5331460079326602,650.85,64.0000000000000,0.481623142957687,337.0,298.07848,177.70000000000002,Classic,-735120.0,37.978352,-0.07461815,0.0003018813,0,0,pow10KPa,0,0,0,0.0,0.0,2.72,0.215,0.0,0.0,3.82,132.0,1.0,0.0,0.1,273.15,1000.0,277.305,-735120.0,1.7320510171355052e-05,10810.0,64685.920056315335,0.0,0.0,0.0,0.0,2.92,0.0,0.0,0.0,0.0,2.92,0.0,0.0,0.0,0.0,298.78,no,1,207.0,8.16976,solute,900.0,0,1A,1,0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 "1197","SO2",7446-09-5,"other",1197,O2S,64.0638,1.41228792396165,157.49,78.866,0.256,-10.01298464599995,64.0638,123.793018074,Classic,-296800.0,36.7249689366,-0.0185745031932,0.00019489093771199998,-2.71965980058e-07,1.15820425014e-10,pow10KPa,9.4072,999.9,-35.96,0.0,0.0,1.63,0.215,0.2661,0.0,3.98053,333.4,0.83,0.0,0.0166614361846,197.7,1412.28792396165,200.65,-296800.0,1.82731320279252e-05,10598.0,25151.060647470535,0.0,0.0,0.0,0.0,2.92,0.0,0.0,0.0,0.0,2.92,0.0,0.0,0.0,0.0,248.2,no,1,207.0,8.16976,solute,900.0,0,1A,1,0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 "1198","NO2",10102-44-0,"other",1198,NO2,46.0055,1.67105434446441,157.85000000000002,101.325,0.8555,21.150000000000034,46.0055,82.0,Classic,34017.0,37.978352,-0.07461815,0.0003018813,0,0,pow10KPa,0,0,0,0.0,0.0,0.32,0.215,0.0,0.0,3.82,132.0,0.7155,0.0,0.1,273.15,1000.0,263.85,34017.0,1.8297941576635817e-05,200,39011.743200547804,0.0,0.0,0.0,0.0,2.92,0.0,0.0,0.0,0.0,2.92,0.0,0.0,0.0,0.0,240.1,no,1,207.0,8.16976,solute,900.0,0,1A,1,0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 \ No newline at end of file diff --git a/src/main/resources/data/INTER.csv b/src/main/resources/data/INTER.csv index 080c75792f..164c3170a7 100644 --- a/src/main/resources/data/INTER.csv +++ b/src/main/resources/data/INTER.csv @@ -1364,3 +1364,4 @@ 8821,"nC10","nitrogen","Classic",0.079999998,0.000000000,0,0.079999998,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0,0.000000000,0.000000000,0.000000000,"Classic",0.500000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0,0.000000000,0.000000000 8822,"n-butane","water","HV",0.500000000,0.000000000,0,0.500000000,0.000000000,0.000000000,0.145000000,681.000000000,2507.000000000,0,0.000000000,0.000000000,0.000000000,"WS",0.520000000,0.145000000,681.000000000,2507.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0,0.000000000,0.000000000 8823,"ammonia","water","Classic",-0.078900000,0.000000000,0,-0.078900000,0.000000000,0.000000000,0.357000000,410.670000000,-169.630000000,0,0.000000000,0.000000000,0.000000000,"WS",0.093103947,0.303000000,-48.680000000,610.600000000,0.000000000,1.890000000,-1.110000000,0.000000000,0.000000000,-0.153000000,0.000000000,-0.153000000,-0.153000000,-0.153000000,0.000000000,0.000000000,0.000000000,0,0.000000000,0.000000000 +8824,"CO2","sulfuric acid","Classic",0.3012,0.000000000,0,0.3012,0.000000000,0.000000000,0.357000000,410.670000000,-169.630000000,0,0.000000000,0.000000000,0.000000000,"WS",0.093103947,0.303000000,-48.680000000,610.600000000,0.000000000,1.890000000,-1.110000000,0.000000000,0.000000000,-0.153000000,0.000000000,-0.153000000,-0.153000000,-0.153000000,0.000000000,0.000000000,0.000000000,0,0.000000000,0.000000000 diff --git a/src/test/java/neqsim/thermo/component/NewComponentTest.java b/src/test/java/neqsim/thermo/component/NewComponentTest.java index 2cd27faa34..06198ce051 100644 --- a/src/test/java/neqsim/thermo/component/NewComponentTest.java +++ b/src/test/java/neqsim/thermo/component/NewComponentTest.java @@ -9,6 +9,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemPrEos; import neqsim.thermo.system.SystemSrkEos; +import neqsim.thermodynamicoperations.ThermodynamicOperations; public class NewComponentTest extends neqsim.NeqSimTest { static SystemInterface thermoSystem = null; @@ -122,4 +123,26 @@ public void newComponentNO2() { thermoSystem.init(0); assertEquals(0.064063, thermoSystem.getMolarMass("kg/mol"), 0.01); } + + @Test + public void testComponentsulfuric_acid() { + thermoSystem = new SystemSrkEos(273.15 + 47.9, 118.6); + thermoSystem.addComponent("sulfuric acid", 1.0); + thermoSystem.addComponent("CO2", 1.0); + thermoSystem.createDatabase(true); + thermoSystem.setMixingRule("classic"); + // thermoSystem.setMultiPhaseCheck(true); + // ((PhaseEos) thermoSystem.getPhase(0)).getMixingRule().setBinaryInteractionParameter(0, 1, + // 0.3012); + // ((PhaseEos) thermoSystem.getPhase(1)).getMixingRule().setBinaryInteractionParameter(0, 1, + // 0.3012); + ThermodynamicOperations ops = new ThermodynamicOperations(thermoSystem); + try { + ops.TPflash(); + } catch (Exception e) { + System.out.println("error in bubble point flash"); + } + assertEquals(3.447289881042099E-6, + thermoSystem.getPhase(0).getComponent("sulfuric acid").getx(), 100e-9); + } }