|
[Sponsors] |
![]() |
![]() |
#1 |
Member
Zhen ZHANG
Join Date: Jun 2018
Location: Beijing, China
Posts: 56
Rep Power: 8 ![]() |
Hi all,
I met a problem when I used the discrete adjoint solver to restart the calculation. First, the discrete adjoint solver gets converged (1e-12) and exports the restart file. Second #1, read the restart file and calculate 1 step, the residual becomes 1e-2 Second #2, read the restart file and calculate 0 steps, Adjoint_Nu_Tilde differs from the converged values while other Ajdoint values keep exactly the same as before. So maybe there are some bugs in the treatment of the discrete solver. Btw, I used 30 cores with mpi, calculated 3D RANS with the S-A model and ROE scheme, and modified the second recording to calculate derivatives w.r.t the turbulent Prandtl number on each node. I am based on v7.2.0. Zhen |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Pedro Gomes
Join Date: Dec 2017
Posts: 466
Rep Power: 13 ![]() |
Hi Zhen,
There some known difficulties with restarting the adjoint mode. But you should get the same results if you let it converge in the restarted run. Have you tried that? |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Member
na
Join Date: Jul 2018
Posts: 90
Rep Power: 8 ![]() |
Hi,
I am currently fixing a similar issue for CHT (flow + solid head conduction). See https://github.com/su2code/SU2/issues/1395 for the approach I take to tackle the problem. I am not fully understand your approach tbh. Best Tobi |
|
![]() |
![]() |
![]() |
![]() |
#4 | |
Member
Zhen ZHANG
Join Date: Jun 2018
Location: Beijing, China
Posts: 56
Rep Power: 8 ![]() |
Quote:
Thank you for your reply. Yes, when it converges again, I can get the same results. The only problem is it takes a long time. ![]() Zhen |
||
![]() |
![]() |
![]() |
![]() |
#5 | |
Member
Zhen ZHANG
Join Date: Jun 2018
Location: Beijing, China
Posts: 56
Rep Power: 8 ![]() |
Quote:
Thank you for your reply, too. You focus on the residual with and without the restart. It is also my concern. But what I find is that the residual changes from 1e-12, a converged state, to 1e-2, after I restart the adjoint solver. So I need to calculate for about 20000 steps to let it converge again. The possible reason is that the adjoint solution of the turbulence variable is not correctly stored in the restart file. Zhen |
||
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
|
Not sure if it helps your case, but had similar problem a while back.
If you use MG_ADJFLOW= YES it could be that. Run it with different number of cores like 12.
__________________
since every contribution counts, always good ones are appreciated! |
|
![]() |
![]() |
![]() |
![]() |
#7 | |
Member
Zhen ZHANG
Join Date: Jun 2018
Location: Beijing, China
Posts: 56
Rep Power: 8 ![]() |
Quote:
I did not use MG_ADJFLOW=YES, but I tried the suggestion. I tried with and without MG_ADJFLOW, also with different cores. That problem still occurred. Still thank you for your suggestion ![]() |
||
![]() |
![]() |
![]() |
![]() |
#8 |
Senior Member
|
When your primal solution converges well but the adjoint solution is stable and yet takes lots of time to get converged you may use quasi new acceleration/stabilization.
The RELAXATION_FACTOR_ADJOINT has effects on acceleration. Number of cores has effects on convergence if you are using multi-grid. % ---------------- ADJOINT-FLOW NUMERICAL METHOD DEFINITION -------------------% % % Frozen the slope limiter in the discrete adjoint formulation (NO, YES) FROZEN_LIMITER_DISC= YES % % Frozen the turbulent viscosity in the discrete adjoint formulation (NO, YES) FROZEN_VISC_DISC= YES % % Use an inconsistent spatial integration (primal-dual) in the discrete % adjoint formulation. The AD will use the numerical methods in % the ADJOINT-FLOW NUMERICAL METHOD DEFINITION section (NO, YES) INCONSISTENT_DISC= YES % % Convective numerical method (JST, LAX-FRIEDRICH, ROE) CONV_NUM_METHOD_ADJFLOW= JST % % Time discretization (RUNGE-KUTTA_EXPLICIT, EULER_IMPLICIT) TIME_DISCRE_ADJFLOW= EULER_IMPLICIT % % Relaxation coefficient (also for discrete adjoint problems) RELAXATION_FACTOR_ADJOINT= 2.0 % % Enable (if != 0) quasi-Newton acceleration/stabilization of discrete adjoints QUASI_NEWTON_NUM_SAMPLES= 10 % % Reduction factor of the CFL coefficient in the adjoint problem CFL_REDUCTION_ADJFLOW= 0.8 % % Limit value for the adjoint variable LIMIT_ADJFLOW= 1E6 % % Use multigrid in the adjoint problem (NO, YES) MG_ADJFLOW= YES
__________________
since every contribution counts, always good ones are appreciated! |
|
![]() |
![]() |
![]() |
![]() |
#9 |
Member
Zhen ZHANG
Join Date: Jun 2018
Location: Beijing, China
Posts: 56
Rep Power: 8 ![]() |
Hi Pay,
It really helps! Setting both the quasi-Newton and the frozen increases the convergence speed by 10 times. Thanks a lot! Zhen |
|
![]() |
![]() |
![]() |
![]() |
#10 |
Member
Zhen ZHANG
Join Date: Jun 2018
Location: Beijing, China
Posts: 56
Rep Power: 8 ![]() |
Btw, by freezing the turbulent viscosity, the discrete adjoint solver continues to converge after reading the restart files.
![]() |
|
![]() |
![]() |
![]() |
![]() |
#12 |
Member
Zhen ZHANG
Join Date: Jun 2018
Location: Beijing, China
Posts: 56
Rep Power: 8 ![]() |
Thank both of you! It saves a lot of time in optimization.
|
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
restart error in NEMO Solver | hk.narahari | SU2 | 0 | July 29, 2021 10:27 |
The adjoint equation in the discrete adjoint solver | Zhen ZHANG | SU2 | 3 | July 16, 2021 07:59 |
Working directory via command line | Luiz | CFX | 4 | March 6, 2011 20:02 |
ReactingFoam solver restart | gcollecutt | OpenFOAM Running, Solving & CFD | 0 | August 9, 2007 05:30 |
compressible two phase flow in CFX4.4 | youngan | CFX | 0 | July 1, 2003 23:32 |