CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

UDF for k-omega SST

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 10, 2021, 03:03
Default UDF for k-omega SST
  #1
New Member
 
Join Date: Aug 2021
Posts: 5
Rep Power: 5
helena97 is on a distinguished road
Hello,
I am simulating multiphase problem of cavitation with k-omega SST turbulence model and I am trying to make UDF to reduce the turbulent visocosity, especially in areas with low void ratios. I have already done it for k-epsilon RNG model (and it worked well) according to:
COUTIER-DELGOSHA, O., R. FORTES-PATELLA a J. L. REBOUD. Evaluation of the Turbulence Model Influence on the Numerical Simulations of Unsteady Cavitation. Journal of Fluids Engineering. 2003, 125(1), 38-45. ISSN 0098-2202. Available at: doi:10.1115/1.1524584

However, I am struggling with the UDF function for k-omega SST. When I try to interpret the function in Fluent, it says: line 31: unknown data op (ld.pointer) in block data.
Nonetheless, there is no line 31. I have already checked for semicolons and parantheses...
The equations for k-omega SST model, I have used, are described e.g. in Appendix of this article: https://pdfs.semanticscholar.org/767...640.1634903874

And here is my function:

#include "udf.h"
#include "mem.h"
#define mojeMax(a,b) (((a)>(b))?(a)b))

DEFINE_TURBULENT_VISCOSITY(cavitation_mu_t, c, t)
{
int n = 10;
Thread** pt = THREAD_SUB_THREADS(t);

real a1 = 0.31;
real k = C_K(c,t);
real y = C_WALL_DIST(c,t);
real omega = C_O(c,t);
float OMEGA[3] = {C_DWDY(c,t) - C_DVDZ(c,t), C_DUDZ(c,t) - C_DWDX(c,t), C_DVDX(c,t) - C_DUDY(c,t)};
real OMEGA_V = pow(SQR(OMEGA[0]) + SQR(OMEGA[1]) + SQR(OMEGA[2]), 0.5);

real arg2 = mojeMax((2-pow(k,0.5)/(0.09*omega*y)), (500*0.0000010034/(SQR(y)*omega)));

real F2 = tanh(SQR(arg2));

real nut = (a1 * k)/mojeMax(a1*omega, OMEGA_V*F2);


real rhoM = C_R(c, t);
real rhoL = C_R(c, pt[P_PHASE]);
real rhoV = C_R(c, pt[S_PHASE]);
real f_of_rho = rhoV + pow((rhoM - rhoV)/(rhoL - rhoV), n)*(rhoL - rhoV);

return f_of_rho*nut;
}


Do you know, where the problem could possibly be?
Thank you.
helena97 is offline   Reply With Quote

Reply

Tags
udf; k-omega sst


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
k and omega at inlet for k-omega SST driu OpenFOAM Running, Solving & CFD 10 March 5, 2021 11:48
K omega SST equations in Openfoam tom.opt OpenFOAM 2 May 6, 2020 10:41
[solids4Foam] How to calculate drag coeff when using solids4Foam amuzeshi OpenFOAM CC Toolkits for Fluid-Structure Interaction 15 November 7, 2019 13:50
Modeling the reynolds stresses and turbulent heat fluxes by sst k Omega medaouarwalid Main CFD Forum 3 January 5, 2018 21:12
The reason of the substitution of Omega by S in the SST k-omega model? huangxianbei Main CFD Forum 2 January 1, 2018 21:14


All times are GMT -4. The time now is 13:53.