Skip to content

Conversation

@jtneedels
Copy link
Contributor

@jtneedels jtneedels commented Jan 12, 2021

Proposed Changes

  • Additional source terms are implemented in the residual computation for NEMO planar axisymmetric flows. This allows inviscid and viscous axisymmetric simulations.

Related Work

PR Checklist

Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with the '-Wall -Wextra -Wno-unused-parameter -Wno-empty-body' compiler flags, or simply --warnlevel=2 when using meson).
  • My contribution is commented and consistent with SU2 style.
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp) , if necessary.

…mulation

Signed-off-by: jtneedels <jneedels@stanford.edu>
…es up to eliminate compiler warnings

Signed-off-by: jtneedels <jneedels@stanford.edu>
@jtneedels jtneedels changed the base branch from master to develop January 12, 2021 19:53
@jtneedels jtneedels requested a review from WallyMaier January 12, 2021 19:57
@jtneedels jtneedels changed the title Addition of Source Terms for NEMO Axisymmetric flows Addition of Source Terms for NEMO Axisymmetric Flows Jan 12, 2021
Copy link
Contributor

@WallyMaier WallyMaier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jtneedels thanks for deriving these source terms. They will be very helpful!

Please find my comments above

su2double u = V_i[VEL_INDEX];
su2double v = V_i[VEL_INDEX+1];

qy_ve = kve*GV[TVE_INDEX][1];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could do something similar here: "su2double qy_ve"

Again, this just aesthetic

}
}

auto residual = numerics->ComputeAxisymmetric(config);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something is off with your spacings here

Res_TruncError.resize(nPoint,nVar) = su2double(0.0);

/*--- Size Grad_AuxVar for axiysmmetric ---*/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spacings

… term, addressed PR comments (spacing, initialization)

Signed-off-by: jtneedels <jneedels@stanford.edu>
Signed-off-by: jtneedels <jneedels@stanford.edu>
Copy link
Contributor

@WallyMaier WallyMaier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me! I think you should wait for another approval before pushing.

@pcarruscag
Copy link
Member

@jtneedels the testcases currently failing are my fault, they will be fixed in a minute.

Copy link
Contributor

@CatarinaGarbacz CatarinaGarbacz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jtneedels . good work. I just made some minor comments, I didn't notice anything "big", so for me it's a GO

residual[nSpecies+3] = yinv*rhov*U_i[nSpecies+nDim+1]/rho*Volume;

if (viscous) {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra line here

for (iSpecies = 0; iSpecies < nHeavy; iSpecies++) {
sumJhs_y += (rho*Ds[iSpecies]*GV[RHOS_INDEX+iSpecies][1] - V_i[RHOS_INDEX+iSpecies]*Vector[1]) * hs[iSpecies];
sumJeve_y += (rho*Ds[iSpecies]*GV[RHOS_INDEX+iSpecies][1] - V_i[RHOS_INDEX+iSpecies]*Vector[1]) * eve_i[iSpecies];
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can just ident this 2 lines for aesthetics (the += part)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not spend too much time with that kind of alignment, eventually we will run clang-format on the entire code... The only thing you can do to make code look good is to write small functions.

eAxi_local++;
}

}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra line between between the brackets

Copy link
Contributor Author

@jtneedels jtneedels Jan 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Catarina, I think I've addressed this and the other comments on formatting.

Signed-off-by: jtneedels <jneedels@stanford.edu>
Signed-off-by: jtneedels <jneedels@stanford.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants