Problem with diverging simulation
Hi to everyone guys, I really need some help! I'm running a 3D simulation with adjoint NS equations, but the simulation diverges (residuals seems to remain constant but the error explodes). I've heard that these kind of simulations are really sensitive, and so I would like to set up fvSchemes file with the most conservative/linear/first order schemes, in order to see if the problem is with mesh or with the solution.
Which kind of scheme could I use? Any help is really much appreciated. Thanks a lot Simone |
Any answer please?
|
hi
Use euler method in schemes for more stability.whats the error?give it in code tag. |
Hi thanks for your answer! My simulation is steady-state, so, where could I use Euler method? I was thinking about upwind method instead; could it be correct?
The error is about the adjoint continuity error, which explodes..:) |
Maybe this two posts could help you:
http://www.cfd-online.com/Forums/ope...tml#post370405 http://www.cfd-online.com/Forums/ope...tml#post366429 They seem to have quite basic setup... |
Thank you for the answer Daniele but I had already tried and it didn't work..
|
As far as I know you can't get more stable/diffusive than with the settings printed below.
Possibly you can add some (cell/face) limiter on your gradient scheme (see for example http://www.openfoam.org/docs/user/fv...hp#x20-1120118 or http://openfoamwiki.net/index.php/Op...guide/Limiters or http://www.cfd-online.com/Forums/ope...tml#post281280). Is it possible for you to share your setup? Regards, Sylvester Quote:
|
1 Attachment(s)
Sure sylvester!
Quote:
cheers Simone |
Hi,
Did you start the adjoint calculation with a (roughly) converged primal result? In my experience this is often required. Also updating the 'alpha' field only after you obtain a (roughly) converged adjoint field helps as well. Did you use a custom boundary condition/cost function, or did you use the one supplied with adjointShapeOptimizationFoam? Are you sure your mesh quality is as good as you can get it? The transition from the prism layers to the rest of the domain appears to be a bit coarse to me. regards, Sylvester |
Dear sylvester,
I'm performing shape optimization, not topological optimization as performed by adjointShapeOptimizationFoam solver, so I don't have the alpha field. Instead, I can confirm you that the primal field that I use is "at convergence", so I don't think the problem is that. By the way I suspect, as you said, that the problem could be with the transition between the "boundary layer" and the outer cells..so it could be a good idea to refine that zone? With the primal field no problem appears, but I think that the adjoint problem is a "bit" more sensitive..:) |
Hi Simone,
I'm afraid I can't help you further, as it appears you have already tried all the easy solutions. I am curious though if improving your mesh solved the problem. regards, Sylvester |
Hi again sylvester..I wanted to tell you that the divergence starting from the "spot" has disappeared. Actually, it turned out that checkMesh was failing with the non-orthogonality error..once I've corrected it, that divergence didn't showed up again. However I'm facing another trouble, now at the farfield. Have you ever experienced with your simulations a kind of instability that raises from there? I've tried to change the boundary conditions for the adjoint problem passing from "fixedValue" to "zeroGradient" both for adjoint velocity and adjoint pressure, but the error still remains..any idea??
P.s. now the checkMesh doesn't report any error Cheers Simone |
Hi Simone,
Is it possible for you to share (pictures of) your case? It would really help in diagnosing possible problems. Regarding the instability you see, does it resemble the one shown in the second picture in this post? http://www.cfd-online.com/Forums/ope...tml#post366429 regards, Sylvester |
I'll upload them as soon as possible! :) by the way it seems that the divergence occurs at the farfield to you too..did you fix the problem in some way?
|
2 Attachment(s)
Here's the images sylvester..what do you think? Although the simulation has already "diverged" (take a look to the magnitudes) the problem starts from there..in that edge inlet and outlet patch touch..
let me know what do you think about it cheers Simone |
Hi,
Unfortunately the only conclusion I can draw from those pictures is: yes, your solution has diverged. For me to even start trying to help, I really need more information than that. Regarding the problem in the other thread. The solution strategy I gave in the second post of that thread (i.e. pseudo staggered approach) did help a lot. Unfortunately I cannot provide you with the resulting code. regards, Sylvester |
All times are GMT -4. The time now is 19:57. |