Skip to content

Commit

Permalink
fix 3D velocity diffusion
Browse files Browse the repository at this point in the history
  • Loading branch information
celdredsandia committed Nov 7, 2023
1 parent dcbe9aa commit 3cf8b84
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions dynamics/spam/src/models/extrudedmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -1537,7 +1537,7 @@ class ModelTendencies : public ExtrudedTendencies {
YAKL_SCOPE(primal_geometry, this->primal_geometry);
YAKL_SCOPE(dual_geometry, this->dual_geometry);

// *d*d
// *d*d = vort
parallel_for(
"Velocity diffusion 1",
SimpleBounds<4>(primal_topology.nl, primal_topology.n_cells_y,
Expand Down Expand Up @@ -1607,7 +1607,7 @@ class ModelTendencies : public ExtrudedTendencies {
i, j, k, n);
for (int d = 0; d < ndims; ++d) {
Vtendvar(d, k + pks, j + pjs, i + pis, n) +=
velocity_coeff * vdiff(d);
velocity_vort_horiz_diffusion_coeff * vdiff(d);
}
});

Expand All @@ -1621,10 +1621,10 @@ class ModelTendencies : public ExtrudedTendencies {
wdiff, FWvar, primal_geometry, dual_geometry, pis, pjs, pks, i, j,
k, n);
Wtendvar(0, k + pks, j + pjs, i + pis, n) +=
velocity_coeff * wdiff(0);
velocity_vort_vert_diffusion_coeff * wdiff(0);
});

// d*d*
// d*d* = div
parallel_for(
"Velocity diffusion 7",
SimpleBounds<4>(dual_topology.nl, dual_topology.n_cells_y,
Expand Down Expand Up @@ -1679,7 +1679,7 @@ class ModelTendencies : public ExtrudedTendencies {
compute_D0<1>(vdiff, dens0var, pis, pjs, pks, i, j, k, n);
for (int d = 0; d < ndims; ++d) {
Vtendvar(d, pks + k, pjs + j, pis + i, n) -=
velocity_coeff * vdiff(0, d);
velocity_div_horiz_diffusion_coeff * vdiff(0, d);
}
});

Expand All @@ -1691,7 +1691,7 @@ class ModelTendencies : public ExtrudedTendencies {
SArray<real, 1, 1, 1> wdiff;
compute_D0_vert<1>(wdiff, dens0var, pis, pjs, pks, i, j, k, n);
Wtendvar(0, pks + k, pjs + j, pis + i, n) -=
velocity_coeff * wdiff(0);
velocity_div_vert_diffusion_coeff * wdiff(0);
});

yakl::timer_stop("add_velocity_diffusion");
Expand Down
Binary file not shown.
4 changes: 2 additions & 2 deletions standalone/mmf_simplified/pam-c/set_pamc_cmakevars.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

add_cmake_vars=" -DPAMC_MODEL=extrudedmodel "
add_cmake_vars+=" -DPAMC_HAMIL=man "
add_cmake_vars+=" -DPAMC_THERMO=constkappavirpottemp "
add_cmake_vars+=" -DPAMC_HAMIL=an "
add_cmake_vars+=" -DPAMC_THERMO=idealgaspottemp "
add_cmake_vars+=" -DPAMC_IO=serial "

#ce mce_rho an man
Expand Down

0 comments on commit 3cf8b84

Please sign in to comment.