|
[Sponsors] |
July 28, 2016, 21:50 |
Help with Discrete adjoint in SU2
|
#1 |
New Member
Anand Pratap Singh
Join Date: Jul 2014
Posts: 1
Rep Power: 0 |
Hi,
I have some issues trying to use discrete adjoint on SU2. It will be really helpful if you could provide me some pointers. My problem setup is as follows: I am using the setup of discadj_naca0012 at AoA = 10 degree with NO change in configuration file (except for changing direct to discrete_adoint). My design variable (beta) is a field of size = number of grid points, I multiply these to the corresponding SA production in CSourcePieceWise_TurbSA::ComputeResidual. Therefore dRdbeta = Production and hence dobjective_dbeta = psi_sa*Production (assuming no explicit dependence of objective on beta). I write out the production from CSourcePieceWise_TurbSA::ComputeResidual function. Using this, I get the following solution: dCd_finite diff: -0.01165 dCd_adjoint @ beta_{all} = 1 + 1e-2 (perturb all beta) -0.000184900879096 dCd_adjoint @ beta__{all} = 1 - 1e-2 -0.000181856832584 avg dCd_adjoint -0.00018337885584 I am printing sum_i {dobjective_dbeta_i} or total derivative. Apart from trivial errors, which I have checked multiple times, I could think of following reasons for this discrepancy: 1. Since the error is so large I thought whether I am missing some internal normalization of the production term. I tried bunch of scaling without any luck. Essentially the dimensions of Production should be consistent with psi_sa in restart file. Do you think this can be an issue? 2. The AD part in the function CSourcePieceWise_TurbSA::ComputeResidual is commented out, is it correct? To verify I calculated dCd_dmach for the same case, which are as follows: dCd_fd: - 0.07515 dCd_adjoint @ .15 + 0.01 -0.098246 dCd_adjoint @ .15 - 0.01 -0.12189 avg dCd_adjoint -0.110068 This at least seem reasonable, however in this case the sensitivity is weakly dependent on turbulence model so its effect might not show up. I would greatly appreciate if you could provide some pointers on these issues. The only two changes I made was to read beta field from a file and multiply to the SA production and write out production to a file. commit history: https://github.com/anandpratap/SU2/c...756a2abf649f4e Thanks, |
|
Tags |
adjoint solver |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
wrong SU2 calculation for lift and drag coefficient for NAC4421 | mechy | SU2 | 7 | January 9, 2017 05:18 |
The discrete adjoint method uses too large memory. | Yminjo | SU2 | 1 | April 27, 2016 10:52 |
hard to convergent with SU2 4.0 for Euler adjoint | Xianguu | SU2 | 1 | July 14, 2015 17:09 |
Discrete Adjoint Euler Computation | doan.nak | SU2 | 2 | June 6, 2014 04:01 |
best setting for SU2 | mechy | SU2 | 3 | April 20, 2014 19:13 |