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

How to get a second derivative in udf?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 2, 2005, 06:09
Default How to get a second derivative in udf?
  #1
demigod
Guest
 
Posts: n/a
How to get a second derivative ( diff(T,z,2), where T is temperature, z is one dimensionality, 2 refers to the second derivative) in udf?

Thanks.
  Reply With Quote

Old   August 3, 2005, 16:13
Default Re: How to get a second derivative in udf?
  #2
Laika
Guest
 
Posts: n/a
you must copy for each cell the first derivative of T in a UDM-location (at the end or after each iteration when needed). In postprocessing you can ask for the first derivative of this UDM, which is actually the desired second derivative.

As far as I know there is no other way.

good luck,

Laika, still orbiting
  Reply With Quote

Old   August 3, 2005, 22:44
Default Re: How to get a second derivative in udf?
  #3
demigod
Guest
 
Posts: n/a
Thanks.

How can I get the first derivative of the defined UDM? by C_UDSI_G(c,t,i)?

Can I define an UDS to refer to first derivative of temperature [C_UDSI(c,t,0)=C_T_G(c,t)[2]] and use C_UDSI_G(c,t,0) to give the second derivative?

Thanks a lot.

the second derivative appears in the source term, so I must update its value by each iteration.
  Reply With Quote

Old   August 9, 2005, 18:01
Default Re: How to get a second derivative in udf?
  #4
Laika
Guest
 
Posts: n/a
almost UDS --->c_UDSI(... UDM --->C_UDMI(...

the difference is that Fluent solves a transport equation for a UDS and not for a UDM. A UDM is just a memory location, but you can ask for the first derivatives. Hence the procedure:ask to calculate the first derivative of your quantity. Store it through the use of a UDF in a UDM, and ask for the first derivative of your UDM.

good luck,

Laika, still orbiting
  Reply With Quote

Old   February 26, 2013, 12:41
Default
  #5
Member
 
Join Date: Feb 2012
Posts: 57
Rep Power: 5
Raymond.Leoi is on a distinguished road
Well, it seems C_UDMI_G(cell, thread, n) isn't accessible, but we can get C_UDSI_G(cell, thread, n). The problem I met is that those values of C_UDSI_G at cells attached with boundaries are wrong. Any idea to properly get it fixed or any other approach we can employ?

Quote:
Originally Posted by Laika
;123159
almost UDS --->c_UDSI(... UDM --->C_UDMI(...

the difference is that Fluent solves a transport equation for a UDS and not for a UDM. A UDM is just a memory location, but you can ask for the first derivatives. Hence the procedure:ask to calculate the first derivative of your quantity. Store it through the use of a UDF in a UDM, and ask for the first derivative of your UDM.

good luck,

Laika, still orbiting
Raymond.Leoi is offline   Reply With Quote

Reply

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
How to build "Second Derivative " in UDF Bowling Fluent UDF and Scheme Programming 4 October 17, 2012 04:52
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14
can i get pressure derivative in UDF? ruirui389 Fluent UDF and Scheme Programming 4 April 8, 2011 04:12
second derivative in udf dirk FLUENT 0 June 8, 2005 12:56
UDF for Second Derivative of Velocity Satish FLUENT 1 March 8, 2004 05:15


All times are GMT -4. The time now is 23:57.