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

How to display dT/dx?

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 3 Post By RoM

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 5, 2005, 12:58
Default How to display dT/dx?
  #1
Williams
Guest
 
Posts: n/a
Hello everyone

I want to display dT/dx, dT/dy, and dT/dz in fluent. Could anyone give me some help?

Thanks

Williams
  Reply With Quote

Old   December 6, 2005, 05:48
Default Re: How to display dT/dx?
  #2
Pospelov
Guest
 
Posts: n/a
I think you can do it by command line. You should write: dis, then enter, then con, then enter, then enter to see the contor of what do you want to display. dT/dx -- must be in this list...
  Reply With Quote

Old   December 6, 2005, 06:31
Default Re: How to display dT/dx?
  #3
RoM
Guest
 
Posts: n/a
You will need an UDF to access temperature gradients. The following udf will copy dT/dx into a user defined memory so you can postprocess it. To copy dT/dy change C_T_G(c,t)[0] to C_T_G(c,t)[1] and for dT/dz to C_T_G(c,t)[2]. The udf runs in interpreted mode (define->user-defined->functions->interpreted) but you will have to do some additional things to make it work.

1. Allocate one user defined memory. Define->User-defined->memory, set the number to 1.

2. Force the solver to keep gradient values stored. In TUI tpye //solve/set/experts and answer yes to question "Keep temporary solver memory from being freed?"

3. Run your solution for 2 iterations.

4. Run the udf. Define->user-defined->execute on demand

Good Luck, RoM


#include "udf.h"

DEFINE_ON_DEMAND(store_grad)
{
Domain* d;
Thread *t;
cell_t c;

d=Get_Domain(1);
thread_loop_c(t,d)
{
begin_c_loop(c,t)
{
C_UDMI(c,t,0)=C_T_G(c,t)[0];
}
end_c_loop(c,t)
}
}
mechy, nenazarian and hrmazloumi like this.
  Reply With Quote

Old   December 6, 2005, 10:47
Default Re: How to display dT/dx?
  #4
Williams
Guest
 
Posts: n/a
Thanks a lot.
  Reply With Quote

Old   May 17, 2010, 00:54
Default
  #5
Member
 
Hongjin Wang
Join Date: Mar 2010
Posts: 37
Rep Power: 16
sosososo1114 is on a distinguished road
By the way, as the udf manual refers: it seems better to use C_T_RG(c,t) macro than the C_T_Gs. it seems that C_T_G fails to return the accurate value you want at the boundary faces.

have a good day.
sosososo1114 is offline   Reply With Quote

Old   May 17, 2010, 06:08
Default
  #6
New Member
 
Join Date: Mar 2010
Posts: 13
Rep Power: 16
Josh_Blue is on a distinguished road
Hi Hongjin,

thanks for your comment. Could you please tell me how to use this macro step by step?

Thanks in advance!

Regards
Josh_Blue is offline   Reply With Quote

Old   May 19, 2010, 06:58
Default
  #7
Member
 
Hongjin Wang
Join Date: Mar 2010
Posts: 37
Rep Power: 16
sosososo1114 is on a distinguished road
Quote:
Originally Posted by Josh_Blue View Post
Hi Hongjin,

thanks for your comment. Could you please tell me how to use this macro step by step?

Thanks in advance!

Regards
Hi, Josh,
"As in the case of gradient variables, you can retain all of the reconstruction
gradient data by issuing the text command solve/set/expert and then answering yes
to the question Keep temporary solver memory from being freed?."(says UDF manual)
as Rom mentioned, u should define a udm first, u can use GUI as follow: Define->user defined->memory. You may need three udfs to get the C_T_RG display in counters. The first one is the udm reserve udf, you can copy an example from udf manual at Page 3-46. The second is udm clearance udf. and the example mentioned above also includes this one. The third is quit alike the one Rom provided above. You just need to chang the C_T_G(c,t)[0] in the 12th line to the C_T_RG(c,t)[0].
Have a good day
sosososo1114 is offline   Reply With Quote

Old   October 27, 2012, 18:44
Default
  #8
Member
 
Negin Nazarian
Join Date: Jan 2012
Location: San Diego
Posts: 61
Rep Power: 14
nenazarian is on a distinguished road
Hi,

This thread was really useful for me. I just have few questions:

1. Does (dT/dy, dT/dz...) only gets available after doing these steps?

I only put "C_UDMI(c,t,0)=C_T_RG(c,t)[0];" in my udf which is the gradient in x direction but now I also see other terms (dT/dy, dT/dz) available in my case. Why is that?

2. What is the major difference between RG and G and when to use them?

I know that the value obtained by each of them would be different but Im not sure if I understand how to differentiate them.

3. After doing these steps, there is another variable available in my case :
"user defined memory"
what is that?

I appreciate any help.

Cheers
Negin
nenazarian is offline   Reply With Quote

Old   December 6, 2018, 20:57
Default
  #9
New Member
 
Argenis
Join Date: Dec 2018
Posts: 7
Rep Power: 8
argenisbnl is on a distinguished road
Quote:
Originally Posted by sosososo1114 View Post
Hi, Josh,
"As in the case of gradient variables, you can retain all of the reconstruction
gradient data by issuing the text command solve/set/expert and then answering yes
to the question Keep temporary solver memory from being freed?."(says UDF manual)
as Rom mentioned, u should define a udm first, u can use GUI as follow: Define->user defined->memory. You may need three udfs to get the C_T_RG display in counters. The first one is the udm reserve udf, you can copy an example from udf manual at Page 3-46. The second is udm clearance udf. and the example mentioned above also includes this one. The third is quit alike the one Rom provided above. You just need to chang the C_T_G(c,t)[0] in the 12th line to the C_T_RG(c,t)[0].
Have a good day

Hello, I hope it's not too late, I have a question, if I run a number of cases using design points, not doing those steps that were mentioned before will affect my project? I mean, the UDF will not work after first case? Thanks in advance.
argenisbnl is offline   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
problems with Fluent display windows chris FLUENT 3 January 7, 2016 11:44
Problem with paraFoam ata OpenFOAM 14 November 30, 2009 05:23
running CFX 11.0 on Fedora 7 : display problems Eric Joubarne CFX 1 October 3, 2007 17:51
free surface display carno Siemens 4 October 7, 2005 02:03
display and roughness nicolas FLUENT 2 July 23, 2002 21:09


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