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

How to plot a Integral length scale contour of a RANS and LES simulation?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 24, 2023, 06:47
Default How to plot a Integral length scale contour of a RANS and LES simulation?
  #1
New Member
 
Vishnu
Join Date: Apr 2022
Posts: 4
Rep Power: 4
vishnu123 is on a distinguished road
Hallo Everyone,
I am trying to plot a Integral length scale contour of an LES simulation in Ansys fluent. I have tried to plot I just just find Sub grid scale length for LES but nothing for RANS, but I am looking for integral scale using k and epsilon.

I have written an UDF function as follows:

#include "udf.h"

DEFINE_ON_DEMAND(integral_length_scale)
{
Domain *domain;
real k, epsilon, L;
Thread *t;
cell_t c;

domain = Get_Domain(1);

/* Loop through all cells in all threads */
thread_loop_c(t, domain)
{
begin_c_loop(c, t)

k = C_K_L(c, t);
epsilon = C_R_G(c, t)[1];
L = pow(k, 1.5) / epsilon;

/* Store the calculated value of L in C_LENGTH_SCALE */
C_LENGTH_SCALE(c, t) = L;

end_c_loop(c, t)
}

Message("Integral length scale calculated successfully!\n");
}


But I am getting an error as C_LENGTH_SCALE: undefined variable.

Last edited by vishnu123; March 27, 2023 at 05:13. Reason: Code update
vishnu123 is offline   Reply With Quote

Reply

Tags
integral length scale, les, rans


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
Calculating integral length scale in LES MachZero Main CFD Forum 2 August 30, 2018 05:34
LES Simulation from RANS results AS_Aero STAR-CCM+ 1 May 24, 2017 14:12
Evaluation of length scale ratio for LES, DES, SAS etc. siw CFX 12 May 19, 2016 03:25
DES Relative Length Scale in Fluent never positive, why? ChezLeon FLUENT 1 October 17, 2014 08:34
Transition RANS to LES during simulation LorenzN OpenFOAM Running, Solving & CFD 4 November 17, 2011 11:47


All times are GMT -4. The time now is 11:57.