Skip to content

Function in CNS_derive.cpp #2351

Answered by WeiqunZhang
wazedxwxx asked this question in Q&A
Discussion options

You must be logged in to vote

These functions are used to compute so-called derived variables. You don't seem to see a difference by deleting the function body, because they are only used in writing plotfiles. They compute pressure and velocity based on conservative variables. I assume what p = (gamma-1)*rhoe does is obvious. In cns_dervel, dat(i,j,k,1) is rho*vx and dat(i,j,k,0) is rho as specified in CNS_setup.cpp

    // Velocities                                                                                                                                                                                          
    derive_lst.add("velocity",IndexType::TheCellType(),AMREX_SPACEDIM,
                   {AMREX_D_DECL…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by wazedxwxx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants