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

UDF : derivate of density

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 30, 2001, 08:35
Default UDF : derivate of density
  #1
D.Stratmann
Guest
 
Posts: n/a
hello cfd´ler !

can anyone help me to create a user-defined-function ?

situation/case : since i want to compare my simulation results (using fluent) with schlieren-photography, i need to have another scalar for postprocessing.

i want to judge my results by postprocessing the change of density in x-coordinate : d(density)/dx.

best regards.

Dirk (university of dortmund, germany)
  Reply With Quote

Old   January 31, 2001, 21:33
Default Re: UDF : derivate of density
  #2
Greg Perkins
Guest
 
Posts: n/a
Try and copy the density into a user scalar and then copy the derivative of this to another location. If you do this within a DEFINE_ON_DEMAN will probable be easiest:

extern Domain *domain;

DEFINE_ON_DEMAND(Density_Grad) { Thread *thread; cell_t cell;

thread_loop_c(thread,domain)

{

begin_c_loop(cell,thread)

{

/* ---- copy deensity to UDS */

C_UDSI(cell,thread,0) = C_R(cell,thread);

/* --- store gradient d/dx in UDM */

C_UDMI(cell,thread,0) = C_UDSI_G(cell,thread,0)[0];

}

end_c_loop(cell,thread)

} }

Haven't tried it - but might work!

Greg
  Reply With Quote

Old   February 2, 2001, 03:02
Default Re: UDF : derivate of density
  #3
D.Stratmann
Guest
 
Posts: n/a
Many thanks to you, Greg.....

i will check it.

Best regards.............Dirk (university of dortmund, germany)
  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
Error using UDF to modify density NRD FLUENT 1 July 13, 2011 07:35
Gravity, UDF Source & Operating Density. HELP ME! Brian FLUENT 0 November 1, 2005 15:17
UDF to change density in species transport Karthik FLUENT 6 December 8, 2004 18:19
Warning 097- AB Siemens 6 November 15, 2004 04:41
density update by UDF in non-premixed combustion IKSOO FLUENT 2 December 8, 2002 20:37


All times are GMT -4. The time now is 18:58.