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

Monitor a variable of a UDF

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By ChristophGradl

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 13, 2014, 05:12
Default Monitor a variable of a UDF
  #1
New Member
 
Christoph Gradl
Join Date: Feb 2014
Posts: 18
Rep Power: 12
ChristophGradl is on a distinguished road
Hello,
I want to use a monitor in fluent to plot the value of a variable of a UDF.
Is there a possibility in fluent?
I only found the possibility to write the values to a file.

For example I want to monitor the variable v_prev:

Code:
     DEFINE_CG_MOTION(piston, dt, vel, omega, time, dtime)  {      
 Thread *t;      
 face_t f;      
 real NV_VEC (A);      
 real force, dv;      
 /* reset velocities */      
 NV_S (vel, =, 0.0);      
 NV_S (omega, =, 0.0);      
 if (!Data_Valid_P ())      
 return;
      /* get the thread pointer for which this motion is defined */
       t = DT_THREAD ((Dynamic_Thread *)dt);      
 /* compute pressure force on body by looping through all faces */      
 force = 0.0;      begin_f_loop (f, t)
       {
           F_AREA (A, f, t);          
          force += F_P (f, t) * NV_MAG (A);      
       }
      end_f_loop (f, t)
         /* compute change in velocity, i.e., dv= F * dt/ mass;         velocity update using explicit eulerformula */
      dv= dtime* force / 50.0;
       v_prev+= dv;
         CX_Message ("time = %f, x_vel= %f, force = %f\n", time, v_prev, force);
      /* set x-component of velocity */
       vel[0] = v_prev;  
 }
Thank you for any suggestions,
Christoph
Chong070940103 likes this.
ChristophGradl is offline   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
UDF Compilation Error - Loading Library - COMMON Problem! Help! robtheslob Fluent UDF and Scheme Programming 8 July 24, 2015 01:53
UDF extern variable - mean time moment coefficient enry Fluent UDF and Scheme Programming 0 November 14, 2009 07:51
name variable in UDF using Thread : syntax error before numeric constant Laurence Wallian FLUENT 0 October 8, 2009 10:18
UDF: exporting a variable between two DEFINE function Carlo FLUENT 3 August 19, 2009 13:21
Yplus UDF variable Matthew Brannock FLUENT 0 June 23, 2003 04:41


All times are GMT -4. The time now is 14:49.