Skip to content

Commit

Permalink
Average rho to faces, following mu_turb; update gold data
Browse files Browse the repository at this point in the history
  • Loading branch information
ewquon committed Jan 22, 2024
1 parent c290c0a commit 1ebf0bd
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 28 deletions.
27 changes: 18 additions & 9 deletions Source/Diffusion/ComputeStress_N.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,19 @@ ComputeStressConsVisc_N (Box bxcc, Box tbxxy, Box tbxxz, Box tbxyz, Real mu_eff,
// Off-diagonal strains
ParallelFor(tbxxy,tbxxz,tbxyz,
[=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
tau12(i,j,k) *= -cell_data(i, j, k, Rho_comp) * mu_eff;
Real rho_bar = 0.25*( cell_data(i-1, j , k, Rho_comp) + cell_data(i, j , k, Rho_comp)
+ cell_data(i-1, j-1, k, Rho_comp) + cell_data(i, j-1, k, Rho_comp) );
tau12(i,j,k) *= -rho_bar * mu_eff;
},
[=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
tau13(i,j,k) *= -cell_data(i, j, k, Rho_comp) * mu_eff;
Real rho_bar = 0.25*( cell_data(i-1, j, k , Rho_comp) + cell_data(i, j, k , Rho_comp)
+ cell_data(i-1, j, k-1, Rho_comp) + cell_data(i, j, k-1, Rho_comp) );
tau13(i,j,k) *= -rho_bar * mu_eff;
},
[=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
tau23(i,j,k) *= -cell_data(i, j, k, Rho_comp) * mu_eff;
Real rho_bar = 0.25*( cell_data(i, j-1, k , Rho_comp) + cell_data(i, j, k , Rho_comp)
+ cell_data(i, j-1, k-1, Rho_comp) + cell_data(i, j, k-1, Rho_comp) );
tau23(i,j,k) *= -rho_bar * mu_eff;
});
}
else
Expand Down Expand Up @@ -122,24 +128,27 @@ ComputeStressVarVisc_N (Box bxcc, Box tbxxy, Box tbxxz, Box tbxyz, Real mu_eff,
// Off-diagonal strains
ParallelFor(tbxxy,tbxxz,tbxyz,
[=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
Real rhoAlpha = cell_data(i, j, k, Rho_comp) * mu_eff;
Real rho_bar = 0.25*( cell_data(i-1, j , k, Rho_comp) + cell_data(i, j , k, Rho_comp)
+ cell_data(i-1, j-1, k, Rho_comp) + cell_data(i, j-1, k, Rho_comp) );
Real mu_bar = 0.25*( mu_turb(i-1, j , k, EddyDiff::Mom_h) + mu_turb(i, j , k, EddyDiff::Mom_h)
+ mu_turb(i-1, j-1, k, EddyDiff::Mom_h) + mu_turb(i, j-1, k, EddyDiff::Mom_h) );
Real mu_12 = rhoAlpha + 2.0*mu_bar;
Real mu_12 = rho_bar*mu_eff + 2.0*mu_bar;
tau12(i,j,k) *= -mu_12;
},
[=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
Real rhoAlpha = cell_data(i, j, k, Rho_comp) * mu_eff;
Real rho_bar = 0.25*( cell_data(i-1, j, k , Rho_comp) + cell_data(i, j, k , Rho_comp)
+ cell_data(i-1, j, k-1, Rho_comp) + cell_data(i, j, k-1, Rho_comp) );
Real mu_bar = 0.25*( mu_turb(i-1, j, k , EddyDiff::Mom_v) + mu_turb(i, j, k , EddyDiff::Mom_v)
+ mu_turb(i-1, j, k-1, EddyDiff::Mom_v) + mu_turb(i, j, k-1, EddyDiff::Mom_v) );
Real mu_13 = rhoAlpha + 2.0*mu_bar;
Real mu_13 = rho_bar*mu_eff + 2.0*mu_bar;
tau13(i,j,k) *= -mu_13;
},
[=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
Real rhoAlpha = cell_data(i, j, k, Rho_comp) * mu_eff;
Real rho_bar = 0.25*( cell_data(i, j-1, k , Rho_comp) + cell_data(i, j, k , Rho_comp)
+ cell_data(i, j-1, k-1, Rho_comp) + cell_data(i, j, k-1, Rho_comp) );
Real mu_bar = 0.25*( mu_turb(i, j-1, k , EddyDiff::Mom_v) + mu_turb(i, j, k , EddyDiff::Mom_v)
+ mu_turb(i, j-1, k-1, EddyDiff::Mom_v) + mu_turb(i, j, k-1, EddyDiff::Mom_v) );
Real mu_23 = rhoAlpha + 2.0*mu_bar;
Real mu_23 = rho_bar*mu_eff + 2.0*mu_bar;
tau23(i,j,k) *= -mu_23;
});
}
Expand Down
Binary file modified Tests/ERFGoldFiles/DensityCurrent/Level_0/Cell_D_00000
Binary file not shown.
Binary file modified Tests/ERFGoldFiles/DensityCurrent/Level_0/Cell_D_00001
Binary file not shown.
Binary file modified Tests/ERFGoldFiles/DensityCurrent/Level_0/Cell_D_00002
Binary file not shown.
Binary file modified Tests/ERFGoldFiles/DensityCurrent/Level_0/Cell_D_00003
Binary file not shown.
16 changes: 8 additions & 8 deletions Tests/ERFGoldFiles/DensityCurrent/Level_0/Cell_H
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ FabOnDisk: Cell_D_00002 0
FabOnDisk: Cell_D_00003 0

