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

Problem with diverging simulation

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By sylvester

Reply
 
LinkBack Thread Tools Display Modes
Old   January 4, 2013, 13:22
Exclamation Problem with diverging simulation
  #1
Member
 
Simone
Join Date: Sep 2012
Posts: 95
Rep Power: 4
batta31 is on a distinguished road
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
batta31 is offline   Reply With Quote

Old   January 7, 2013, 06:52
Default
  #2
Member
 
Simone
Join Date: Sep 2012
Posts: 95
Rep Power: 4
batta31 is on a distinguished road
Any answer please?
batta31 is offline   Reply With Quote

Old   January 7, 2013, 08:31
Default
  #3
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,205
Rep Power: 17
immortality is on a distinguished road
hi
Use euler method in schemes for more stability.whats the error?give it in code tag.
immortality is offline   Reply With Quote

Old   January 7, 2013, 08:55
Default
  #4
Member
 
Simone
Join Date: Sep 2012
Posts: 95
Rep Power: 4
batta31 is on a distinguished road
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..
batta31 is offline   Reply With Quote

Old   January 7, 2013, 09:21
Default
  #5
Senior Member
 
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 8
danvica is on a distinguished road
Maybe this two posts could help you:

adjointShapeOptimizationFoam for In-compressible NS

adjointShapeOptimizationFoam checkerboarding inlet

They seem to have quite basic setup...
__________________
Daniele Vicario

blueCFD2.1 - Windows 7
danvica is offline   Reply With Quote

Old   January 8, 2013, 04:28
Default
  #6
Member
 
Simone
Join Date: Sep 2012
Posts: 95
Rep Power: 4
batta31 is on a distinguished road
Thank you for the answer Daniele but I had already tried and it didn't work..
batta31 is offline   Reply With Quote

Old   January 9, 2013, 11:13
Default
  #7
Member
 
Roland
Join Date: Mar 2009
Location: Netherlands
Posts: 62
Rep Power: 8
sylvester is on a distinguished road
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 cellMDLimited vs. cellLimited).

Is it possible for you to share your setup?

Regards,
Sylvester

Quote:
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;
}
SailorLiu likes this.
sylvester is offline   Reply With Quote

Old   January 9, 2013, 12:12
Default
  #8
Member
 
Simone
Join Date: Sep 2012
Posts: 95
Rep Power: 4
batta31 is on a distinguished road
Sure sylvester!

Quote:
ddtSchemes
{
default steadyState;

}

gradSchemes
{
default cellLimited Gauss linear 0;

grad(Ua) cellLimited Gauss upwind phia 0;
grad(pa) cellLimited Gauss upwind phia 0;

}

divSchemes
{
default Gauss linear;

div(phia) Gauss upwind;
div(-phi,Ua) Gauss upwind grad(Ua);
div((nuEff*dev(T(grad(Ua))))) Gauss upwind phia;

}

laplacianSchemes
{
default Gauss linear limited 0;

}

interpolationSchemes
{
default linear;
interpolate(Ua) upwind phia;
//interpolate(U) linear;

}

snGradSchemes
{
default limited 0;

}

fluxRequired
{
default no;
p ;
pa ;
phia ;

}
This is, I think, the most conservative configuration that I could use. I've also tried to put "1" instead of "0" in the limited schemes but nothing changed. I post you a screenshot of what happens after few iterations..

cheers

Simone
Attached Images
File Type: jpg pa_disc.jpg (46.8 KB, 44 views)
batta31 is offline   Reply With Quote

Old   January 9, 2013, 12:38
Default
  #9
Member
 
Roland
Join Date: Mar 2009
Location: Netherlands
Posts: 62
Rep Power: 8
sylvester is on a distinguished road
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
sylvester is offline   Reply With Quote

Old   January 9, 2013, 12:54
Default
  #10
Member
 
Simone
Join Date: Sep 2012
Posts: 95
Rep Power: 4
batta31 is on a distinguished road
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..
batta31 is offline   Reply With Quote

Old   January 11, 2013, 11:16
Default
  #11
Member
 
Roland
Join Date: Mar 2009
Location: Netherlands
Posts: 62
Rep Power: 8
sylvester is on a distinguished road
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
sylvester is offline   Reply With Quote

Old   January 15, 2013, 03:58
Default
  #12
Member
 
Simone
Join Date: Sep 2012
Posts: 95
Rep Power: 4
batta31 is on a distinguished road
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
batta31 is offline   Reply With Quote

Old   January 15, 2013, 04:33
Default
  #13
Member
 
Roland
Join Date: Mar 2009
Location: Netherlands
Posts: 62
Rep Power: 8
sylvester is on a distinguished road
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? adjointShapeOptimizationFoam checkerboarding inlet

regards,
Sylvester
sylvester is offline   Reply With Quote

Old   January 15, 2013, 06:32
Default
  #14
Member
 
Simone
Join Date: Sep 2012
Posts: 95
Rep Power: 4
batta31 is on a distinguished road
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?
batta31 is offline   Reply With Quote

Old   January 15, 2013, 09:13
Default
  #15
Member
 
Simone
Join Date: Sep 2012
Posts: 95
Rep Power: 4
batta31 is on a distinguished road
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
Attached Images
File Type: jpg Ua_domain.jpg (15.2 KB, 45 views)
File Type: jpg pa_domain.jpg (13.4 KB, 37 views)
batta31 is offline   Reply With Quote

Old   January 15, 2013, 12:31
Default
  #16
Member
 
Roland
Join Date: Mar 2009
Location: Netherlands
Posts: 62
Rep Power: 8
sylvester is on a distinguished road
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
sylvester is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Domain format problem on airfoil flow simulation andrenonaka CFX 6 December 4, 2014 04:57
Problem with torque output from a turbine simulation. pa-dundas FLUENT 3 August 30, 2011 12:25
Transient simulation (Problem with massflow and Pressure) ChristianF CFX 4 August 22, 2011 21:42
about valve closing problem during ANSYS FSI simulation ivy CFX 4 June 8, 2011 21:01
Heat Transfer simulation: No convergence problem fiqs CFX 2 April 21, 2010 15:47


All times are GMT -4. The time now is 14:11.