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

UDF called twice per step

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 12, 2016, 14:58
Default UDF called twice per step
  #1
New Member
 
Yang Liu
Join Date: Jan 2015
Posts: 2
Rep Power: 0
majiayagg is on a distinguished road
Hi I am a new udf user and am controlling the dynamic mesh using udf, but I am encountered with a problem here.
After each time step, I can see two messages coming out, as follows. Since this message is written in udf, I assume it's called twice per step. Now the problem is the values for each of the variables are not the same. Which one is correct and passed to the next step?
I appreciate any comments. Thanks.

Updating solution at time level N... done.
time = 0.256000, p_x = -0.001251, p_y = -0.000218, radius = 0.001270,
x_vel = 0.007985, y_vel = -0.024104, force_x = -0.449745, force_y = -0.715030,
22.200000contact, centriforce = 0.000000

Updating mesh at time level N... time = 0.256000, p_x = -0.001251, p_y = -0.000218, radius = 0.001270,
x_vel = 0.007639, y_vel = -0.024654, force_x = -0.449745, force_y = -0.715030,
22.200000contact, centriforce = 0.000000
majiayagg is offline   Reply With Quote

Old   January 12, 2016, 16:34
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,665
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
I'm not sure what your UDF does, but it is called twice because of the transient simulation + dynamic meshing. The key is to understand what & when it is being updated.

Quote:
Originally Posted by majiayagg View Post
Updating mesh at time level N
This step is related to the update of the solution as a result of the dynamic meshing.

Quote:
Originally Posted by majiayagg View Post
Updating solution at time level N... done.
This is the earliest in the the time-stepping procedure. In this process, the most recent solution is transferred to become the new previous time-step. Only after this can you then proceed to solve for the new time-step. At the end of this update, the current variables are effectively the initial guesses for the new time-step. You will then need to do the inner iterations and update the solution. In other words, immediately before this update the variables from the previous calculation were in their final state before being passed.

I'm not sure if you want your UDF to be called twice or when, depends on what you're trying to do with the UDF.
LuckyTran is offline   Reply With Quote

Old   January 13, 2016, 15:23
Default
  #3
New Member
 
Yang Liu
Join Date: Jan 2015
Posts: 2
Rep Power: 0
majiayagg is on a distinguished road
Thanks for your informative reply. I want the udf to be called only once. The first updated values at time level N should be passed to compute the next step. Is there anyway to do that?
majiayagg is offline   Reply With Quote

Reply

Tags
dynamic mesh event, udf cg motion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
time step continuity problem in VAWT simulation lpz_michele OpenFOAM Running, Solving & CFD 5 February 22, 2018 19:50
Floating point exception error lpz_michele OpenFOAM Running, Solving & CFD 53 October 19, 2015 02:50
obtain species concentration in every time step to use in a udf solmaz aryafar Fluent UDF and Scheme Programming 0 April 8, 2015 10:52
InterFoam negative alpha karasa03 OpenFOAM 7 December 12, 2013 03:41
calling result of a UDF into current time step Komon Fluent UDF and Scheme Programming 1 April 1, 2012 19:53


All times are GMT -4. The time now is 05:06.