|
[Sponsors] |
September 6, 2011, 14:15 |
help calculate a function
|
#1 |
New Member
walid
Join Date: Sep 2011
Posts: 11
Rep Power: 14 |
I work on a problem of natural convection in fluent
I would like to compute a function as follows:see attached file how to do this please |
|
September 8, 2011, 18:03 |
|
#2 |
New Member
walid
Join Date: Sep 2011
Posts: 11
Rep Power: 14 |
please help
|
|
September 9, 2011, 10:17 |
|
#3 |
Senior Member
Mohammad
Join Date: Feb 2010
Location: Shiraz, Iran
Posts: 108
Rep Power: 16 |
hi,
If you want to define such a function in udf, first you should Keep temporary solver memory from being freed in solve-set in text mode of fluent. then use suffix _G or _RG for each variable and use any coordinate of gradient vector you want. take a look at page 265 of udf help manual pdf of fluent or find "Flow Variable Macros for Cells" in html mode. it has almost complete instruction. yours, mohammad |
|
September 9, 2011, 14:08 |
|
#4 |
New Member
walid
Join Date: Sep 2011
Posts: 11
Rep Power: 14 |
hank you very much mohammad
but I new to programming in fluent it will be very nice of you if you help me in developing this udf |
|
September 10, 2011, 02:31 |
|
#5 |
Senior Member
Mohammad
Join Date: Feb 2010
Location: Shiraz, Iran
Posts: 108
Rep Power: 16 |
hi,
first of all tell me that you want this function to be calculated for postprocessing or you want to use it inside solution algorithm? if you want it for post processing, simply use define->custom field function and use derivatives of velocity and temprature and .... but if you want to use it in equations that fluent solve, you must write a udf and compile it. so be more clear. yours, mohammad |
|
September 10, 2011, 07:22 |
|
#6 |
New Member
walid
Join Date: Sep 2011
Posts: 11
Rep Power: 14 |
yes i want it to be calculated postprocessing
can you give me more detail how to do it thank you very much for your help |
|
September 13, 2011, 13:34 |
|
#7 |
New Member
walid
Join Date: Sep 2011
Posts: 11
Rep Power: 14 |
hello Mr. mohammad
I hope that I does not bother you can you please help me I really need to have the steps to calculate this function thank you in advance |
|
September 15, 2011, 01:05 |
|
#8 |
Senior Member
Mohammad
Join Date: Feb 2010
Location: Shiraz, Iran
Posts: 108
Rep Power: 16 |
hi,
if you want to calculate this function for postproccessing, just go to define->custom field function and use the menus in it and buttons to define any function you want. if something went wrong or any other problem ask it...! yours, mohammad |
|
September 15, 2011, 18:33 |
|
#9 |
New Member
walid
Join Date: Sep 2011
Posts: 11
Rep Power: 14 |
thank you mohammad
I'll try to do it |
|
September 16, 2011, 03:03 |
|
#10 |
Member
Nikolopoulos Aristeidis
Join Date: Jan 2011
Location: Athens, Greece
Posts: 62
Rep Power: 15 |
You can do it with custom field functions.
But the variables you want are not available (the derivatives). In order to make them available In the text promt: solve-> set -> expert and answer YES [in Keep temporary solver memory from being freed?] Aris |
|
September 16, 2011, 18:27 |
|
#11 |
New Member
walid
Join Date: Sep 2011
Posts: 11
Rep Power: 14 |
thank you very much, aris, for your help
juste i want to know one more thing if the component of the velocity vector is (u, v, w) dx-velocity/dx mean du/dx ?????????????? dy-velocity/dx mean dv/dx ????????????? dz-velocity/dx mean dw/dx ??????????? walid Last edited by hassenwalid; September 16, 2011 at 18:42. |
|
September 19, 2011, 03:05 |
|
#12 |
Member
Nikolopoulos Aristeidis
Join Date: Jan 2011
Location: Athens, Greece
Posts: 62
Rep Power: 15 |
yes
dx-velocity /dx is du/dx and so on! |
|
September 19, 2011, 03:58 |
|
#13 |
New Member
walid
Join Date: Sep 2011
Posts: 11
Rep Power: 14 |
I tried but I got this message
"SEGMENTATION VIOLATION" |
|
September 23, 2011, 03:00 |
|
#14 |
Senior Member
Mohammad
Join Date: Feb 2010
Location: Shiraz, Iran
Posts: 108
Rep Power: 16 |
hi,
in which state you got errors? did you set fluent to keep the temporary? first check defining a very simple function, does it returns error too? then a simple fuction containing velocity derivatives may be a good choice for checking, does it returns error too? you should do these just as you are debugging a program! yours, mohammad |
|
December 26, 2012, 06:17 |
|
#15 |
Member
Satish Gupta
Join Date: Jun 2012
Posts: 30
Rep Power: 13 |
can any1 tell me how to apply du/dy=0 at the boundary condition
I am confused between differentiating between du/dx=0 and du/dy=0 in the UDF Thank you |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDS Flux Function Choice | Yang Chung | FLUENT | 1 | November 17, 2015 01:14 |
[swak4Foam] wmake groovyBC in OpenFOAM 1.7 ? | randomid | OpenFOAM Community Contributions | 1 | August 27, 2010 05:15 |
blockMesh error ... | balkrishna | OpenFOAM Pre-Processing | 0 | August 17, 2010 02:39 |
Problems in compiling paraview in Suse 10.3 platform | chiven | OpenFOAM Installation | 3 | December 1, 2009 07:21 |
Installation 1.5 as a user of server (New bird) | chiven | OpenFOAM Installation | 15 | April 26, 2009 22:33 |