CFD Online Logo CFD Online URL
Home > Forums > FLUENT

Dilatation field

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   October 31, 2007, 10:22
Default Dilatation field
Jiri Novak
Posts: n/a
Hi! I want to visualize velocity/pressure dilatation field of compressible flow in Fluent. I've got a formula calculating it by means of fluctuating velocity gradient

dilatation = d/dx(u``)


u`` = u(actual) - u(avg)

I already have a data file of average values of velocity u(avg) during my unsteady simulation saved in UDM, but still have problem to show fluctuating velocity gradient C_UDSI_G, which seems to be zero...

Here is my UDF:

#include "udf.h"

DEFINE_ON_DEMAND(vel_x_to_udm0) { float velx; Thread *tc; cell_t c; extern Domain *domain; thread_loop_c(tc,domain) { begin_c_loop(c,tc) { velx=C_U(c,tc); C_UDMI(c,tc,0)=velx; } end_c_loop(c,tc) } }

DEFINE_ON_DEMAND(vel_y_to_udm1) { float vely; Thread *tc; cell_t c; extern Domain *domain; thread_loop_c(tc,domain) { begin_c_loop(c,tc) { vely=C_V(c,tc); C_UDMI(c,tc,1)=vely; } end_c_loop(c,tc) } }

DEFINE_ON_DEMAND(vel_fluctuation_to_udm2_and_uds0) { float udmi0,udmi1; float velx, vely, velMagAvg, velMagActual, delta; Thread *tc; cell_t c; extern Domain *domain;

thread_loop_c(tc,domain) { begin_c_loop(c,tc) { udmi0=C_UDMI(c,tc,0); udmi1=C_UDMI(c,tc,1); velx=C_U(c,tc); vely=C_V(c,tc); velMagAvg=sqrt(pow(udmi0,2)+pow(udmi1,2)); velMagActual=sqrt(pow(velx,2)+pow(vely,2)); delta=velMagActual-velMagAvg; C_UDMI(c,tc,2)=delta; C_UDSI(c,tc,0) = C_UDMI(c,tc,2); C_UDSI(c,tc,1) = NV_MAG(C_UDSI_G(c,tc,0)); } end_c_loop(c,tc) } }

  Reply With Quote


Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
problems after decomposing for running OpenFOAM 6 December 23, 2015 15:27
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
Turbulence dampening due to magnetic field in LES and RAS eelcovv OpenFOAM 0 June 8, 2010 11:35
Zero size field taranov OpenFOAM Bugs 2 April 20, 2010 04:51
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51

All times are GMT -4. The time now is 19:52.