TAGGED: sbes, udf, udf-fluent
-
-
September 15, 2021 at 9:17 pm
Bibill
SubscriberDear all,
I am trying to run a Stress-Blended Eddy Simulation with a modified turbulent viscosity for the RANS part.
However, when using DEFINE_TURBULENT_VISCOSITY to modify the RANS mu_t, it also modifies the LES sub-grid model (what I want to avoid)...
I have tried :
DEFINE_TURBULENT_VISCOSITY(user_mu_t,c,t) { if(SBES_BlendindFunction == 1) { mu_t = compute_my_mu_t(...); } else { mu_t = C_MU_T(c,t) } return mu_t; }
But It does not give the expected results... I have also tried to loop over cells and compute it locally but had issues with the implementation...
Any help or advice would be highly appreciated!
Thanks in advance!
September 17, 2021 at 7:22 amaitor.amatriain
SubscriberHow are you obtaining the value of the SBES blending function? Could you please show us the contents of the function "compute_my_mu_t"?
September 19, 2021 at 6:06 pmBibill
SubscriberHi Aitor I also use a UDF to define a own blending function and I store its value in a C_UDMI. The blending function works properly.
Regarding the compute_my_mu_t it is simply a k-e turbulent viscosity with a modified value of C_mu. The UDF for mu_t has been tested for RANS and works also properly... It is for the blending in the SBES framework that I have an issue.
September 20, 2021 at 8:04 amaitor.amatriain
SubscriberBased on your comments, I deduce that you want a turbulence model that is equal to the SBES but with your "modified k-epsilon" instead of k-omega SST in the RANS part.
I suppose that you have checked if there is a macro for the blending function or not. I have done that, and I have found nothing, so this option is ruled out.
I understand your approach is based on creating your own blending function (letÔÇÖs call it g_SBES) as similar as f_SBES. The issue is that the set of points satisfying f_SBES=1 and g_SBES=1 is not expected to be the same, so you get into trouble. Maybe these sets are very similar, but it has to be taken into account that the width of the ÔÇ£blending zoneÔÇØ is usually of the order or less than the width of a boundary layer of the flow, so that these small differences in the sets can play an important role in the solution.
Based on the previous ideas, my solution for avoiding numerical problems would be to tune the GEKO model (which is compatible with SBES) so that it gives results that are as close as possible as your "modified k-epsilon". You have available on the Internet a Best Practice document about GEKO model written by ANSYS Staff.
September 20, 2021 at 8:27 amBibill
SubscriberThanks for your reply Aitor,
Sorry, I did not mention it but I'm working on Fluent v2021 so SBES is available for k-epsilon as well. Hence, I do not need to modify a GEKO model to mymyc k-epsilon.
So to summarize, I want a modified SBES with a modified RANS part. I've performed some tests:
ÔÇó Modified SBES with usual RANS, it works.
ÔÇó Modified RANS in a RANS simulation, it works.
So the issue is really the blending of the turbulent viscosity from RANS to LES.
September 20, 2021 at 8:40 amaitor.amatriain
SubscriberWhat test have you performed to deduce that the modified SBES works with usual RANS?
September 20, 2021 at 11:45 amBibill
SubscriberI performed simulations for simple test cases and check if the Blending function was the one that I defined in the UDF
September 20, 2021 at 12:55 pmaitor.amatriain
SubscriberOkay, now I think that I have understood the problem.
LetÔÇÖs analyze your code:
DEFINE_TURBULENT_VISCOSITY(user_mu_t,c,t)
{
if(SBES_BlendindFunction == 1)
{
mu_t = compute_my_mu_t(...);
}
else
{
mu_t = C_MU_T(c,t)
´╗┐
}
return mu_t;
}
-SBES-BlendindFunction is okay (checked by you)
-Compute_my_mu_t is okay (checked by you)
If SBES-BlendindFunction is less than 1, then you use C_MU_T(c,t). But what is C_MU_T(c,t)? As far as I am concerned, C_MU_t(c,t) is the value that you are setting, so this line has no sense. For me (maybe I am wrong), this is like defining a function by parts and saying y=y in certain part.
You have both the RANS part and the blending function implemented. What about the LES part?
Another question: Is the blending function a real number? If yes, be careful with that, as in the if loop the function acts as an integer.
September 20, 2021 at 6:55 pmBibill
SubscriberIt is actually the issue, I do not want to modify the LES part, I want to keep the sub-grid scale model implemented in Fluent. That is why I use the macro to assess the turbulent viscosity from Fluent... My thought was "If I am in the case where SBES_blending==0, fluent will return the SGS model with C_MU_T(c,t)".
The blending function is stored in a C_UDMI(c,t,..). Should I loop for t and c instead?
September 20, 2021 at 9:03 pmBibill
SubscriberTo summarize I want to :
ÔÇó Use a modified mu_t for RANS;
ÔÇó Use the subgrid scale model from Fluent for the LES part.
September 21, 2021 at 7:01 amaitor.amatriain
SubscriberYou want both things and a custom blending function, right? In that case:
1)Select SBES with k-epsilon + desired LES in the Viscous Panel.
2)Modify the value of C_mu in the Viscous Panel
3)Define and implement your custom blending function
This would do what you want, right?
September 21, 2021 at 7:07 amBibill
Subscriber
Yes exactly, you understood well!
However, the problem is that the value of C_mu that I want to use is not constant but linear so I cannot modify it through the panel but only by UDF for mu_t...
So I think that I really need to find a way to blend the mu_t properly inside the DEFINE_TURBULENT_VISCOSITY macro.
September 21, 2021 at 7:13 amaitor.amatriain
SubscriberI go back into my previous message: use GEKO and tune it to be as similar as your modified k-epsilon. Or define the LES part in the same way as your RANS part. No more solutions come to my mind.
Just out of curiosity: why do you need a modified k-epsilon and a modified blending function?
Viewing 12 reply threads- The topic ‘UDF for turbulent viscosity in SBES’ is closed to new replies.
Ansys Innovation SpaceTrending discussionsTop Contributors-
3492
-
1057
-
1051
-
966
-
942
Top Rated Tags© 2025 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.
-