4,8
6.5098892847219159e-01,-2.0420913278470323e-03,0.0000000000000000e+00,-4.4806219893056098e-04,2.9999999984644018e+02,4.4463890028261158e+04,6.5098892858777935e-01,4.4463890017208279e+04,
6.4836911721902990e-01,-7.9261130506087274e-01,0.0000000000000000e+00,-2.1904634438321127e+00,2.8340212490314906e+02,4.4463890028261158e+04,6.5098892858777935e-01,4.4213577874547729e+04,
6.4836911721902990e-01,-9.5510070445028683e-01,0.0000000000000000e+00,-2.1904634438321127e+00,2.8340212490314906e+02,4.4463890028261158e+04,6.5098892858777935e-01,4.4213577874547729e+04,
6.5098892847219159e-01,-1.5668252573241824e-03,0.0000000000000000e+00,-4.4806219893056098e-04,2.9999999984644018e+02,4.4463890028261158e+04,6.5098892858777935e-01,4.4463890017208279e+04,
6.5098892847193790e-01,-2.0418835990748977e-03,0.0000000000000000e+00,-4.4803493663859122e-04,2.9999999984644018e+02,4.4463890028261158e+04,6.5098892858777935e-01,4.4463890017184007e+04,
6.4836893180468114e-01,-7.9260529722221518e-01,0.0000000000000000e+00,-2.1904806103671612e+00,2.8340212496085053e+02,4.4463890028261158e+04,6.5098892858777935e-01,4.4213560173266931e+04,
6.4836893180468114e-01,-9.5512978283271610e-01,0.0000000000000000e+00,-2.1904806103671257e+00,2.8340212496085059e+02,4.4463890028261158e+04,6.5098892858777935e-01,4.4213560173266931e+04,
6.5098892847193790e-01,-1.5670219933390387e-03,0.0000000000000000e+00,-4.4803493663859122e-04,2.9999999984644018e+02,4.4463890028261158e+04,6.5098892858777935e-01,4.4463890017184007e+04,

