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

help calculate a function

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 6, 2011, 14:15
Default help calculate a function
  #1
New Member
 
walid
Join Date: Sep 2011
Posts: 9
Rep Power: 5
hassenwalid is on a distinguished road
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
Attached Files
File Type: doc Doc4.doc (16.0 KB, 44 views)
hassenwalid is offline   Reply With Quote

Old   September 8, 2011, 18:03
Default
  #2
New Member
 
walid
Join Date: Sep 2011
Posts: 9
Rep Power: 5
hassenwalid is on a distinguished road
please help
hassenwalid is offline   Reply With Quote

Old   September 9, 2011, 10:17
Default
  #3
Senior Member
 
Mohammad
Join Date: Feb 2010
Location: Shiraz, Iran
Posts: 108
Rep Power: 7
m2montazari is on a distinguished road
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
m2montazari is offline   Reply With Quote

Old   September 9, 2011, 14:08
Default
  #4
New Member
 
walid
Join Date: Sep 2011
Posts: 9
Rep Power: 5
hassenwalid is on a distinguished road
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
hassenwalid is offline   Reply With Quote

Old   September 10, 2011, 02:31
Default
  #5
Senior Member
 
Mohammad
Join Date: Feb 2010
Location: Shiraz, Iran
Posts: 108
Rep Power: 7
m2montazari is on a distinguished road
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
m2montazari is offline   Reply With Quote

Old   September 10, 2011, 07:22
Default
  #6
New Member
 
walid
Join Date: Sep 2011
Posts: 9
Rep Power: 5
hassenwalid is on a distinguished road
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
hassenwalid is offline   Reply With Quote

Old   September 13, 2011, 13:34
Default
  #7
New Member
 
walid
Join Date: Sep 2011
Posts: 9
Rep Power: 5
hassenwalid is on a distinguished road
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
hassenwalid is offline   Reply With Quote

Old   September 15, 2011, 01:05
Default
  #8
Senior Member
 
Mohammad
Join Date: Feb 2010
Location: Shiraz, Iran
Posts: 108
Rep Power: 7
m2montazari is on a distinguished road
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
m2montazari is offline   Reply With Quote

Old   September 15, 2011, 18:33
Default
  #9
New Member
 
walid
Join Date: Sep 2011
Posts: 9
Rep Power: 5
hassenwalid is on a distinguished road
thank you mohammad
I'll try to do it
hassenwalid is offline   Reply With Quote

Old   September 16, 2011, 03:03
Default
  #10
Member
 
Nikolopoulos Aristeidis
Join Date: Jan 2011
Location: Athens, Greece
Posts: 62
Rep Power: 6
Nikolopoulos is on a distinguished road
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
Nikolopoulos is offline   Reply With Quote

Old   September 16, 2011, 18:27
Default
  #11
New Member
 
walid
Join Date: Sep 2011
Posts: 9
Rep Power: 5
hassenwalid is on a distinguished road
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.
hassenwalid is offline   Reply With Quote

Old   September 19, 2011, 03:05
Default
  #12
Member
 
Nikolopoulos Aristeidis
Join Date: Jan 2011
Location: Athens, Greece
Posts: 62
Rep Power: 6
Nikolopoulos is on a distinguished road
yes
dx-velocity /dx is du/dx and so on!
Nikolopoulos is offline   Reply With Quote

Old   September 19, 2011, 03:58
Default
  #13
New Member
 
walid
Join Date: Sep 2011
Posts: 9
Rep Power: 5
hassenwalid is on a distinguished road
I tried but I got this message

"SEGMENTATION VIOLATION"
hassenwalid is offline   Reply With Quote

Old   September 23, 2011, 03:00
Default
  #14
Senior Member
 
Mohammad
Join Date: Feb 2010
Location: Shiraz, Iran
Posts: 108
Rep Power: 7
m2montazari is on a distinguished road
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
m2montazari is offline   Reply With Quote

Old   December 26, 2012, 07:17
Default
  #15
Member
 
Satish Gupta
Join Date: Jun 2012
Posts: 30
Rep Power: 5
Rahul123 is on a distinguished road
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
Rahul123 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
wmake groovyBC in OpenFOAM 1.7 ? randomid OpenFOAM Running, Solving & CFD 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 08:21
Installation 1.5 as a user of server (New bird) chiven OpenFOAM Installation 15 April 26, 2009 22:33
UDS Flux Function Choice Yang Chung FLUENT 0 August 10, 2008 06:57


All times are GMT -4. The time now is 03:19.