Commit Graph

1101 Commits

Author SHA1 Message Date
Kai Bao
530157c092 fixing the compilation of test_chiflash
one reason is some code does not compile with DUNE2.6. And DUNE2.6 is
still supported by OPM.
2022-06-21 15:53:25 +02:00
Trine Mykkeltvedt
82c6bfe610 added Kais startup cleaning, no functionality change 2022-06-20 09:54:15 +02:00
Trine Mykkeltvedt
5b2845bf9a made additional test with co2 and brine working, similar as juliacode 2022-06-20 09:04:17 +02:00
Trine Mykkeltvedt
4fd4fc7029 wip co2brine 2022-06-13 14:11:08 +02:00
Trine Mykkeltvedt
d26ea55ef8 fixed the derivatives for the single phase case 2022-06-09 15:10:39 +02:00
Trine Mykkeltvedt
150356a0e9 wip coupling to opm-models compositionalflash 2022-06-08 08:46:52 +02:00
Trine Mykkeltvedt
eb918ef3a5 updated the fluidState derivatives correctly to be used in intensivequantities 2022-06-08 08:46:52 +02:00
Trine Mykkeltvedt
ba9457e2f2 wip copling to opm-models 2022-06-08 08:46:52 +02:00
Trine Mykkeltvedt
26a78c9e38 changes to ChiFlash 2022-06-08 08:46:52 +02:00
Trine Mykkeltvedt
59a521d46d added new cubic solver from Svenns old branch, also made a phaseStabilityTestMichelsen_ with the same wrapping as julia code - this does not work with newton right now. BUT the fix of the roots makes the stabilitytest give similar K as Olavs Julia code. Will never be completely equal due to minimization through gibbs (not implemented in opm) which will different choize of roots 2022-06-08 08:46:52 +02:00
Trine Mykkeltvedt
f4e6b700a3 added Svenns cubic solver 2022-06-08 08:46:52 +02:00
Trine Mykkeltvedt
036923af1e WIP stabilitutest ++ 2022-06-08 08:46:52 +02:00
Trine Mykkeltvedt
06a9c9ea1c added Kais last to commits and took values to fluid_state 2022-06-08 08:46:52 +02:00
Trine Mykkeltvedt
03f5a39985 fixed the derivatives in PengRobinsonMixture with a rewrite of a term to get pri_jac correct, also a getValue to get sec_jac equal, did rewriting and printing in ugly way jus t compare with Julia-code values 2022-06-08 08:46:52 +02:00
Trine Mykkeltvedt
03685e5bf2 problems with how ideal gas constant R was defined on mac, David helped me fix it 2022-06-08 08:46:52 +02:00
Kai Bao
eee1f72482 WIP in generating the secondary jacobian 2022-06-08 08:46:52 +02:00
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