Skip to content

Commit 34497cd

Browse files
Dimitrios AdamDimitrios Adam
authored andcommitted
Small Changes
1 parent 55a8ec6 commit 34497cd

File tree

16 files changed

+157
-323
lines changed

16 files changed

+157
-323
lines changed

src/common/m_chemistry.fpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,7 @@ contains
253253
$:GPU_LOOP(parallelism='[seq]')
254254
do i = chemxb, chemxe
255255
mass_diffusivities_mixavg_Cell(i - chemxb + 1) = &
256-
(mass_diffusivities_mixavg2(i - chemxb + 1) + mass_diffusivities_mixavg1(i - chemxb + 1))/ &
257-
2.0_wp*(1.0_wp - Xs_cell(i - chemxb + 1))/(1.0_wp - Ys_cell(i - chemxb + 1))
256+
(mass_diffusivities_mixavg2(i - chemxb + 1) + mass_diffusivities_mixavg1(i - chemxb + 1))/2.0_wp
258257
end do
259258

260259
lambda_Cell = 0.5_wp*(lambda_R + lambda_L)

src/pre_process/include/1dHardcodedIC.fpp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#:def Hardcoded1DVariables()
22
! Place any declaration of intermediate variables here
3+
real(wp) :: x_mid_diffu, width_sq, profile_shape, temp, molar_mass_inv, y1, y2, y3, y4
34
#:enddef
45

56
#:def Hardcoded1D()
@@ -20,6 +21,35 @@
2021
! 1D_titarevtorro cases: "patch_icpp(2)%alpha_rho(1)": "1 + 0.1*sin(20*x*pi)"
2122
q_prim_vf(contxb + 0)%sf(i, 0, 0) = 1 + 0.1*sin(20*x_cc(i)*pi)
2223

24+
case (182)
25+
! This patch is a hard-coded for test suite optimization (multiple component diffusion)
26+
x_mid_diffu = 0.05_wp/2.0_wp
27+
width_sq = (2.5_wp*10.0_wp**(-3.0_wp))**2
28+
profile_shape = 1.0_wp - 0.5_wp*exp(-(x_cc(i) - x_mid_diffu)**2/width_sq)
29+
q_prim_vf(momxb)%sf(i, 0, 0) = 0.0_wp
30+
q_prim_vf(E_idx)%sf(i, 0, 0) = 1.01325_wp*(10.0_wp)**5
31+
q_prim_vf(advxb)%sf(i, 0, 0) = 1.0_wp
32+
q_prim_vf(advxb)%sf(i, 0, 0) = 1.0_wp
33+
34+
y1 = (0.195_wp - 0.142_wp)*profile_shape + 0.142_wp
35+
y2 = (0.0_wp - 0.1_wp)*profile_shape + 0.1_wp
36+
y3 = (0.214_wp - 0.0_wp)*profile_shape + 0.0_wp
37+
y4 = (0.591_wp - 0.758_wp)*profile_shape + 0.758_wp
38+
39+
q_prim_vf(chemxb)%sf(i, 0, 0) = y1
40+
q_prim_vf(chemxb + 1)%sf(i, 0, 0) = y2
41+
q_prim_vf(chemxb + 2)%sf(i, 0, 0) = y3
42+
q_prim_vf(chemxb + 3)%sf(i, 0, 0) = y4
43+
44+
temp = (320.0_wp - 1350.0_wp)*profile_shape + 1350.0_wp
45+
46+
molar_mass_inv = y1/31.998_wp + &
47+
y2/18.01508_wp + &
48+
y3/16.04256_wp + &
49+
y4/28.0134_wp
50+
51+
q_prim_vf(contxb)%sf(i, 0, 0) = 1.01325_wp*(10.0_wp)**5/(temp*8.3144626_wp*1000.0_wp*molar_mass_inv)
52+
2353
case default
2454
call s_int_to_str(patch_id, iStr)
2555
call s_mpi_abort("Invalid hcid specified for patch "//trim(iStr))

src/simulation/m_global_parameters.fpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,6 +1312,8 @@ contains
13121312
13131313
$:GPU_UPDATE(device='[Bx0, powell]')
13141314
1315+
$:GPU_UPDATE(device='[chem_params]')
1316+
13151317
$:GPU_UPDATE(device='[cont_damage,tau_star,cont_damage_s,alpha_bar]')
13161318
13171319
#:if not MFC_CASE_OPTIMIZATION

tests/2BDE2018/golden-metadata.txt

Lines changed: 10 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/2BDE2018/golden.txt

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/41AD0140/golden-metadata.txt

Lines changed: 10 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)