Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SST #301

Merged
merged 52 commits into from
Sep 6, 2023
Merged

SST #301

merged 52 commits into from
Sep 6, 2023

Conversation

DavidAnderegg
Copy link
Collaborator

@DavidAnderegg DavidAnderegg commented Jul 29, 2023

Purpose

I took the turbfix branch, updated it to master and started working on SST.

The biggest Problem with differentiating SST was the blending function f1 as it had some mpi-communication inside. I managed to get rid of this communication by extending d2wall to both layers of halo cells.

This is not production ready, but a bit of progress has been made. The following list explains what works and what doesn't in a random order:

  • forward partials seem to be correct

  • backwards partials seem to be correct apart from nodal forces

  • backwards_fast partials are all over the place

  • ANK/NK does work with ADPC, but early on DADI is more efficient

  • ANK/NK does not really work using FDPC, i suspect SST is highly non-linear and maybe the step is poorly chosen for this model. Not sure

  • Physicality check for SST-ANK probably needs adjustment as i sometimes encountered NaNs

  • Adjoint using forward routines does converge and aerodynamic derivatives seem to be correct, the geometric ones are not

  • Adjoint using backwards_fast routines does converge, but the derivatives are very wrong

  • There is probably a bug in the backwards routines for the d2wall extension I introduced

Grid Convergence
I also run a grid-convergence for the 2D bump testcase here:

  • The offset is probably because I used strain for turbulence production instead of vorticity

Solver Convergence
Convergence plot for a NACA0012 testcase:

  • modified is the current state and base was the state before
  • the first 6 orders of magnitude were converged using ANK with DADI for turbulence, after that, CSANK with ADPC did the rest.

Gradients
Relative tolerance of gradients (d Cl / d x) compared to CS with a stepsize of 1e-200 using the tutorial wing

  • I am not sure why a step size of 1e-40 is so different to 1e-200. I think it is because SST appears to be highly-nonlinear
  • I do consider the aerodynamic gradients obtained with the forward routines as correct although the difference to CS is quite big. I think this is also explainable by the high non-linearity. Tuning some options might also improve this.
  • The number of cpus has an impact for geometric derivatives. This i why I think there is a bug in the wall-distance changes I introduced.

Expected time until merged

I dont know.

Type of change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (non-backwards-compatible fix or feature)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Documentation update
  • Maintenance update
  • Other (please describe)

Testing

I extended the basic tests such as test_jacVecProdBWDFast.py, test_jacVecProdFWD.py, test_functionals.py and test_adjoint.jpy. But as indicated above, most do not pass.

Checklist

  • I have run flake8 and black to make sure the Python code adheres to PEP-8 and is consistently formatted
  • I have formatted the Fortran code with fprettify or C/C++ code with clang-format as applicable
  • I have run unit and regression tests which pass locally with my changes
  • I have added new tests that prove my fix is effective or that my feature works
  • I have added necessary documentation

DGCaprace and others added 30 commits January 21, 2021 09:59
…el, and turbulence residuals equal to 0 in all other models except SA. See related issue !99.
…n -fcheck=all. GCC complained about passing a non-allocated allocatable as an argument.
…ty with includeHalo=true. However, we should be able to compute eddyVisc in the halo region using BCs, which is what is done right after.
…stency with the call to compute EddyViscosity. However, production terms contain a FD derivative so it should never be evaluated in halo cells.
… is still available, but we set the 2003 as default using a compilation flag SST_2003. This change was made because a lot of convergence issues were observed with the original one, and it seemed to be relaxed a bit with the 2003 version. It also seems to be the version most often implemented in other codes.
…g out the correctForK on simplePressure for performance reason.
…lence and flow residuals. As indicated in code comments, the turbulence residuals should be computed first so that K can be used later in the flow residual, for we need to correct rho and E.
@anilyil anilyil changed the base branch from turb-bugfix to sst_dev September 6, 2023 13:20
@anilyil anilyil marked this pull request as ready for review September 6, 2023 13:21
@anilyil anilyil requested a review from a team as a code owner September 6, 2023 13:21
@anilyil anilyil requested review from eirikurj and anilyil and removed request for a team September 6, 2023 13:21
@anilyil anilyil merged commit 761ea10 into mdolab:sst_dev Sep 6, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants