# how to get the derivative of scalar?

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

 February 9, 2011, 04:29 how to get the derivative of scalar? #1 New Member   tom pan Join Date: Nov 2010 Posts: 14 Rep Power: 6 It seems like to need to get it using dn(x)/dx=(n(x+h)-n(x))/h Please help me to get the values of n(x+h), n(x) and h. Thanks.

 February 9, 2011, 09:11 #2 Senior Member     Amir Join Date: May 2009 Location: Shiraz, Iran Posts: 739 Blog Entries: 1 Rep Power: 14 Hi Tom, you can refer to UDF help manual (DEFINE_ADJUST 2nd example). otherwise for specific x value over a face, you can use C0 and C1 values. Last edited by Amir; February 9, 2011 at 09:31.

 February 18, 2011, 05:39 #4 Senior Member     Amir Join Date: May 2009 Location: Shiraz, Iran Posts: 739 Blog Entries: 1 Rep Power: 14 you used 4 UDS, so set that and double check and inform me...

 February 19, 2011, 01:23 #5 New Member   tom pan Join Date: Nov 2010 Posts: 14 Rep Power: 6 Thank you, Amir. I will simplify and check my udf. I have another question here: In example2 for DEFINE_ADJUST, why "C_UDSI(c,t,1)+=K_EL*NV_MAG2(C_UDSI_G(c,t,0)*C_VOL UME(c,t));" can specifies a user-define scalar as a function of the gradient of another user-define scalar?

 February 19, 2011, 09:17 #6 Senior Member     Amir Join Date: May 2009 Location: Shiraz, Iran Posts: 739 Blog Entries: 1 Rep Power: 14 Hi Tom, yes, you can define a UDS as a function of another UDS or it's gradient components or magnitude. note that C_UDSI stores scalar but C_UDSI_G stores vector. as you see in second example the magnitude of UDS gradient was stored in another UDS.

 Thread Tools Display Modes Linear Mode

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

 Similar Threads Thread Thread Starter Forum Replies Last Post vivek070176 OpenFOAM Programming & Development 10 December 24, 2014 00:48 tas38 Fluent UDF and Scheme Programming 1 February 9, 2011 04:05 lig Main CFD Forum 3 December 26, 2010 05:02 owen FLUENT 0 March 5, 2009 05:59 sucker Main CFD Forum 1 April 15, 2008 13:28

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