4,8
1.1567295137476765e+00,1.5668252573241824e-03,0.0000000000000000e+00,7.4404952667202532e-04,3.0000000000000011e+02,9.9432624223818915e+04,1.1567294111744995e+00,9.9432636567905924e+04,
1.1615311171044385e+00,9.5510070445028683e-01,0.0000000000000000e+00,3.2285807511691522e-01,3.0002669784901974e+02,9.9432624223818915e+04,1.1567294111744995e+00,1.0001096102739424e+05,
1.1615311171044385e+00,7.9261130506087274e-01,0.0000000000000000e+00,3.2285807511691522e-01,3.0002669784901974e+02,9.9432624223818915e+04,1.1567294111744995e+00,1.0001096102739424e+05,
1.1567295137476765e+00,2.0420913278470323e-03,0.0000000000000000e+00,7.4404952667202532e-04,3.0000000000000011e+02,9.9432624223818915e+04,1.1567294111744995e+00,9.9432636567905924e+04,
1.1567295136790348e+00,1.5670219933390387e-03,0.0000000000000000e+00,7.4403897400177922e-04,3.0000000000000006e+02,9.9432624223818915e+04,1.1567294111744995e+00,9.9432636559645209e+04,
1.1615310052856855e+00,9.5512978283270333e-01,0.0000000000000000e+00,3.2286310089996639e-01,3.0002669784914963e+02,9.9432624223818915e+04,1.1567294111744995e+00,1.0001094754834003e+05,
1.1615310052856855e+00,7.9260529722218953e-01,0.0000000000000000e+00,3.2286310089996428e-01,3.0002669784914963e+02,9.9432624223818915e+04,1.1567294111744995e+00,1.0001094754834003e+05,
1.1567295136790348e+00,2.0418835990748977e-03,0.0000000000000000e+00,7.4403897400177922e-04,3.0000000000000006e+02,9.9432624223818915e+04,1.1567294111744995e+00,9.9432636559645209e+04,

26 changes: 15 additions & 11 deletions Tests/ERFGoldFiles/DensityCurrent/job_info
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
===============================================================================
ERF Job Information
===============================================================================
inputs file: /home/almgren/GitCode/ERF/build/Tests/test_files/DensityCurrent/DensityCurrent.i
inputs file: DensityCurrent.i

number of MPI processes: 4

CPU time used since start of simulation (CPU-hours): 0.000977724
CPU time used since start of simulation (CPU-hours): 0.000525277

===============================================================================
Plotfile Information
===============================================================================
output data / time: Wed Jan 3 15:08:01 2024
output dir: /home/almgren/GitCode/ERF/build/Tests/test_files/DensityCurrent
output data / time: Mon Jan 22 10:12:40 2024
output dir: /lustre/eaglefs/projects/erf/equon/ERF/Tests/test_files/DensityCurrent


===============================================================================
Build Information
===============================================================================
build date: Jan 3 2024 15:07:47
build machine: Linux manda 5.15.0-76-generic #83~20.04.1-Ubuntu SMP Wed Jun 21 20:23:31 UTC 2023 x86_64
build dir: /home/almgren/GitCode/ERF/build/Exec
AMReX dir: /home/almgren/GitCode/ERF/Submodules/AMReX
build date: Jan 22 2024 10:10:28
build machine: Linux ed5 3.10.0-1062.9.1.el7.x86_64 #1 SMP Fri Dec 6 15:49:49 UTC 2019 x86_64
build dir: /lustre/eaglefs/projects/erf/equon/ERF/MyBuild/Exec
AMReX dir: /lustre/eaglefs/projects/erf/equon/ERF/Submodules/AMReX

COMP: GNU
COMP version: 9.4.0
COMP version: 8.4.0


ERF git hash: 23.12-30-ga209eb38b6a7-dirty
AMReX git hash: 23.11-23-g9b733ec45cd9
ERF git hash: 23.11-154-gc290c0ad3b3a-dirty
AMReX git hash: 24.01


===============================================================================
Expand Down Expand Up @@ -149,6 +149,10 @@ amrex.async_out_nfiles = 64
amrex.vector_growth_factor = 1.5
machine.verbose = 0
machine.very_verbose = 0
tiny_profiler.device_synchronize_around_region = 0
tiny_profiler.verbose = 0
tiny_profiler.v = 0
amrex.use_profiler_syncs = 0
geometry.coord_sys = 0
amr.grid_eff = 0.69999999999999996
amr.refine_grid_layout = 1
Expand Down

0 comments on commit 1ebf0bd

Please sign in to comment.