Using SU2's preaccumulation to obtain a mean variable #1760
Unanswered
JuanSembla
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Hi, preaccumulation is for something else. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello all! I hope your're doing well.
I'm trying to add a turbulence model correction to Menter's SST that works in a very similar manner to Spalar-Allmaras' QCR but uses the specific dissipation rate as a parameter (as it is based on Pope's 1975 work). Thus, I'm coding the model on flow_diffusion.cpp but I can't seem to find a way to bring omega into it. I see that SU2 uses pre-accumulation to store variables and bring them when in need, for example, in that same script we have:
AD::StartPreacc();
AD::SetPreaccIn(V_i, nDim+9); AD::SetPreaccIn(V_j, nDim+9);
AD::SetPreaccIn(Coord_i, nDim); AD::SetPreaccIn(Coord_j, nDim);
AD::SetPreaccIn(PrimVar_Grad_i, nDim+1, nDim);
AD::SetPreaccIn(PrimVar_Grad_j, nDim+1, nDim);
AD::SetPreaccIn(turb_ke_i); AD::SetPreaccIn(turb_ke_j);
AD::SetPreaccIn(TauWall_i); AD::SetPreaccIn(TauWall_j);
AD::SetPreaccIn(Normal, nDim);
As far as I understand, this feature is used for algorithmic differentiation. However, in flow_diffusion.cpp it is also used to obtain mean variables as in:
Mean_turb_ke = 0.5*(turb_ke_i + turb_ke_j);
Therefore, think I should achieve something like:
AD::SetPreaccIn(omega_i); AD::SetPreaccIn(omega_j);
In order to do Mean_omega = 0.5*(omega_i + omega_j), which would be what I need to make use of my model. However, I do not seem to be able to store the value (or the address on which it is stored) of omega_i and omega_j so as to bring them in the flow_diffusion.cpp script. Any ideas?
Thank you in advance, I hope you have a nice day.
Beta Was this translation helpful? Give feedback.
All reactions