Replies: 1 comment
-
Hi timjim, disclaimer: I have not a good knowledge when it comes to fixed CL mode or CL-alpha for that matter... but I want to give you some pointers into the code to maybe look/test a little for yourself :) The forces Breakdown file is written in if (fixed_cl) {
file << "Simulation at a cte. CL: " << config->GetTarget_CL() << ".\n";
file << "Approx. Delta CL / Delta AoA: " << config->GetdCL_dAlpha() << " (1/deg).\n";
file << "Approx. Delta CD / Delta CL: " << config->GetdCD_dCL() << ".\n";
if (nDim == 3) {
file << "Approx. Delta CMx / Delta CL: " << config->GetdCMx_dCL() << ".\n";
file << "Approx. Delta CMy / Delta CL: " << config->GetdCMy_dCL() << ".\n";
}
file << "Approx. Delta CMz / Delta CL: " << config->GetdCMz_dCL() << ".\n";
} so void CEulerSolver::SetCoefficient_Gradients(CConfig *config) const{
const su2double AoA = config->GetAoA();
if (AoA == AoA_Prev) return;
/*--- Calculate gradients of coefficients w.r.t. CL ---*/
const su2double dCL = TotalCoeff.CL - Total_CL_Prev;
const su2double dCL_dAlpha_ = dCL / (AoA - AoA_Prev);
const su2double dCD_dCL_ = (TotalCoeff.CD-Total_CD_Prev) / dCL;
const su2double dCMx_dCL_ = (TotalCoeff.CMx-Total_CMx_Prev) / dCL;
const su2double dCMy_dCL_ = (TotalCoeff.CMy-Total_CMy_Prev) / dCL;
const su2double dCMz_dCL_ = (TotalCoeff.CMz-Total_CMz_Prev) / dCL;
/*--- Set the value of the dOF/dCL in the config file ---*/
config->SetdCD_dCL(dCD_dCL_);
config->SetdCMx_dCL(dCMx_dCL_);
config->SetdCMy_dCL(dCMy_dCL_);
config->SetdCMz_dCL(dCMz_dCL_);
config->SetdCL_dAlpha(dCL_dAlpha_);
} Now we can try to learn a few things from this: In case e.g. your dCD/dCL always matches (and your CMx_dCL etc) we can say with good confidence that the From here on I would leave it to you to check further: I am not sure how comfortable you are with adding code but in the easiest step you screen output both values e.g. like so ...
const su2double dCL = TotalCoeff.CL - Total_CL_Prev;
cout << "AoA: " << AoA << ", AoA_prev: " << AoA_Prev << endl;
const su2double dCL_dAlpha_ = dCL / (AoA - AoA_Prev);
const su2double dCD_dCL_ = (TotalCoeff.CD-Total_CD_Prev) / dCL;
... And form there on you might already learn quite a bit. I hope this helps, Tobi |
Beta Was this translation helpful? Give feedback.
-
Hi, not sure if this is a bug or just a result of the implementation but on restarting some of my CFD runs in fixed-CL mode, I noticed that the approx values given in the forces_breakdown.dat are not at all consistent.
In 3 restarts, I've seen the estimated CL-alpha (Approx. Delta CL / Delta AoA) range from 0.03 (1/deg) to 0.2 (1/deg) - nearly an order of magnitude difference. This is even though they converge to exactly the same CL, AoA. and Center of Pressure.
How much can the values given in the 'Approx.' section of the forces breakdown be trusted? I guess it is a little dependent on the last few AoAs attempted by SU2, but I didn't expect the approx values to be so different. Especially when then other metrics are accurate to 1e-9!
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions