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

Is define_source called after each iteration in a transient analysis?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 11, 2017, 06:08
Default Is define_source called after each iteration in a transient analysis?
  #1
New Member
 
jyothsna k
Join Date: May 2014
Posts: 18
Rep Power: 11
jyothsna k is on a distinguished road
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.
jyothsna k is offline   Reply With Quote

Old   April 11, 2017, 13:04
Default
  #2
Senior Member
 
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25
mprinkey will become famous soon enough
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 just-solved UDS0 field will be used when calculating the source term for UDS1. It becomes a Gauss-Siedel 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.
mprinkey is offline   Reply With Quote

Old   April 12, 2017, 10:47
Default 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: 11
jyothsna k is on a distinguished road
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
jyothsna k is offline   Reply With Quote

Old   April 12, 2017, 21:23
Default
  #4
Senior Member
 
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25
mprinkey will become famous soon enough
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.
mprinkey is offline   Reply With Quote

Old   April 13, 2017, 04:06
Default
  #5
New Member
 
jyothsna k
Join Date: May 2014
Posts: 18
Rep Power: 11
jyothsna k is on a distinguished road
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 .
jyothsna k is offline   Reply With Quote

Reply

Tags
axisymmetry, define_source, iteration, transient, uds


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
ignore inner iteration in Transient mode Mina_Mbg FLUENT 3 August 28, 2015 05:05
Average value of expression in transient flow analysis JFK CFX 1 May 22, 2013 08:52
transient analysis _porous medium shaswat CFX 4 January 25, 2012 00:18
reconstructParMesh not working with an axisymetric case francesco OpenFOAM Bugs 4 May 8, 2009 05:49
Parallel runs slower with MTU=9000 than MTU=1500 Javier Larrondo FLUENT 0 October 28, 2007 22:30


All times are GMT -4. The time now is 21:28.