
[Sponsors] 
Is define_source called after each iteration in a transient analysis? 

LinkBack  Thread Tools  Search this Thread  Display Modes 
April 11, 2017, 07:08 
Is define_source called after each iteration in a transient analysis?

#1 
New Member
jyothsna k
Join Date: May 2014
Posts: 18
Rep Power: 10 
Is the DEFINE_SOURCE updated/called after each iteration in a transient analysis?
I would like to know this as i am using the axisymmetry option in fluent to solve a vector equation using the user defined Scalars. This requires me to transfer some UDS terms to the source (The actual source is function of time but is a constant in the domain over which it is defined). The value of these terms vary with each iteration as the solution converges. My concern is if the Source term is getting updated at each step as this is what i require it to happen. If this doesn't happen, i will have to shift to a 3D model. I would be thankful for any information regarding this. 

April 11, 2017, 14:04 

#2 
Senior Member
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 23 
Yes. DEFINE_SOURCE is called to update the RHS and center coefficient of the A matrix before it is solved each iteration. I don't recall exactly when each is called *within* the iteration. For example, you are solving a vector equations as three UDS. I don't know if the justsolved UDS0 field will be used when calculating the source term for UDS1. It becomes a GaussSiedel vs Jaboci iteration situation.
It is pretty easy to figure these things out though...sprinkle some CX_Message() calls through out your UDFs, run a few iterations and diagnose the output. You will see exactly when and in what order your source functions are called. You can go a step further an turn up the verbosity on the linear equation solver and you can see when the source is called *relative* to the linear solve of each variable, including your UDSs. I do recommend doing this ONLY with a serial run. Parallel CX_Messages can quickly get out of order and out of hand, and often just confuse the situation further. Serial dumps should always be revelatory. 

April 12, 2017, 11:47 
Is define_source called after each iteration in a transient analysis ... contd

#3 
New Member
jyothsna k
Join Date: May 2014
Posts: 18
Rep Power: 10 
Thank you very much for your quick response.
I am still a bit confused as i have to model a vector Laplacian in cylindrical coordinates. I therefore have only one UDS, say UDS(0),defined and one equation to solve. Since i only have the scalar axisymmetric transport equation available to me through Fluent, i transfer the one additional term in the vector Laplacian to 'Source'. The source term is now Actual source+the additional term from the vector Laplacian.This additional term, in terms of UDS(0), keeps changing each iteration and so should the Source until convergence. If i understand your answer right, this is what actually happens. Am i right? I will try using CX_Message() too. Thanks for the suggestion 

April 12, 2017, 22:23 

#4 
Senior Member
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 23 
I think you will have to show me your mathematical model for me to comprehend how you are modeling a "vector Laplacian" with a single scalar. Laplacian of a vector is a vector, AFAIK. But whatever you are doing in the DEFINE_SOURCE, it will be done updated every iteration of every timestep, yes.
Good luck. 

April 13, 2017, 05:06 

#5 
New Member
jyothsna k
Join Date: May 2014
Posts: 18
Rep Power: 10 
Thanks again.
I transfer the 1/r^2 * (UDS(0))which is the additional term in the vector Laplacian (of the theta component alone) to the Source. My equation is only in terms of the theta component . 

Tags 
axisymmetry, define_source, iteration, transient, uds 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
ignore inner iteration in Transient mode  Mina_Mbg  FLUENT  3  August 28, 2015 06:05 
Average value of expression in transient flow analysis  JFK  CFX  1  May 22, 2013 09:52 
transient analysis _porous medium  shaswat  CFX  4  January 25, 2012 01:18 
reconstructParMesh not working with an axisymetric case  francesco  OpenFOAM Bugs  4  May 8, 2009 06:49 
Parallel runs slower with MTU=9000 than MTU=1500  Javier Larrondo  FLUENT  0  October 28, 2007 23:30 