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

UDM: statistically averaged variabls

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 4, 2006, 04:13
Default UDM: statistically averaged variabls
  #1
lcw
Guest
 
Posts: n/a
How to define a time-averaged variable by UDM during the unsteady computation? In FLUNET, there are some variables such as mean pressure, mean velocity in unsteady statistics menu, what is the UDM code about these? If we want to define another mean variable, how to write a UDM code?

Thank you in advance!

LCW
  Reply With Quote

Old   January 4, 2006, 10:28
Default Re: UDM: statistically averaged variabls
  #2
lcw
Guest
 
Posts: n/a
I search the solution on the Internet, and give the rough clue as follows. I am not familiar with UDF or UDM. Could you give me a complete solution of this problem? Thanks a lot.

#include "udf.h"

DEFINE_EXECUTE_AT_END(execute_at_end) { Domain *domain; cell_t c; Thread *t; real k_mean; real k_rms; domain = Get_Domain(1); thread_loop_c (t,domain) { begin_c_loop_all (c,t) {

C_UDMI(c,t,0) = C_K(c,t); } end_c_loop_all (c,t) } }
  Reply With Quote

Old   January 7, 2006, 23:28
Default Re: UDM: statistically averaged variabls
  #3
lcw
Guest
 
Posts: n/a
Plz help me, I need your help indeed. Thanks a lot!

  Reply With Quote

Old   January 8, 2006, 03:34
Default Re: UDM: statistically averaged variabls (draft)
  #4
lcw
Guest
 
Posts: n/a
I try to write the UDF of this function. Please correct it for me, thank you!

#include "udf.h"

DEFINE_EXECUTE_AT_END(execute_at_end) { Domain *domain; cell_t c; Thread *t; real k_mean;

domain = Get_Domain(1);

thread_loop_c (t,domain) { begin_c_loop_all (c,t) { C_UDMI(c,t,0) = C_K(c,t); } end_c_loop_all (c,t) } int time_step; curr_ts = RP_Get_Integer("time-step") for(i=0;i<curr_ts;i++) k_mean+= C_K(c,t) k_mean = k_mean / curr_ts

  Reply With Quote

Old   January 8, 2006, 03:39
Default Re: UDM: statistically averaged variabls (draft)
  #5
lcw
Guest
 
Posts: n/a
Sorry, Last post is not completed, post it again.

#include "udf.h"

DEFINE_EXECUTE_AT_END(execute_at_end) { Domain *domain; cell_t c; Thread *t; real k_mean;

domain = Get_Domain(1);

thread_loop_c (t,domain) { begin_c_loop_all (c,t) { C_UDMI(c,t,0) = C_K(c,t); } end_c_loop_all (c,t) } int time_step; curr_ts = RP_Get_Integer("time-step") for(i=0;i<curr_ts;i++) k_mean+= C_K(c,t) k_mean = k_mean / curr_ts }

  Reply With Quote

Reply


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
Segmentation violation louiza FLUENT 16 June 27, 2017 16:41
Favre averaged Navier-Stokes equations help siw Main CFD Forum 3 June 24, 2016 12:26
UDS stored to UDM do not show the same values swati_mohanty FLUENT 0 December 3, 2010 04:46
Averaged conservation equations? Miguel Baritto CFX 0 December 15, 2008 20:57
axial and azimuthally averaged profiles student CFX 0 February 28, 2006 05:20


All times are GMT -4. The time now is 20:01.