Commit Graph

1085 Commits

Author SHA1 Message Date
Kai Bao
851366ba50 wip in updating the derivatives after the two phase solution
it will be a very draft way to do it first, hopefully the results are
okay.

Then looking for better refactorization.
2022-06-08 08:46:52 +02:00
Kai Bao
76ad99e458 using different forms of flash equations have better convergence
it is the fugacity coefficient equations. It begins with bigger
residual, while converges faster.

origionally,
 newton residual is 24.7536
 newton residual is 11.0045
 newton residual is 5.2655
 newton residual is 2.4048
 newton residual is 0.995777
 newton residual is 0.331732
 newton residual is 0.0663179
 newton residual is 0.00393044
 newton residual is 1.84752e-05
 newton residual is 1.55499e-08
 newton residual is 1.67839e-11

new form,
 newton residual is 694053
 newton residual is 5950.39
 newton residual is 52.1553
 newton residual is 0.470124
 newton residual is 0.00430846
 newton residual is 3.91461e-05
 newton residual is 3.55269e-07
 newton residual is 4.00957e-09
2022-06-08 08:46:52 +02:00
Kai Bao
55145f8eaf first version of the assembleNewton_ for flash calculation 2022-06-08 08:46:52 +02:00
Kai Bao
e09cf63063 cleaning up a little bit. 2022-06-08 08:46:52 +02:00
Kai Bao
a216d61377 WIP in getting the derivatives correct after flash calculation 2022-06-08 08:46:52 +02:00
Kai Bao
3368256ecc some refactoring for the Newton flash solver. 2022-06-08 08:46:52 +02:00
Kai Bao
6066a8dfa7 moving the two phase flash solver to its own function 2022-06-08 08:46:52 +02:00
Kai Bao
082f9bd2fd the newton solver for ChiFlash look working
while we need more checking.
2022-06-08 08:46:52 +02:00
Kai Bao
bb31ccb8af WIP in finishing the newton solver.
commiting for saving.
2022-06-08 08:46:52 +02:00
Kai Bao
30c0ce7fac making the types for LBCJulia more proper
We will need to handle AD type with this function.
2022-06-08 08:46:52 +02:00
Kai Bao
bb86f443c7 adding a LBC viscosity function translated from Julia code
to make sure we get the same viscosity
2022-06-08 08:46:52 +02:00
Kai Bao
e33600e6b7 adding compressFactor to FluidStateCompositionModules 2022-06-08 08:46:52 +02:00
Kai Bao
ec7a73a118 bug fixes. 2022-06-08 08:46:52 +02:00
Kai Bao
8b9b155d2b making the test_chiflash based on AD 2022-06-08 08:46:52 +02:00
Kai Bao
109a249ad7 small cleaning up. 2022-06-08 08:46:52 +02:00
Kai Bao
ef9a9f9c7b making test_chiflash_scalar to be CO2, C10, C1 test 2022-06-08 08:46:52 +02:00
Kai Bao
61e2f5817d WIP in creating the julia three component system. 2022-06-08 08:46:52 +02:00
Kai Bao
e685864c1f further cleaning up 2022-06-08 08:46:52 +02:00
Kai Bao
a6b04e8cf0 adding the CO2, C1, C10 component with exact Julia properties 2022-06-08 08:46:52 +02:00
Kai Bao
185e02e40d some cleaning up, no functionality change 2022-06-08 08:46:52 +02:00
Kai Bao
280cd720db removing the tempalte parameter Evaluation for ChiFlash 2022-06-08 08:46:52 +02:00
Kai Bao
62b0a03203 adding the spe5 using chiflash
to compile, you need to change the function name criticalMolarVolume to
criticalVolume in Spe5FluidSystem.

