From ef078b886fe9aaf7b2edd76f1fdaca44f201cbc6 Mon Sep 17 00:00:00 2001 From: Yeongdo Park Date: Fri, 9 Aug 2019 06:04:29 +0900 Subject: [PATCH] termspec input file library --- .../termspec.banded_fsd-0.05-0.95-0.1 | 75 +++++++++++++++++++ .../termspecs/termspec.masked_fsd-0.1-0.9 | 45 +++++++++++ .../termspecs/termspec.pdf-sampling-ic1 | 18 +++++ code/code_gen/termspecs/termspec.t1-8 | 41 ++++++++++ 4 files changed, 179 insertions(+) create mode 100644 code/code_gen/termspecs/termspec.banded_fsd-0.05-0.95-0.1 create mode 100644 code/code_gen/termspecs/termspec.masked_fsd-0.1-0.9 create mode 100644 code/code_gen/termspecs/termspec.pdf-sampling-ic1 create mode 100644 code/code_gen/termspecs/termspec.t1-8 diff --git a/code/code_gen/termspecs/termspec.banded_fsd-0.05-0.95-0.1 b/code/code_gen/termspecs/termspec.banded_fsd-0.05-0.95-0.1 new file mode 100644 index 0000000..67b6c1a --- /dev/null +++ b/code/code_gen/termspecs/termspec.banded_fsd-0.05-0.95-0.1 @@ -0,0 +1,75 @@ +# weigthed average of terms t1~t8 +# with fsd masked for 9 bands + +[u, v, w, y] + +c = 1.0 - y +wrate = rxn_rate(c) + +mask1 = $threshold_min_max(c, 0.05, 0.15) +mask2 = $threshold_min_max(c, 0.15, 0.25) +mask3 = $threshold_min_max(c, 0.25, 0.35) +mask4 = $threshold_min_max(c, 0.35, 0.45) +mask5 = $threshold_min_max(c, 0.45, 0.55) +mask6 = $threshold_min_max(c, 0.55, 0.65) +mask7 = $threshold_min_max(c, 0.65, 0.75) +mask8 = $threshold_min_max(c, 0.75, 0.85) +mask9 = $threshold_min_max(c, 0.85, 0.95) + +fsd_orig = sqrt (sqr(ddx(c)) + sqr(ddy(c)) + sqr(ddz(c))) + +fsd = fsd_orig * mask + +fsd1 = fsd_orig * mask1 +fsd2 = fsd_orig * mask2 +fsd3 = fsd_orig * mask3 +fsd4 = fsd_orig * mask4 +fsd5 = fsd_orig * mask5 +fsd6 = fsd_orig * mask6 +fsd7 = fsd_orig * mask7 +fsd8 = fsd_orig * mask8 +fsd9 = fsd_orig * mask9 + +sd = ((d2dx(c) + d2dy(c) + d2dz(c)) * $rod + wrate) / fsd_orig + +nx = - ddx(c) / fsd_orig +ny = - ddy(c) / fsd_orig +nz = - ddz(c) / fsd_orig + +vn = u * nx + v * ny + w * nz + +divn = ddx(nx) + ddy(ny) + ddz(nz) + +absk = abs(divn) + +lapc = d2dx(c) + d2dy(c) + d2dz(c) + +t1 = (vn + sd) * nx + +t2 = t1' * nx' + +t3 = t1' * divn' + +t4 = t1' * absk' + +t5 = sqr(t1') + +t6 = sqr(nx') + +t7 = sqr(divn') + +t8 = sqr(absk') + +avg { c, u, v, w, fsd1, fsd2, fsd3, fsd4, fsd5, fsd6, fsd7, fsd8, fsd9, lapc, ddx_c, ddy_c, ddz_c, d2dx_c, d2dy_c, d2dz_c } + +avg fsd1 { nx, ny, nz, t1, t2, t3, t4, t5, t6, t7, t8, absk, divn, sd } +avg fsd2 { nx, ny, nz, t1, t2, t3, t4, t5, t6, t7, t8, absk, divn, sd } +avg fsd3 { nx, ny, nz, t1, t2, t3, t4, t5, t6, t7, t8, absk, divn, sd } +avg fsd4 { nx, ny, nz, t1, t2, t3, t4, t5, t6, t7, t8, absk, divn, sd } +avg fsd5 { nx, ny, nz, t1, t2, t3, t4, t5, t6, t7, t8, absk, divn, sd } +avg fsd6 { nx, ny, nz, t1, t2, t3, t4, t5, t6, t7, t8, absk, divn, sd } +avg fsd7 { nx, ny, nz, t1, t2, t3, t4, t5, t6, t7, t8, absk, divn, sd } +avg fsd8 { nx, ny, nz, t1, t2, t3, t4, t5, t6, t7, t8, absk, divn, sd } +avg fsd9 { nx, ny, nz, t1, t2, t3, t4, t5, t6, t7, t8, absk, divn, sd } + + diff --git a/code/code_gen/termspecs/termspec.masked_fsd-0.1-0.9 b/code/code_gen/termspecs/termspec.masked_fsd-0.1-0.9 new file mode 100644 index 0000000..18182f6 --- /dev/null +++ b/code/code_gen/termspecs/termspec.masked_fsd-0.1-0.9 @@ -0,0 +1,45 @@ +# weigthed average of terms t1~t8 +# with fsd masked for [0.1, 0.9] + +[u, v, w, y] + +c = 1.0 - y +wrate = rxn_rate(c) + +mask = $threshold_min_max(c) +fsd_orig = sqrt (sqr(ddx(c)) + sqr(ddy(c)) + sqr(ddz(c))) +fsd = fsd_orig * mask + +sd = ((d2dx(c) + d2dy(c) + d2dz(c)) * $rod + wrate) / fsd_orig + +nx = - ddx(c) / fsd_orig +ny = - ddy(c) / fsd_orig +nz = - ddz(c) / fsd_orig + +vn = u * nx + v * ny + w * nz + +divn = ddx(nx) + ddy(ny) + ddz(nz) + +absk = abs(divn) + +lapc = d2dx(c) + d2dy(c) + d2dz(c) + +t1 = (vn + sd) * nx + +t2 = t1' * nx' + +t3 = t1' * divn' + +t4 = t1' * absk' + +t5 = sqr(t1') + +t6 = sqr(nx') + +t7 = sqr(divn') + +t8 = sqr(absk') + +avg { c, u, v, w, fsd, lapc, ddx_c, ddy_c, ddz_c, d2dx_c, d2dy_c, d2dz_c } + +avg fsd { u, v, w, nx, ny, nz, t1, t2, t3, t4, t5, t6, t7, t8, absk, divn, sd } diff --git a/code/code_gen/termspecs/termspec.pdf-sampling-ic1 b/code/code_gen/termspecs/termspec.pdf-sampling-ic1 new file mode 100644 index 0000000..3258355 --- /dev/null +++ b/code/code_gen/termspecs/termspec.pdf-sampling-ic1 @@ -0,0 +1,18 @@ +# collect samples for pdf estimation from ic1 case +# sampling region (xs, xe) hard-coded for ic1 case + +[u, v, w, y] + +# field_name (arg_name=arg (, pair)* ) = expression + +c (export=true, xs=176, xe=400) = 1.0 - y + +fsd (export=true, xs=176, xe=400) = sqrt (sqr(ddx(c)) + sqr(ddy(c)) + sqr(ddz(c))) + +nx = - ddx(c) / fsd +ny = - ddy(c) / fsd +nz = - ddz(c) / fsd + +divn (export=true, xs=176, xe=400) = ddx(nx) + ddy(ny) + ddz(nz) + +avg { c, fsd, divn } diff --git a/code/code_gen/termspecs/termspec.t1-8 b/code/code_gen/termspecs/termspec.t1-8 new file mode 100644 index 0000000..c766b49 --- /dev/null +++ b/code/code_gen/termspecs/termspec.t1-8 @@ -0,0 +1,41 @@ +# weigthed average of terms t1~t8 + +[u, v, w, y] + +c = 1.0 - y +wrate = rxn_rate(c) +fsd = sqrt (sqr(ddx(c)) + sqr(ddy(c)) + sqr(ddz(c))) + +sd = ((d2dx(c) + d2dy(c) + d2dz(c)) * $rod + wrate) / fsd + +nx = - ddx(c) / fsd +ny = - ddy(c) / fsd +nz = - ddz(c) / fsd + +vn = u * nx + v * ny + w * nz + +divn = ddx(nx) + ddy(ny) + ddz(nz) + +absk = abs(divn) + +lapc = d2dx(c) + d2dy(c) + d2dz(c) + +t1 = (vn + sd) * nx + +t2 = t1' * nx' + +t3 = t1' * divn' + +t4 = t1' * absk' + +t5 = sqr(t1') + +t6 = sqr(nx') + +t7 = sqr(divn') + +t8 = sqr(absk') + +avg { c, u, v, w, fsd, lapc, ddx_c, ddy_c, ddz_c, d2dx_c, d2dy_c, d2dz_c } + +avg fsd { u, v, w, nx, ny, nz, t1, t2, t3, t4, t5, t6, t7, t8, absk, divn, sd }