Commit Graph

1117 Commits

Author SHA1 Message Date
Kai Bao
35321b9825 renaming ChiFlash to PTFlash 2022-06-23 23:55:37 +02:00
Kai Bao
0f8df5cca1 white space cleaning up
no functionality change.
2022-06-23 22:44:20 +02:00
Trine Mykkeltvedt
16c88d0a02 more peng robinson 2022-06-23 14:59:53 +02:00
Trine Mykkeltvedt
bf89f6747b Merge branch 'add-chi-flash-trine' of github.com:GitPaean/opm-material into add-chi-flash-trine 2022-06-23 14:55:50 +02:00
Trine Mykkeltvedt
fe08002ff5 more peng robinson stuff 2022-06-23 14:54:59 +02:00
Trine Mykkeltvedt
83504883b1 more cleaning in the PengRobinson files 2022-06-23 14:47:50 +02:00
Kai Bao
9a1a41be47 cleaning up FluidStateCompositionModules.hpp a little bit.
mostly removing the twophaselflag_, which is not used anywhere.

not functionality changes.
2022-06-23 14:45:45 +02:00
Trine Mykkeltvedt
bc63cec485 cleaned PengRobinson, uncommented the stuff about extrema in the case of one rott - I think it can just be as it was 2022-06-23 14:35:51 +02:00
Trine Mykkeltvedt
e8d9f6ca0f removed some printing in the polynomialsolver 2022-06-23 14:23:17 +02:00
Kai Bao
991e2f570f slightly cleaning up PengRobinsonMixture.hpp a little bit
there are some more trivial cleaning work remains.
2022-06-23 13:57:30 +02:00
Trine Mykkeltvedt
d57a398b6e cleaned up the viscositymodels, two choises availible: LBC and modified LBC 2022-06-23 11:25:53 +02:00
Trine Mykkeltvedt
9e437f64fe moved the viscositymodels to a separate folder alongside the fluidsystem, in principle there are two viscositymodels: the standard LBC and the modified LBC. However, there might me some discrepancy between LBC and LBCjulia - this needs to be sorted out before we split this file into two (or three) separte method files 2022-06-23 09:22:26 +02:00
Trine Mykkeltvedt
6b6990a7fc moved and renamed fluidsystems and parametercache in chifluid 2022-06-22 14:59:38 +02:00
Trine Mykkeltvedt
7de58ae532 moved the components to opm/material/components, and made subsequent changes for checking of the components 2022-06-22 14:35:55 +02:00
Trine Mykkeltvedt
06de60a6fb removed unused files and started removing julianame 2022-06-22 11:36:47 +02:00
Kai Bao
e91ea58286 removing test_chiflash_scalar and test_chiflashspe5
they are not needed anymore.
2022-06-21 15:56:02 +02:00
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