And the commented out code in PengRobinson.hpp looks like needed for
spe5 flash.
2022-06-08 08:46:52 +02:00
Kai Bao
e6c029871f remvoing unused types for clarity. 2022-06-08 08:46:52 +02:00
hnil
71d7422756 fixed it 2022-06-08 08:46:52 +02:00
hnil
79603f2bfd added a scalar test 2022-06-08 08:46:52 +02:00
Kai Bao
6abcbf60e2 some small changes, not functionality change. 2022-06-08 08:46:52 +02:00
Kai Bao
e7da7cdad6 compiled and running now. 2022-06-08 08:46:52 +02:00
Kai Bao
c6064aa3e9 using the same types from the co2-compositional
it compiles now. Not sure why the running is terminated due to NaN.
2022-06-08 08:46:52 +02:00
Kai Bao
c4a708e500 continuing WIP for the test_chiflash
not compiled but reproducing the same compilation error with much
smaller code.
2022-06-08 08:46:52 +02:00
Kai Bao
e00be81c90 WIP to make the test_chiflash using TwoPhaseThreeComponentFluidSystem 2022-06-08 08:46:52 +02:00
Kai Bao
871bc77ca1 incoporating K, L, twophaseflag to FluidStateCompositionModules
It was done by Norce in the co2-compositional branch.
It removes some compilation errors.
2022-06-08 08:46:52 +02:00
Atgeirr Flø Rasmussen
7fa4f4796f [WIP] Add ChiFlash and test. Not compiling. 2022-06-08 08:46:52 +02:00
Bård Skaflestad
fc98447a97 Merge pull request #497 from plgbrts/vapoilwat
Add PVT for combined wet (vaporized oil)  and humid (vaporized water) gas
2022-05-25 15:14:10 +02:00
Tor Harald Sandve
d8ed221390 Merge pull request #489 from osae/letRelperm
Saturation functions based on LET-curves.
2022-05-03 13:39:13 +02:00
Bård Skaflestad
36ceeded74 Merge pull request #505 from totto82/fix_constant_rsrv
only remove duplicated points if there are more than two unique points
2022-05-02 11:04:55 +02:00
Bård Skaflestad
7990d1571e Merge pull request #510 from blattms/fix-spelling
Fixes spelling (amount -> amount)
2022-04-27 23:22:48 +02:00
Markus Blatt
520a406228 Fixes spelling (amount -> amount) 2022-04-27 22:13:07 +02:00
Markus Blatt
caefe67bb0 Merge pull request #507 from blattms/co2brinepvt-man
Added man page for co2brinepvt.
2022-04-26 17:23:54 +02:00
Ove Sævareid
10abd8efa2 Fixup. 2022-04-26 16:27:42 +02:00
Markus Blatt
a9595f80b3 Added man page for co2brinepvt. 2022-04-26 15:56:20 +02:00
Tor Harald Sandve
cb4ec94fcc only remove duplicated points if there are more than two unique points 2022-04-26 10:46:34 +02:00
Atgeirr Flø Rasmussen
f0c272f180 Merge pull request #504 from totto82/setEnableDissolution
return rsSat = 0 when dissolution is disabled in co2module
2022-04-20 15:14:44 +02:00
Tor Harald Sandve
1dc3d9b711 return rsSat = 0 when dissolution is disabled 2022-04-20 09:58:21 +02:00
Markus Blatt
1267a246e1 Merge pull request #499 from totto82/co2brinepvt_refPR
Co2brinepvt ref pr
2022-04-19 13:57:07 +02:00
Markus Blatt
1daaa303b0 Merge pull request #501 from goncalvesmachadoc/patch-4
[Release 2022.04] Fix bug WATDENT
2022-04-19 11:02:30 +02:00
Markus Blatt
54dda0b9ca Merge pull request #498 from totto82/co2brine_fix
Fix conversion from density to bo
2022-04-19 10:59:45 +02:00
Cintia Goncalves Machado
1720805f19 Fix division by zero in WATDENT implementation 2022-04-15 19:26:51 +02:00
Paul Egberts
405d435530 added water-gas ratio argument for co2brinepvt properties 2022-04-12 11:34:37 +02:00
Paul Egberts
9375ccd2ea fixed comment 2022-04-12 11:15:23 +02:00
Paul Egberts
7d66a1eef3 added water-gas ratio argument 2022-04-12 11:15:23 +02:00