CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   SU2 (https://www.cfd-online.com/Forums/su2/)
-   -   CFL Adapt parameter (https://www.cfd-online.com/Forums/su2/153182-cfl-adapt-parameter.html)

DLuo May 19, 2015 18:50

CFL Adapt parameter
 
1 Attachment(s)
I've started using v3.2.9 "eagle" and I'm having some trouble understanding the CFL ADAPT PARAM.
In earlier versions this used to be CFL_RAMP and was a little more straightforward, increase CFL until you hit the specified limit. However, the new CFL_ADAPT seems to have a mind of it's own. Here are my questions:

1. The comment in config_template says the 4 parameters are (Factor down, Factor up, min CFL value, max CFL value). In the config_structure.cpp it gives additional comments saying factor down>1, factor up < 1. Why isn't this the opposite with factor down < 1 and factor up > 1? Is the internal algorithm calculating CFLnew = CFLcurrent/factor?
2. I noticed that if I give it a factor down = 1 the preamble in the screen output declares "CFL Adaptation. No." What if I'm confident in my Mesh and setup that I know I only want to ramp up?
3. By what metric is the solver adapting the CFL number? In my 3D case, I see that it changes up and down but mostly stays near the min-limit that I've given it. What's driving this?
4. Where in the source code can I find the CFL adaptation algorithm?

The reason I'm investigating this CFL Adaptation is because in my 3D case it's taking a long time to converge. It's a well benchmarked case (HLPW-1) and very steady-state at lower angles yet my solution is oscillating and very slowly converging towards the Exp value. I believe the main culprit is because I set my CFL value to 0.75 to get the case initialized. Now that I've gotten past divergence issues I'd like it to converge faster but unfortunately CFL adaptation isn't helping very much and I'm having to manually stop and restart while increasing the CFL number.

hlk May 20, 2015 18:33

Quote:

Originally Posted by DLuo (Post 546967)
I've started using v3.2.9 "eagle" and I'm having some trouble understanding the CFL ADAPT PARAM.
In earlier versions this used to be CFL_RAMP and was a little more straightforward, increase CFL until you hit the specified limit. However, the new CFL_ADAPT seems to have a mind of it's own. Here are my questions:

1. The comment in config_template says the 4 parameters are (Factor down, Factor up, min CFL value, max CFL value). In the config_structure.cpp it gives additional comments saying factor down>1, factor up < 1. Why isn't this the opposite with factor down < 1 and factor up > 1? Is the internal algorithm calculating CFLnew = CFLcurrent/factor?
2. I noticed that if I give it a factor down = 1 the preamble in the screen output declares "CFL Adaptation. No." What if I'm confident in my Mesh and setup that I know I only want to ramp up?
3. By what metric is the solver adapting the CFL number? In my 3D case, I see that it changes up and down but mostly stays near the min-limit that I've given it. What's driving this?
4. Where in the source code can I find the CFL adaptation algorithm?

The reason I'm investigating this CFL Adaptation is because in my 3D case it's taking a long time to converge. It's a well benchmarked case (HLPW-1) and very steady-state at lower angles yet my solution is oscillating and very slowly converging towards the Exp value. I believe the main culprit is because I set my CFL value to 0.75 to get the case initialized. Now that I've gotten past divergence issues I'd like it to converge faster but unfortunately CFL adaptation isn't helping very much and I'm having to manually stop and restart while increasing the CFL number.

Thank you for your question.

CFL = CFL* ( RhoRes_old/RhoRes_new)^power, where "power" is the factor up/factor down, chosen depending on whether the new value of the residual is greater or less than the previous value.

If you only want it to go up, set the first entry to 0.

The metric driving the adaptation is the residual value.

The CFL adaptation is implemented in:
output_structure.cpp, COutput::SetCFL_Number

DLuo May 21, 2015 13:13

Thanks Heather. This helps a lot.

bornax April 13, 2018 05:07

Quote:

Originally Posted by hlk (Post 547090)
Thank you for your question.

CFL = CFL* ( RhoRes_old/RhoRes_new)^power, where "power" is the factor up/factor down, chosen depending on whether the new value of the residual is greater or less than the previous value.

If you only want it to go up, set the first entry to 0.

The metric driving the adaptation is the residual value.

The CFL adaptation is implemented in:
output_structure.cpp, COutput::SetCFL_Number

I see that in "COutput::SetCFL_Number" there are a couple of lines for MG factor calculation:

/*--- Compute MG factor ---*/

for (iMesh = 0; iMesh <= config[val_iZone]->GetnMGLevels(); iMesh++) {
if (iMesh == MESH_0) MGFactor[iMesh] = 1.0;
else MGFactor[iMesh] = MGFactor[iMesh-1] * config[val_iZone]->GetCFL(iMesh)/config[val_iZone]->GetCFL(iMesh-1);
}

My doubt is if i set Multigrid to 0 in the .cfg file, then i use CFL ADAPTATION, the Multigrid algorithm will be still internally activated?

p.s.
Thank you for your post, i've found it very helpful! :)


All times are GMT -4. The time now is 02:32.