How to add to the turbulence equation a variable #2403
Unanswered
TTtianhong
asked this question in
Q&A
Replies: 1 comment 1 reply
-
In CTurbSASolver::Source_Residual you need to pass your variable to the numerics class, see how any of the other |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How to add to the turbulence equation a variable that I have provided externally that has a spatial distribution of coordinates and values (Constant values in each point,different in space but the same in time):
First I tried adding a new column of variables (bbeta)to restart_flow.csv.
Then: I used this to load variables:
if (incompressible && ((!energy) && (!weakly_coupled_heat))) skipVars--;
I want to use the variable in SA model:
/*! \brief Baseline (Original SA model). */
struct Bsl {
static void get(const su2double& nue, const CSAVariables& var, su2double& production, su2double& destruction,
su2double& cross_production, su2double& jacobian) {
ComputeProduction(nue, var, production, jacobian);
ComputeDestruction(nue, var, destruction, jacobian);
ComputeCrossProduction(nue, var, cross_production, jacobian);
}
static void ComputeProduction(const su2double& nue, const CSAVariables& var, su2double& production,
su2double& jacobian) {
const su2double factor = var.intermittency * var.cb1;
production = factor * (1.0 - var.ft2) * var.Shat * nue;
jacobian += factor * (-var.Shat * nue * var.d_ft2 + (1.0 - var.ft2) * (nue * var.d_Shat + var.Shat));
}
...
How can I add the new variable such as "bbeta" to the calculation of "ComputeProduction" to make new factor = bbeta *factor;
Beta Was this translation helpful? Give feedback.
All reactions