Skip to content

Commit

Permalink
output bulk viscosity in plotfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
isriva committed Sep 21, 2023
1 parent b2f3450 commit 1fd3499
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src_compressible_stag/compressible_functions_stag.H
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ void WritePlotFileStag(int step,
const MultiFab& surfcovMeans,
const MultiFab& surfcovVars,
const MultiFab& eta,
const MultiFab& kappa);
const MultiFab& kappa,
const MultiFab& zeta);

void WriteSpatialCross3D(const Vector<Real>& spatialCross, int step, const Geometry& geom, const int ncross);

Expand Down
4 changes: 2 additions & 2 deletions src_compressible_stag/main_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ void main_driver(const char* argv)

if (plot_int > 0) {
WritePlotFileStag(0, 0.0, geom, cu, cuMeans, cuVars, cumom, cumomMeans, cumomVars,
prim, primMeans, primVars, vel, velMeans, velVars, coVars, surfcov, surfcovMeans, surfcovVars, eta, kappa);
prim, primMeans, primVars, vel, velMeans, velVars, coVars, surfcov, surfcovMeans, surfcovVars, eta, kappa, zeta);
#if defined(TURB)
if (turbForcing > 0) {
EvaluateWritePlotFileVelGrad(0, 0.0, geom, vel, vel_decomp);
Expand Down Expand Up @@ -1145,7 +1145,7 @@ void main_driver(const char* argv)
//yzAverage(cuMeans, cuVars, primMeans, primVars, spatialCross,
// cuMeansAv, cuVarsAv, primMeansAv, primVarsAv, spatialCrossAv);
WritePlotFileStag(step, time, geom, cu, cuMeans, cuVars, cumom, cumomMeans, cumomVars,
prim, primMeans, primVars, vel, velMeans, velVars, coVars, surfcov, surfcovMeans, surfcovVars, eta, kappa);
prim, primMeans, primVars, vel, velMeans, velVars, coVars, surfcov, surfcovMeans, surfcovVars, eta, kappa, zeta);

#if defined(TURB)
if (turbForcing > 0) {
Expand Down
14 changes: 13 additions & 1 deletion src_compressible_stag/writePlotFileStag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ void WritePlotFileStag(int step,
const amrex::MultiFab& surfcovMeans,
const amrex::MultiFab& surfcovVars,
const amrex::MultiFab& eta,
const amrex::MultiFab& kappa)
const amrex::MultiFab& kappa,
const amrex::MultiFab& zeta)
{
BL_PROFILE_VAR("writePlotFileStag()",writePlotFileStag);

Expand All @@ -38,11 +39,13 @@ void WritePlotFileStag(int step,
// prim: [vx, vy, vz, T, p, Yk, Xk] -- 5 + 2*nspecies
// shifted [vx, vy, vz] -- 3
// eta, kappa -- 2
// zeta -- 1 (only when visc_type = 3)
nplot += nvars;
nplot += 3;
nplot += 5 + 2*nspecies;
nplot += 3;
nplot += 2;
if (amrex::Math::abs(visc_type) == 3) nplot += 1;

if (nspec_surfcov>0) nplot += nspec_surfcov;

Expand Down Expand Up @@ -132,6 +135,14 @@ void WritePlotFileStag(int step,
amrex::MultiFab::Copy(plotfile,kappa,0,cnt,numvars,0);
cnt+=numvars;

// instantaneous
// zeta -- 1
if (amrex::Math::abs(visc_type) == 3) {
numvars = 1;
amrex::MultiFab::Copy(plotfile,zeta,0,cnt,numvars,0);
cnt+=numvars;
}

// instantaneous
// surfcov -- nspec_surfcov
if (nspec_surfcov>0) {
Expand Down Expand Up @@ -277,6 +288,7 @@ void WritePlotFileStag(int step,

varNames[cnt++] = "eta";
varNames[cnt++] = "kappa";
if (amrex::Math::abs(visc_type) == 3) varNames[cnt++] = "zeta";

if (nspec_surfcov>0) {
x = "surfcov_";
Expand Down

0 comments on commit 1fd3499

Please sign in to comment.