From a59b5c4b1121444aee9271f15f2d364be5d8bae7 Mon Sep 17 00:00:00 2001 From: Jozsef Bakosi Date: Wed, 13 Mar 2019 08:37:52 -0600 Subject: [PATCH 1/7] Walker: Specify k = k' * b_al. --- src/DiffEq/MixDirichletCoeffPolicy.h | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/DiffEq/MixDirichletCoeffPolicy.h b/src/DiffEq/MixDirichletCoeffPolicy.h index 1a71f3f88de..c9390c1190e 100644 --- a/src/DiffEq/MixDirichletCoeffPolicy.h +++ b/src/DiffEq/MixDirichletCoeffPolicy.h @@ -157,11 +157,22 @@ class MixDirichletHomCoeffConst { if (R < 1.0e-8) R = 1.0; // b = -, density-specific-volume covariance - Term rhoprime( static_cast(std::tolower(depvar)), - ncomp, Moment::CENTRAL ); - Term vprime( static_cast(std::tolower(depvar)), - ncomp+1, Moment::CENTRAL ); - auto ds = -lookup( Product({rhoprime,vprime}), moments ); + // Term rhoprime( static_cast(std::tolower(depvar)), + // ncomp, Moment::CENTRAL ); + // Term vprime( static_cast(std::tolower(depvar)), + // ncomp+1, Moment::CENTRAL ); + // auto ds = -lookup( Product({rhoprime,vprime}), moments ); + + // b. = -/ + std::vector< tk::real > bc( ncomp, 0.0 ); + for (ncomp_t c=0; c(std::tolower(depvar)), + ncomp, Moment::CENTRAL ); + Term ty( static_cast(std::tolower(depvar)), + c, Moment::CENTRAL ); + bc[c] = -lookup( Product({tr,ty}), moments ) / R; // -/ + //std::cout << "RRY: " << RRY[c] << ' '; + } std::vector< tk::real > RY( ncomp, 0.0 ); std::vector< tk::real > RRY( ncomp, 0.0 ); @@ -241,7 +252,7 @@ class MixDirichletHomCoeffConst { (1.0-sumYt-Yt[c])*(r[c]/rho[ncomp]*(rhovar-sumRRY)) ); //std::cout << "S: " << S[c] << ", YKc: " << YK[c] // << ", Ytc: " << Yt[c] << ", YtKc: " << YtK[c] << ' '; - k[c] = kprime[c] * ds; + k[c] = kprime[c] * bc[c]; } //std::cout << std::endl; From 24783fae0cc069e3970ef6d4f9a8c9b9bef082b8 Mon Sep 17 00:00:00 2001 From: Jozsef Bakosi Date: Thu, 14 Mar 2019 13:26:53 -0600 Subject: [PATCH 2/7] Walker: Update velocity eq tests (SLM/GLM) - Take smaller time steps - Decrease number of time steps taken - Tighten tolerances on 2nd moments - Loosen tolerances on 1st moments --- .../walker/Velocity/glm_homogeneous_shear.q | 6 +- .../glm_homogeneous_shear.stat.txt.std | 66 ++++++------------- .../walker/Velocity/slm_homogeneous_shear.q | 6 +- .../slm_homogeneous_shear.stat.txt.std | 66 ++++++------------- regression/walker/Velocity/velocity.ndiff.cfg | 4 +- 5 files changed, 48 insertions(+), 100 deletions(-) diff --git a/regression/walker/Velocity/glm_homogeneous_shear.q b/regression/walker/Velocity/glm_homogeneous_shear.q index 010fa320c98..25855b20af1 100644 --- a/regression/walker/Velocity/glm_homogeneous_shear.q +++ b/regression/walker/Velocity/glm_homogeneous_shear.q @@ -8,9 +8,9 @@ title "Coupled position, velocity, dissipation joint PDF computing a walker #nstep 2 # Max number of time steps - term 9.1 # Max time - dt 0.2 # Time step size - npar 150000 # Number of particles + term 2.0 # Max time + dt 0.1 # Time step size + npar 100000 # Number of particles ttyi 1 # TTY output interval rngs diff --git a/regression/walker/Velocity/glm_homogeneous_shear.stat.txt.std b/regression/walker/Velocity/glm_homogeneous_shear.stat.txt.std index 4e79a824fa6..906ae75cb06 100644 --- a/regression/walker/Velocity/glm_homogeneous_shear.stat.txt.std +++ b/regression/walker/Velocity/glm_homogeneous_shear.stat.txt.std @@ -1,47 +1,21 @@ # 1:it 2:t 3: 4: 5: 6: 7: 8: 9: - 0 0 0.998218 0.671348 -0.00053019 -0.002463 0.665722 -0.00214889 0.667016 - 1 0.2 0.819313 0.658963 -0.0361255 -0.00289318 0.652647 -0.00443137 0.651107 - 2 0.4 0.701267 0.641111 -0.0587994 -0.00323323 0.614696 -0.00311782 0.619234 - 3 0.6 0.616687 0.61374 -0.0854901 -0.00220988 0.588521 -0.00310768 0.590017 - 4 0.8 0.553904 0.595511 -0.104183 -0.000194006 0.560345 -0.00335856 0.563407 - 5 1 0.504575 0.587946 -0.117681 0.00298498 0.53552 -0.00128805 0.549132 - 6 1.2 0.464992 0.57704 -0.128126 0.00378735 0.509506 -0.0015323 0.534171 - 7 1.4 0.432347 0.577005 -0.140355 0.00200115 0.487297 0.00166255 0.522456 - 8 1.6 0.40517 0.581599 -0.152857 0.00127764 0.474976 0.000108453 0.515383 - 9 1.8 0.382431 0.593727 -0.162566 0.0013618 0.462377 0.000973586 0.510495 - 10 2 0.363083 0.602231 -0.171023 0.00112366 0.449569 0.00217731 0.508977 - 11 2.2 0.346649 0.617361 -0.179655 0.00244341 0.439939 0.00210325 0.506631 - 12 2.4 0.332322 0.629874 -0.186287 0.00273184 0.435912 0.00298264 0.508931 - 13 2.6 0.319528 0.644664 -0.195629 0.00113544 0.43343 0.00266011 0.513075 - 14 2.8 0.3079 0.667614 -0.203397 0.00167516 0.430273 0.000928181 0.516814 - 15 3 0.29768 0.686772 -0.21125 0.00069204 0.429033 0.00232532 0.525245 - 16 3.2 0.288009 0.710737 -0.219269 0.00147181 0.427732 0.00220888 0.533025 - 17 3.4 0.279849 0.738644 -0.223309 0.00117784 0.430101 0.00523027 0.543175 - 18 3.6 0.272217 0.765133 -0.228974 0.00237928 0.433894 0.00227056 0.552823 - 19 3.8 0.265139 0.794415 -0.235033 0.00452071 0.43587 0.0004851 0.567614 - 20 4 0.258757 0.828057 -0.24136 0.00508192 0.439976 0.00327544 0.579314 - 21 4.2 0.252858 0.859616 -0.247764 0.00598557 0.444211 0.0039631 0.592984 - 22 4.4 0.247481 0.893134 -0.257175 0.00545452 0.453742 0.00586166 0.606813 - 23 4.6 0.241966 0.927632 -0.266777 0.00861256 0.464752 0.00261551 0.622904 - 24 4.8 0.236928 0.969675 -0.27906 0.0108579 0.474073 0.00214999 0.639093 - 25 5 0.232276 1.00916 -0.291415 0.0104416 0.486997 0.000546325 0.655767 - 26 5.2 0.228131 1.05081 -0.302025 0.00646403 0.49887 0.00195753 0.677966 - 27 5.4 0.224488 1.09292 -0.314531 0.0107409 0.511847 0.000976153 0.702315 - 28 5.6 0.220889 1.14265 -0.324408 0.0102007 0.52493 -0.00230894 0.724594 - 29 5.8 0.217291 1.19003 -0.336424 0.0129656 0.5389 -0.00498062 0.75301 - 30 6 0.213952 1.2404 -0.347474 0.0142704 0.556727 -0.00661717 0.779895 - 31 6.2 0.210927 1.28328 -0.360784 0.0148326 0.571757 -0.00616613 0.806025 - 32 6.4 0.208023 1.33772 -0.372799 0.0117238 0.584669 -0.00479238 0.834991 - 33 6.6 0.205127 1.3848 -0.384746 0.0158349 0.60146 -0.00298143 0.865227 - 34 6.8 0.202396 1.4376 -0.401256 0.0178864 0.623486 -0.0025274 0.89128 - 35 7 0.199856 1.49318 -0.413874 0.0172574 0.641406 -0.00233849 0.924509 - 36 7.2 0.197283 1.54954 -0.430294 0.0205162 0.661208 -0.00295487 0.963118 - 37 7.4 0.195098 1.62007 -0.44487 0.0161419 0.686747 -0.00115575 0.999004 - 38 7.6 0.192571 1.68881 -0.463247 0.0155003 0.707844 -0.00164574 1.03723 - 39 7.8 0.19048 1.7583 -0.482985 0.0163033 0.730433 -0.000545072 1.07408 - 40 8 0.188452 1.8389 -0.504339 0.0106914 0.753166 0.00269269 1.11625 - 41 8.2 0.186496 1.91375 -0.523087 0.00894606 0.782567 0.00123045 1.16082 - 42 8.4 0.184576 1.99063 -0.541789 0.017562 0.814913 -0.00460198 1.20822 - 43 8.6 0.182852 2.07673 -0.568454 0.0200784 0.849278 -0.00489544 1.25237 - 44 8.8 0.181209 2.16673 -0.595181 0.0191226 0.878358 -0.0071736 1.29649 - 45 9 0.179569 2.25547 -0.619728 0.0221799 0.911967 -0.0087407 1.35475 + 0 0 1.00011 0.669854 0.000234173 8.1204e-05 0.668662 -0.00209731 0.669061 + 1 0.1 0.911512 0.633173 -0.0221641 0.000679013 0.63117 -0.00150767 0.629848 + 2 0.2 0.837949 0.599423 -0.0369075 0.0011803 0.59834 -0.00168686 0.595104 + 3 0.3 0.775607 0.571123 -0.0535062 0.00193513 0.567179 -0.00178112 0.566678 + 4 0.4 0.722698 0.549313 -0.0657359 -0.000138879 0.539533 0.000187861 0.540513 + 5 0.5 0.678657 0.529365 -0.0766594 -0.000972851 0.513374 0.00222881 0.518167 + 6 0.6 0.6405 0.512689 -0.0844536 -0.00283926 0.488909 0.00123953 0.500045 + 7 0.7 0.606664 0.497917 -0.0908956 -0.00136735 0.467432 0.000616044 0.483907 + 8 0.8 0.57656 0.487801 -0.0985345 -0.00188643 0.447866 -0.000354639 0.469724 + 9 0.9 0.550101 0.481022 -0.1058 -0.000565481 0.432588 -0.00079194 0.456056 + 10 1 0.526565 0.475143 -0.110758 -0.00116531 0.417574 -0.000954436 0.446049 + 11 1.1 0.505294 0.471522 -0.115903 -0.00131007 0.405516 -0.000773734 0.437785 + 12 1.2 0.485986 0.46969 -0.120639 0.000742524 0.393225 -0.00158134 0.429586 + 13 1.3 0.468808 0.469367 -0.124991 0.000885213 0.383123 -0.000541929 0.423739 + 14 1.4 0.452638 0.47044 -0.127926 0.00095059 0.374077 -0.00100005 0.419841 + 15 1.5 0.438297 0.470844 -0.129587 0.00025922 0.365245 -0.000964599 0.414547 + 16 1.6 0.424945 0.471289 -0.132367 -4.32731e-05 0.356938 -0.000989048 0.410291 + 17 1.7 0.412247 0.474664 -0.134034 0.00174426 0.350121 -0.000451312 0.406127 + 18 1.8 0.400976 0.476504 -0.136084 0.00213593 0.343921 -0.000751244 0.402619 + 19 1.9 0.390482 0.480903 -0.138438 0.00224662 0.3379 -0.00152211 0.400011 diff --git a/regression/walker/Velocity/slm_homogeneous_shear.q b/regression/walker/Velocity/slm_homogeneous_shear.q index a71ac9b62d4..2f10350e265 100644 --- a/regression/walker/Velocity/slm_homogeneous_shear.q +++ b/regression/walker/Velocity/slm_homogeneous_shear.q @@ -8,9 +8,9 @@ title "Coupled position, velocity, dissipation joint PDF computing a walker #nstep 2 # Max number of time steps - term 9.1 # Max time - dt 0.2 # Time step size - npar 150000 # Number of particles + term 2.0 # Max time + dt 0.1 # Time step size + npar 100000 # Number of particles ttyi 1 # TTY output interval rngs diff --git a/regression/walker/Velocity/slm_homogeneous_shear.stat.txt.std b/regression/walker/Velocity/slm_homogeneous_shear.stat.txt.std index 293e06e2b4d..c637b39dbc7 100644 --- a/regression/walker/Velocity/slm_homogeneous_shear.stat.txt.std +++ b/regression/walker/Velocity/slm_homogeneous_shear.stat.txt.std @@ -1,47 +1,21 @@ # 1:it 2:t 3: 4: 5: 6: 7: 8: 9: - 0 0 0.998218 0.662506 -0.00289579 0.012747 0.663954 -0.0025618 0.668081 - 1 0.2 0.816323 0.671232 -0.0823707 0.00378384 0.648708 0.00242962 0.650861 - 2 0.4 0.702301 0.670403 -0.121841 0.00373101 0.628869 -0.000496714 0.623917 - 3 0.6 0.621259 0.684425 -0.155942 -0.00284579 0.596086 0.00257776 0.600062 - 4 0.8 0.560785 0.694426 -0.176726 -0.0028157 0.571463 -0.0019638 0.579096 - 5 1 0.513599 0.703486 -0.190592 -0.00221187 0.558328 -0.00329598 0.556825 - 6 1.2 0.47526 0.710782 -0.203312 -0.000627115 0.538197 -0.00263216 0.544022 - 7 1.4 0.443047 0.722106 -0.218373 -0.00525011 0.526254 -0.00172098 0.529023 - 8 1.6 0.417234 0.742818 -0.233072 -0.00353393 0.517068 -0.000845405 0.517399 - 9 1.8 0.395463 0.760153 -0.245133 -0.00296378 0.513452 -0.000206466 0.50743 - 10 2 0.376823 0.779345 -0.255785 0.00130744 0.504232 0.000783971 0.504169 - 11 2.2 0.361715 0.801033 -0.268209 -0.00119435 0.501041 0.00207033 0.498935 - 12 2.4 0.347987 0.826975 -0.27648 -0.00446528 0.494504 0.00176955 0.500271 - 13 2.6 0.335482 0.856721 -0.287318 -0.00504935 0.49221 0.00160045 0.504465 - 14 2.8 0.324719 0.882972 -0.298312 -0.0067071 0.495544 -0.00124929 0.506432 - 15 3 0.315521 0.914071 -0.308501 -0.00697953 0.493551 0.000317557 0.501908 - 16 3.2 0.306742 0.941441 -0.320376 -0.0066441 0.496918 -0.00115994 0.507238 - 17 3.4 0.2986 0.973737 -0.326716 -0.00583272 0.505208 7.82392e-05 0.512522 - 18 3.6 0.291549 1.00872 -0.337767 -0.00513228 0.511831 0.000329266 0.517641 - 19 3.8 0.284713 1.03988 -0.350496 -0.00389923 0.519769 -0.00284779 0.526535 - 20 4 0.278341 1.07609 -0.364531 -0.000461468 0.531367 -0.0045122 0.532976 - 21 4.2 0.272818 1.11249 -0.378105 -0.00207057 0.541592 -0.00115768 0.544753 - 22 4.4 0.267582 1.16055 -0.394451 0.00146451 0.554847 -0.00259013 0.556265 - 23 4.6 0.263114 1.21335 -0.410085 0.00191616 0.568761 -0.00363677 0.567889 - 24 4.8 0.258769 1.26312 -0.431494 0.00286737 0.585453 -0.0027957 0.576628 - 25 5 0.254786 1.32016 -0.45202 0.00383673 0.599187 -0.00282054 0.596143 - 26 5.2 0.251389 1.3777 -0.470424 0.00595787 0.614524 -0.00357595 0.610974 - 27 5.4 0.247964 1.43829 -0.487944 0.00446253 0.631321 -0.00115919 0.628042 - 28 5.6 0.244686 1.49475 -0.506825 0.00410523 0.653511 0.00212082 0.650248 - 29 5.8 0.241714 1.55691 -0.52833 0.00495688 0.672699 -0.00118759 0.665018 - 30 6 0.238547 1.62477 -0.54943 0.00347862 0.694194 -0.00208627 0.681213 - 31 6.2 0.235884 1.69228 -0.568549 0.00376917 0.708315 0.000441392 0.706961 - 32 6.4 0.23362 1.75602 -0.590088 0.00640374 0.732156 -0.0023734 0.731926 - 33 6.6 0.231253 1.82805 -0.611503 0.00493737 0.7486 -0.0067134 0.749036 - 34 6.8 0.228792 1.91374 -0.63742 0.000538812 0.77158 -0.00325361 0.7672 - 35 7 0.226869 1.99226 -0.657134 0.0019042 0.797536 -0.00152547 0.794087 - 36 7.2 0.224733 2.07499 -0.68274 -0.00056442 0.820512 -0.000677538 0.823193 - 37 7.4 0.222809 2.16807 -0.710267 0.000275091 0.853988 0.0029022 0.855796 - 38 7.6 0.220795 2.25837 -0.742301 0.00206819 0.884022 0.00421856 0.88454 - 39 7.8 0.219296 2.35604 -0.773469 0.00673566 0.914298 0.00478363 0.913301 - 40 8 0.217922 2.45723 -0.810747 0.00791221 0.952274 0.00466526 0.941371 - 41 8.2 0.216436 2.56922 -0.842123 0.0123669 0.98574 0.00399484 0.983653 - 42 8.4 0.215184 2.68848 -0.872509 0.00730015 1.02068 0.00312938 1.02289 - 43 8.6 0.213501 2.81833 -0.914051 0.00991507 1.06309 -0.00138952 1.06764 - 44 8.8 0.212161 2.93512 -0.958578 0.00497082 1.10587 -0.00209322 1.10597 - 45 9 0.211076 3.06583 -0.997379 0.000725127 1.14839 0.00211968 1.15198 + 0 0 1.00011 0.669854 0.000234173 8.1204e-05 0.668662 -0.00209731 0.669061 + 1 0.1 0.911512 0.63949 -0.0539998 0.000847994 0.630995 -0.00111894 0.629889 + 2 0.2 0.83929 0.615952 -0.0846441 0.00129059 0.598799 -0.00121218 0.594471 + 3 0.3 0.778681 0.598847 -0.10947 0.0017575 0.568226 -0.00120746 0.565505 + 4 0.4 0.727524 0.587709 -0.124926 -0.000756618 0.542072 0.000889851 0.538293 + 5 0.5 0.685086 0.57604 -0.136853 -0.00189615 0.517629 0.00272244 0.515064 + 6 0.6 0.648341 0.566763 -0.144266 -0.00329222 0.495418 0.00107006 0.495861 + 7 0.7 0.615707 0.557486 -0.149812 -0.00131858 0.47611 0.000235829 0.478257 + 8 0.8 0.586621 0.552134 -0.156248 -0.00159806 0.458524 -0.000800399 0.462362 + 9 0.9 0.561025 0.548925 -0.162074 -0.000122655 0.445258 -0.000918989 0.446631 + 10 1 0.53821 0.546486 -0.165898 -0.00059122 0.4322 -0.000907575 0.434625 + 11 1.1 0.517545 0.545159 -0.169863 -0.000939551 0.422072 -0.000674525 0.42425 + 12 1.2 0.49874 0.545414 -0.173374 0.00132309 0.411302 -0.00122133 0.413838 + 13 1.3 0.481995 0.545586 -0.177014 0.00114495 0.402764 -0.000143296 0.405755 + 14 1.4 0.466183 0.546912 -0.17933 0.00113047 0.395615 -0.000514647 0.399408 + 15 1.5 0.452176 0.546566 -0.180538 0.000299327 0.388391 -0.00052314 0.391524 + 16 1.6 0.439128 0.546676 -0.183322 -0.000496451 0.381457 -0.000434082 0.384753 + 17 1.7 0.426704 0.549771 -0.185079 0.00122207 0.375903 0.000300747 0.377952 + 18 1.8 0.415725 0.551271 -0.187506 0.00118878 0.370639 2.10698e-05 0.372057 + 19 1.9 0.405525 0.555427 -0.18996 0.00141026 0.365238 -0.000837309 0.367001 diff --git a/regression/walker/Velocity/velocity.ndiff.cfg b/regression/walker/Velocity/velocity.ndiff.cfg index b9ad1c13d8a..de531316aec 100644 --- a/regression/walker/Velocity/velocity.ndiff.cfg +++ b/regression/walker/Velocity/velocity.ndiff.cfg @@ -1,4 +1,4 @@ #rows cols constraints * 1-2 # no constraint: smallest representable float -* 3 rel=0.04 # tolerance for means -* 4-$ abs=0.9 # tolerance for 2nd order stats +* 3 rel=0.05 # tolerance for means +* 4-$ abs=0.2 # tolerance for 2nd order stats From 2dffae750e6458921539b154e203c82ea14cb2d3 Mon Sep 17 00:00:00 2001 From: Jozsef Bakosi Date: Thu, 14 Mar 2019 13:29:17 -0600 Subject: [PATCH 3/7] Add check on violation of kappa for MixDir, commented --- src/DiffEq/MixDirichletCoeffPolicy.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/DiffEq/MixDirichletCoeffPolicy.h b/src/DiffEq/MixDirichletCoeffPolicy.h index c9390c1190e..66888b7546f 100644 --- a/src/DiffEq/MixDirichletCoeffPolicy.h +++ b/src/DiffEq/MixDirichletCoeffPolicy.h @@ -253,6 +253,9 @@ class MixDirichletHomCoeffConst { //std::cout << "S: " << S[c] << ", YKc: " << YK[c] // << ", Ytc: " << Yt[c] << ", YtKc: " << YtK[c] << ' '; k[c] = kprime[c] * bc[c]; + //if (k[c] < 0.0) + // std::cout << "Positivity of k[" << c << "] violated: " + // << k[c] << '\n'; } //std::cout << std::endl; From 2149d38231ba03d5ff0f30cc3da8d005fbcaaf73 Mon Sep 17 00:00:00 2001 From: Jozsef Bakosi Date: Thu, 14 Mar 2019 13:48:35 -0600 Subject: [PATCH 4/7] Walker: Disable velocity regression tests --- regression/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regression/CMakeLists.txt b/regression/CMakeLists.txt index aee0d49977a..61ddd74f376 100644 --- a/regression/CMakeLists.txt +++ b/regression/CMakeLists.txt @@ -39,7 +39,7 @@ if (ENABLE_WALKER) add_subdirectory(walker/NumFracBeta) add_subdirectory(walker/MassFracBeta) add_subdirectory(walker/MixMassFracBeta) - add_subdirectory(walker/Velocity) + #add_subdirectory(walker/Velocity) endif() # RNGTest regression tests From 9cfa12de027fa253a3f28a64e74d48d12a6d3b34 Mon Sep 17 00:00:00 2001 From: Jozsef Bakosi Date: Thu, 14 Mar 2019 16:14:40 -0600 Subject: [PATCH 5/7] Force Cb2 = 2 in MixMassFracBetaCoeffInstVel --- src/DiffEq/MixMassFractionBetaCoeffPolicy.h | 36 ++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/DiffEq/MixMassFractionBetaCoeffPolicy.h b/src/DiffEq/MixMassFractionBetaCoeffPolicy.h index 3ae81591491..657a8ef0375 100644 --- a/src/DiffEq/MixMassFractionBetaCoeffPolicy.h +++ b/src/DiffEq/MixMassFractionBetaCoeffPolicy.h @@ -734,29 +734,29 @@ class MixMassFracBetaCoeffInstVel { tk::real d3 = lookup( cen3(depvar,c+ncomp), moments ); // tk::real yt = ry/d; - // Access mean turbulence frequency from coupled dissipation model, + // Compute turbulent kinetic energy + // auto K = tke( velocity_depvar, velocity_solve, moments ); + // Access mean turbulence frequency from coupled dissipation model // hydroptimescale: eps/k = tk::real ts = lookup( mean(dissipation_depvar,0), moments ); - // Compute turbulent kinetic energy - //auto K = tke( velocity_depvar, velocity_solve, moments ); auto pe = 1.0; // hydroproductions: P/eps = 1.0 (equilibrium) - tk::real a = r[c]/(1.0+r[c]*yt); - tk::real bnm = a*a*yt*(1.0-yt); - tk::real thetab = 1.0 - ds/bnm; - tk::real f2 = - 1.0 / std::pow(1.0 + std::pow(pe-1.0,2.0)*std::pow(ds,0.25),0.5); - tk::real b1 = m_s[0]; - tk::real b2 = m_s[1]; - tk::real b3 = m_s[2]; - tk::real eta = d2/d/d/ds; - tk::real beta2 = b2*(1.0+eta*ds); - tk::real Thetap = thetab*0.5*(1.0+eta/(1.0+eta*ds)); - tk::real beta3 = b3*(1.0+eta*ds); - tk::real beta10 = b1 * (1.0+ds)/(1.0+eta*ds); - tk::real beta1 = bprime[c] * 2.0/(1.0+eta+eta*ds) * - (beta10 + beta2*Thetap*f2 + beta3*Thetap*(1.0-Thetap)*f2); + // tk::real a = r[c]/(1.0+r[c]*yt); + // tk::real bnm = a*a*yt*(1.0-yt); + // tk::real thetab = 1.0 - ds/bnm; + // tk::real f2 = + // 1.0 / std::pow(1.0 + std::pow(pe-1.0,2.0)*std::pow(ds,0.25),0.5); + // tk::real b1 = m_s[0]; + // tk::real b2 = m_s[1]; + // tk::real b3 = m_s[2]; + // tk::real eta = d2/d/d/ds; + // tk::real beta2 = b2*(1.0+eta*ds); + // tk::real Thetap = thetab*0.5*(1.0+eta/(1.0+eta*ds)); + // tk::real beta3 = b3*(1.0+eta*ds); + // tk::real beta10 = b1 * (1.0+ds)/(1.0+eta*ds); + tk::real beta1 = 2.0;//bprime[c] * 2.0/(1.0+eta+eta*ds) * + //(beta10 + beta2*Thetap*f2 + beta3*Thetap*(1.0-Thetap)*f2); b[c] = beta1 * ts; k[c] = kprime[c] * beta1 * ts * ds * ds; From 3e7b9fa63e5c4c354de910e63042fc25247837c4 Mon Sep 17 00:00:00 2001 From: Jozsef Bakosi Date: Thu, 14 Mar 2019 16:42:53 -0600 Subject: [PATCH 6/7] Comment unused vars --- src/DiffEq/MixMassFractionBetaCoeffPolicy.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/DiffEq/MixMassFractionBetaCoeffPolicy.h b/src/DiffEq/MixMassFractionBetaCoeffPolicy.h index 657a8ef0375..e0ed39db06e 100644 --- a/src/DiffEq/MixMassFractionBetaCoeffPolicy.h +++ b/src/DiffEq/MixMassFractionBetaCoeffPolicy.h @@ -683,7 +683,7 @@ class MixMassFracBetaCoeffInstVel { ctr::DepvarType /*velocity_solve*/, ncomp_t ncomp, const std::map< tk::ctr::Product, tk::real >& moments, - const std::vector< kw::sde_bprime::info::expect::type >& bprime, + const std::vector< kw::sde_bprime::info::expect::type >& /*bprime*/, const std::vector< kw::sde_kappaprime::info::expect::type >& kprime, const std::vector< kw::sde_rho2::info::expect::type >& rho2, const std::vector< kw::sde_r::info::expect::type >& r, @@ -732,7 +732,7 @@ class MixMassFracBetaCoeffInstVel { tk::real d = lookup( mean(depvar,c+ncomp), moments ); // tk::real d2 = lookup( variance(depvar,c+ncomp), moments ); // tk::real d3 = lookup( cen3(depvar,c+ncomp), moments ); // - tk::real yt = ry/d; + //tk::real yt = ry/d; // Compute turbulent kinetic energy // auto K = tke( velocity_depvar, velocity_solve, moments ); @@ -740,7 +740,7 @@ class MixMassFracBetaCoeffInstVel { // hydroptimescale: eps/k = tk::real ts = lookup( mean(dissipation_depvar,0), moments ); - auto pe = 1.0; // hydroproductions: P/eps = 1.0 (equilibrium) + //auto pe = 1.0; // hydroproductions: P/eps = 1.0 (equilibrium) // tk::real a = r[c]/(1.0+r[c]*yt); // tk::real bnm = a*a*yt*(1.0-yt); From 8ae2e71791f580aaf4f467cfbcc78bac491ad32f Mon Sep 17 00:00:00 2001 From: Jozsef Bakosi Date: Thu, 14 Mar 2019 16:46:46 -0600 Subject: [PATCH 7/7] Comment more unused vars --- src/DiffEq/MixMassFractionBetaCoeffPolicy.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/DiffEq/MixMassFractionBetaCoeffPolicy.h b/src/DiffEq/MixMassFractionBetaCoeffPolicy.h index e0ed39db06e..f78a5774edf 100644 --- a/src/DiffEq/MixMassFractionBetaCoeffPolicy.h +++ b/src/DiffEq/MixMassFractionBetaCoeffPolicy.h @@ -712,12 +712,12 @@ class MixMassFracBetaCoeffInstVel { // = mean density, for (ncomp_t c=0; c(std::toupper(depvar)), - c, - tk::ctr::Moment::ORDINARY ); - const tk::ctr::Term dens( static_cast(std::toupper(depvar)), - c+ncomp, - tk::ctr::Moment::ORDINARY ); + // const tk::ctr::Term Y( static_cast(std::toupper(depvar)), + // c, + // tk::ctr::Moment::ORDINARY ); + // const tk::ctr::Term dens( static_cast(std::toupper(depvar)), + // c+ncomp, + // tk::ctr::Moment::ORDINARY ); const tk::ctr::Term s1( static_cast(std::tolower(depvar)), c+ncomp, tk::ctr::Moment::CENTRAL ); @@ -725,8 +725,8 @@ class MixMassFracBetaCoeffInstVel { c+ncomp*2, tk::ctr::Moment::CENTRAL ); - const auto RY = tk::ctr::Product( { dens, Y } ); - tk::real ry = lookup( RY, moments ); // + //const auto RY = tk::ctr::Product( { dens, Y } ); + //tk::real ry = lookup( RY, moments ); // const auto dscorr = tk::ctr::Product( { s1, s2 } ); tk::real ds = -lookup( dscorr, moments ); // b = - tk::real d = lookup( mean(depvar,c+ncomp), moments ); //