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

How to make a UDF to repeat itself ???

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 30, 2009, 11:13
Default How to make a UDF to repeat itself ???
  #1
New Member
 
Mirco Magnini
Join Date: Apr 2009
Location: Bologna, Italy
Posts: 14
Rep Power: 17
magnounibo is on a distinguished road
Hi everybody,

I would like UDF to repeat itself adjusting a variable until it reaches a specific (under a tolerance) value.

I'm using VOF multiphase model to simulate transient vapor bubble growing in a superheated liquid, mass and energy sources are given by UDF.

At each time step, Fluent calculates mass and energy rates through my DEFINE_SOURCE UDFs. Then it put this value inside energy and continuity equations and solves them to compute fields of temperature and other variables.

This is the basis.

Then, before a new time step is computed, I would like to control that calculated temperature at the liquid-vapor interface is at the saturation temperature, if negative I want Fluent to restart mass and energy sources calculation and go on until saturation temperature at the interface is matched.

So, it's like an iterative procedure in which at each time step UDF has to be repeated until a precise value becomes under a determinate tolerance.
My problem is that I don't know how to write an UDF that does this work.

Can anybody help me???

Thank in advance

Mirco
magnounibo is offline   Reply With Quote

Old   June 25, 2010, 07:44
Default
  #2
New Member
 
Rengtong Liu
Join Date: May 2010
Posts: 15
Rep Power: 16
liurengtong123 is on a distinguished road
Hi, i have the same question like you ,i want to know if you know how to solve it.
Big thanks!!!!
liurengtong123 is offline   Reply With Quote

Old   June 30, 2010, 06:39
Default
  #3
New Member
 
qwerty753
Join Date: May 2009
Posts: 16
Rep Power: 17
qwerty753 is on a distinguished road
I have the same problem about BC at imposed heat flux.
I want to control a parameter unitil the first time step and restart this time step if my tollerance criterium isn't satisfied.
How to write in UDF?
Thank
qwerty753 is offline   Reply With Quote

Old   July 2, 2010, 04:33
Default
  #4
New Member
 
Rengtong Liu
Join Date: May 2010
Posts: 15
Rep Power: 16
liurengtong123 is on a distinguished road
is there someone can solve this problem ? I need your help!!!
liurengtong123 is offline   Reply With Quote

Old   July 11, 2010, 06:16
Default
  #5
New Member
 
qwerty753
Join Date: May 2009
Posts: 16
Rep Power: 17
qwerty753 is on a distinguished road
Have anyone an idea?
qwerty753 is offline   Reply With Quote

Old   July 26, 2011, 17:15
Default
  #6
Member
 
pranab_jha's Avatar
 
Pranab N Jha
Join Date: Nov 2009
Location: Houston, TX
Posts: 86
Rep Power: 17
pranab_jha is on a distinguished road
Hi guys, this might be too late. But I think this problem can be solved using a UDM (user defined memory) location. You can store the value from one iteration in the UDM and then in the next time-step, you can compare the new value against the old value (stored in the UDM).
pranab_jha 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
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM Rizwan Fluent UDF and Scheme Programming 40 March 18, 2018 07:05
I/O of a real value by "DEFINE_RW_FILE" (UDF) Pietro Asinari Fluent UDF and Scheme Programming 1 August 15, 2015 20:08
How to make a UDF to have a velocity profile in a square channel Gigis Fluent UDF and Scheme Programming 8 January 13, 2013 23:20
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14
udf and unix for help. Gong W T FLUENT 6 August 29, 2004 10:57


All times are GMT -4. The time now is 20:48.