CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

adjointOptimisationFoam not converging

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 16, 2024, 09:34
Default adjointOptimisationFoam not converging
  #1
New Member
 
Elvis
Join Date: Jan 2024
Posts: 2
Rep Power: 0
Elvis_M is on a distinguished road
Hello everyone,
I use adjointOptimisationFoam to shape-optimize a geometry consisting of several cubes. The solver was slightly modified, the apparent porosity in the Navier-Stokes equation was removed. Compiling works and simulating other geometries also worked.

My problem is that the adjoint system of equations does not converge and always diverges after a few 1000 iterations (due to large continuity error). The primal system converges.

I have attached pictures of the primal and adjoint residuals.

I tried the following:
- Refine mesh
- Vary relaxation factors
- Increase cylinder diameter

I will also try do increase the cylinder length before and after the geometry.
Do you have any ideas what else I can try?

This is my fvSolution:
Code:
solvers
{
    "(p|pa)"
    {
        solver          GAMG;
        tolerance       1e-08;
        relTol          0.001;  // was 0.01	
        smoother        GaussSeidel;
    }

    "(U|Ua)"
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        nSweeps         2;
        tolerance       1e-08;
        relTol          0.01; // was 0.1
    }
}

SIMPLE
{
    nCorrectors 3;
	nNonOrthogonalCorrectors 0;
	momentumPredictor   yes;
}

relaxationFactors
{
    fields
    {
        p               0.1; // was 0.3
		pa              0.1; // was 0.2
        alpha           0.1; // was 0.1
    }
    equations
    {
        U                          0.1; // was 0.7
		Ua                         0.1; // was 0.3
    }
}
Thanks in advance,
Elvis
Attached Images
File Type: png Residuals adjoint.PNG (120.6 KB, 14 views)
File Type: png Residuals primal.PNG (75.9 KB, 10 views)
Elvis_M is offline   Reply With Quote

Old   June 6, 2024, 06:37
Default
  #2
Member
 
André Pinto
Join Date: Oct 2017
Location: Brussels, Belgium
Posts: 84
Rep Power: 9
AndreP is on a distinguished road
If you're still struggling with this, from personal experience I noticed that divergency is quite sensitive to the fvSchemes.

Have a look at your gradSchemes and divSchemes, for me it helped going to upwind instead of linearUpwind (2nd order). Indeed accuracy is sacrificed, but it's a good first step to realize where is the problem.

Otherwise, a good tip to see where the problem is coming from, is to stop the solver when the simulation is on the early stages of divergency (have a look at the log file, and make the simulation stop a few iterations after initial stages of divergency), then use Paraview or other post process to plot velocity/pressure or adjoint fields so you can see where the problem is starting, this might give you some hints what's causing the divergency (whether it's meshing, boundary conditions, etc etc etc)
AndreP is offline   Reply With Quote

Old   June 6, 2024, 07:38
Default
  #3
New Member
 
Elvis
Join Date: Jan 2024
Posts: 2
Rep Power: 0
Elvis_M is on a distinguished road
Thank you for your reply! I tried adjusting fvschemes but that didn't solve the problem. But after increasing the cylinder length and width the simulation finally converged.
Elvis_M is offline   Reply With Quote

Reply

Tags
adjointoptimisationfoam, convergence, shape optimization


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Residuals not converging thorbo FLUENT 1 November 1, 2023 09:36
Moment monitor not converging in transient simulation saikath65 FLUENT 0 August 21, 2020 09:58
Temperatures not converging Dharma Vedula Main CFD Forum 3 April 20, 2019 11:47
acceptable converging? wales FLUENT 8 January 19, 2016 03:39
Wall scale not converging arunraj CFX 1 October 3, 2011 18:52


All times are GMT -4. The time now is 08:24.