|
[Sponsors] |
January 30, 2001, 09:35 |
UDF : derivate of density
|
#1 |
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) |
|
January 31, 2001, 22:33 |
Re: UDF : derivate of density
|
#2 |
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 |
|
February 2, 2001, 04:02 |
Re: UDF : derivate of density
|
#3 |
Guest
Posts: n/a
|
Many thanks to you, Greg.....
i will check it. Best regards.............Dirk (university of dortmund, germany) |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error using UDF to modify density | NRD | FLUENT | 1 | July 13, 2011 08:35 |
Gravity, UDF Source & Operating Density. HELP ME! | Brian | FLUENT | 0 | November 1, 2005 16:17 |
UDF to change density in species transport | Karthik | FLUENT | 6 | December 8, 2004 19:19 |
Warning 097- | AB | Siemens | 6 | November 15, 2004 05:41 |
density update by UDF in non-premixed combustion | IKSOO | FLUENT | 2 | December 8, 2002 21:37 |