|
[Sponsors] |
adjointShapeOptimizationFoam checkerboarding inlet |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 14, 2012, 06:52 |
adjointShapeOptimizationFoam checkerboarding inlet
|
#1 |
Member
Roland
Join Date: Mar 2009
Location: Netherlands
Posts: 93
Rep Power: 17 |
For an optimization study I am working with an Ahmed body using adjointShapeOptimizationFoam.
As you can see from the picture 'ahmed_alpha.jpg' the solver works really well near the body, trying to extend the body with an aerodynamic fairing. However near the inlet I am experiencing a strange checkerboarding problem in my adjoint equations, see pictures 'ahmed_pa.jpg' and 'ahmend_Ua.jpg'. All pictures are taken after (only) 100 iterations.After a further several hundred iterations the adjoint flow field fully diverges. The primal flow field is smooth, as expected, see pictures 'ahmed_p.jpg' and 'ahmed_U.jpg'. The adjoint boundary conditions are taken from the adjointShapeOptimizationFoam tutorial (see below), as are the values for lambda and alphaMax. The fvSolution and fvSchemes settings (see below) are based on the tutorials with lower adjoint relaxations and uncorrected in stead of corrected schemes. Lower values of relTol and relaxation where also tested, but without improvements. CheckMesh reports 'Mesh OK', with no warnings. Does anyone have suggestions on how best to solve this? Thanks! regards, Sylvester Code:
solvers { "(p|pa)" { solver GAMG; tolerance 1e-08; relTol 0.01; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 2; cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; } "(U|Ua|k|omega)" { solver smoothSolver; smoother GaussSeidel; nSweeps 2; tolerance 1e-08; relTol 0.1; } } SIMPLE { nNonOrthogonalCorrectors 0; } relaxationFactors { fields { p 0.3; pa 0.1; alpha 0.1; } equations { U 0.7; Ua 0.1; "(k|omega)" 0.7; } Code:
ddtSchemes { default steadyState; } gradSchemes { default Gauss linear; } divSchemes { default Gauss upwind; div((nuEff*dev(T(grad(U))))) Gauss linear; div((nuEff*dev(T(grad(Ua))))) Gauss linear; } laplacianSchemes { default Gauss linear uncorrected; } interpolationSchemes { default linear; } snGradSchemes { default uncorrected; } fluxRequired { default no; p; pa; } Code:
FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [ 0 2 -2 0 0 0 0 ]; internalField uniform 0; boundaryField { ".*" { type zeroGradient; } outlet { type adjointOutletPressure; value uniform 0; } symmetry { type symmetryPlane; } } Code:
FoamFile { version 2.0; format ascii; class volVectorField; object Ua; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [ 0 1 -1 0 0 0 0 ]; internalField uniform ( -1 0 0 ); boundaryField { ".*" { type fixedValue; value uniform ( 0 0 0 ); } inlet { type fixedValue; value uniform ( -1 0 0 ); } outlet { type adjointOutletVelocity; value uniform ( 0 0 0 ); } farfield { type slip; } symmetry { type symmetryPlane; } } Last edited by sylvester; June 14, 2012 at 07:00. Reason: added checkMesh info |
|
June 19, 2012, 05:46 |
pseudo staggered approach for the adjoint equations
|
#2 |
Member
Roland
Join Date: Mar 2009
Location: Netherlands
Posts: 93
Rep Power: 17 |
Hi!
Using a pseudo staggered approach for the adjoint equations helps, see the images below. I've modified adjointShapeOptimizationFoam a bit so it uses the pseudo staggered grid approach also used in, for example, buoyantBoussinesqSimpleFoam. As you can see in the images, this approach removes the checkerboarding near the floor, but it does not completely remove it over the full surface of the inlet. The adjoint equations only diverge at the inlet, the rest of the domain are OK. The second image also shows that the calculation of 'alpha' is unaffected by the pseudo staggering. Any directions on how to proceed would be much appreciated! Regards, Sylvester |
|
January 7, 2013, 16:51 |
|
#3 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
hi.how did you solved the problem?can this solver be used for compressible flows?could you introduce me some useful papers or texts about using the method?i want to know how points are changed according to this solver.can it be used with optimization algorithms like ant colony or other ones?thank you.
|
|
January 8, 2013, 05:38 |
|
#4 |
Member
Roland
Join Date: Mar 2009
Location: Netherlands
Posts: 93
Rep Power: 17 |
Hi,
I haven't been able to work on this, so not much progress has been made. The adjoint solver in OpenFOAM is for incompressible flows only. For compressible flows the adjoint equations also exist, so you should be able to make a compressible version. A Google search will probably provide you with references on this. regards, Sylvester |
|
January 8, 2013, 06:44 |
|
#5 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
thanks.if send me a suitable to start pdf ill be very thankful to you!
Force.of.love@gmail.com |
|
May 28, 2018, 11:36 |
|
#6 |
New Member
Join Date: Jan 2017
Posts: 22
Rep Power: 9 |
Hi!
I know its been a while since this post started. Any news? I am facing the same problem. Even though I was able to have some better results by using a limited grad(Ua) and relaxation factors higher for pa than Ua, I would say that something inside the solver needs attention. If you check adjoint velocities at the inlet, they point to an akward direction, this make confuse sensitivities and inlet of the domains happens to have some checkerboard. See this other post: adjointShapeOptimizationFoam - inlet velocity weird behavior I still was not able to fix this (if this is something that needs to be fixed). Regards, Okubo Last edited by C. Okubo; May 28, 2018 at 18:11. |
|
Tags |
adjoint, ahmed, checkerboarding, instability, optimization |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
VOF Volume fraction in Velocity inlet | aruelle | FLUENT | 2 | May 10, 2024 11:17 |
Oscillating inlet BC | November | OpenFOAM | 4 | March 21, 2012 21:46 |
Velocity inlet boundary condition for porous medium | Chander | CFX | 3 | March 11, 2012 22:18 |
Inlet Velocity in CFX | aeroman | CFX | 12 | August 6, 2009 19:42 |
Diffusion component at inlet | Balaji | FLUENT | 2 | August 8, 2005 08:37 |