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

Junction Box to be called at each iteration in Steady state mode

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 27, 2015, 13:10
Default Junction Box to be called at each iteration in Steady state mode
  #1
Member
 
Araz
Join Date: Feb 2011
Location: Canada
Posts: 32
Rep Power: 15
Araz is on a distinguished road
Dear all,

I have developed a Junction Box (JB) routine which I want to be called at each steady state iteration (equivalent to each "Time Step" in transient mode). However, the option that I need is not available in the pull-down menu. I wonder if anyone has come across the similar situation who can help me out.

Regards,
Araz
Araz is offline   Reply With Quote

Old   October 27, 2015, 13:56
Default
  #2
Senior Member
 
Join Date: Jun 2009
Posts: 1,804
Rep Power: 32
Opaque will become famous soon enough
Since ANSYS CFX use a false transient approach to obtain the steady state solution, the corresponding junction boxes are
  • "Start of Time Step"

    "User Input Start of Time Step"

    "End of Time Step"
Opaque is offline   Reply With Quote

Old   October 27, 2015, 14:02
Default
  #3
Member
 
Araz
Join Date: Feb 2011
Location: Canada
Posts: 32
Rep Power: 15
Araz is on a distinguished road
Dear Opaque,

Thanks for the reply, the problem is when switched to steady state, these options that you mentioned are not available anymore. They are only available for transient runs.
Araz is offline   Reply With Quote

Old   October 27, 2015, 14:39
Default
  #4
Senior Member
 
Join Date: Jun 2009
Posts: 1,804
Rep Power: 32
Opaque will become famous soon enough
My mistake, based on the documentation the entry points are:
  • Start of Coefficient Loop: Called at the start of each iteration loop. For a transient run, this relates to the inner loop.

    User Input Start of Coefficient Loop: Called at the start of each coefficient loop. Works identically to the User Input location but is called at the beginning of each coefficient loop in a transient run and steady-state run.

    End of Coefficient Loop: Called at the end of each iteration loop. For a transient run, this relates to the inner loop.
Opaque is offline   Reply With Quote

Old   October 27, 2015, 15:24
Default
  #5
Member
 
Araz
Join Date: Feb 2011
Location: Canada
Posts: 32
Rep Power: 15
Araz is on a distinguished road
Yes, this is what I have reached eventually. I have already tried "Start of coefficient loop" but the JB wasn't called. So, it seems the only available option for what I want is "User input Start of Coefficient Loop" as I want to call the JB at the start of each iteration. However, I couldn't figure out what kind of user input is required and how it should be written and also where to be written.
Based on the documentation: "The User Input option for Junction Box Location enables you to read in your own data stored in files using arbitrary data formats."

I don't see how to relate this statement to what I'm looking for. Do I need to write data file which says where to call the JB? if yes, then how?

Regards,
Araz
Araz is offline   Reply With Quote

Old   October 27, 2015, 15:54
Default
  #6
Senior Member
 
Join Date: Jun 2009
Posts: 1,804
Rep Power: 32
Opaque will become famous soon enough
Accessing a junction box requires two steps
  • Define the user routine (see User Routines tab): Name, Calling Name, Library Name, Calling Location
  • Activating the junction box (see Solver Control tab): List which defined junction box routines should be called for this analysis

Have you activated the junction box ?
Opaque is offline   Reply With Quote

Old   October 27, 2015, 15:58
Default
  #7
Member
 
Araz
Join Date: Feb 2011
Location: Canada
Posts: 32
Rep Power: 15
Araz is on a distinguished road
Dear Opaque,
Yes these options are all set and I have been working with JB and CEL routines for a few years now but it was all for transient runs.
Araz is offline   Reply With Quote

Old   October 27, 2015, 16:41
Default
  #8
Senior Member
 
Join Date: Jun 2009
Posts: 1,804
Rep Power: 32
Opaque will become famous soon enough
It should work then.

You may have to post some extract of your CFX Command Language (CCL) to make further comments..
Opaque is offline   Reply With Quote

Old   October 27, 2015, 17:56
Default
  #9
Member
 
Araz
Join Date: Feb 2011
Location: Canada
Posts: 32
Rep Power: 15
Araz is on a distinguished road
Yes it does work. I have 2 CEL routines compiled as well. I just noticed that solver first calls the CEL routines and crashes before calling JB. I need the solver to first call JB and then CEL routines. Now the problem has changed
Araz is offline   Reply With Quote

Old   October 27, 2015, 18:16
Default
  #10
Member
 
Araz
Join Date: Feb 2011
Location: Canada
Posts: 32
Rep Power: 15
Araz is on a distinguished road
It seems that the JB is not called at the start of iteration (attached image). It can be seen from the image that CFX is solving the mesh displacement before calling the JB. What I want is to call the JB first, then CEL routines which feed the displacement back to CFX and then go into the iteration to slove the flow filed around the new geometry. It was all fine in transient mode but here I'm lost.
Araz is offline   Reply With Quote

Old   October 27, 2015, 22:36
Default
  #11
Senior Member
 
Join Date: Feb 2011
Posts: 496
Rep Power: 18
Antanas is on a distinguished road
Quote:
Originally Posted by Araz View Post
Yes it does work. I have 2 CEL routines compiled as well. I just noticed that solver first calls the CEL routines and crashes before calling JB. I need the solver to first call JB and then CEL routines. Now the problem has changed
From what location do you call JB routine? I suggest you to add some printing (to solver output file) lines in you JB and CEL code to make sure the order in which solver calls them.
Antanas is offline   Reply With Quote

Old   October 28, 2015, 00:57
Default
  #12
Member
 
Araz
Join Date: Feb 2011
Location: Canada
Posts: 32
Rep Power: 15
Araz is on a distinguished road
Dear Antanas,

I call the JB at the start of coefficient loop.

I am printing "Start MYJUNK" (as you see at the bottom right of the image) and "Start My CEL" at the beginning of CEL routines. When I compile JB and CEL routines at the same time, "Start My CEL" appears on the screen which shows CEL routines are called first. The image that I uploaded corresponds to a test case where CEL routines are removed just to make sure JB routine is called by the solver.
Araz is offline   Reply With Quote

Old   October 28, 2015, 01:10
Default
  #13
Senior Member
 
Join Date: Feb 2011
Posts: 496
Rep Power: 18
Antanas is on a distinguished road
Quote:
Originally Posted by Araz View Post
Dear Antanas,

I call the JB at the start of coefficient loop.

I am printing "Start MYJUNK" (as you see at the bottom right of the image) and "Start My CEL" at the beginning of CEL routines. When I compile JB and CEL routines at the same time, "Start My CEL" appears on the screen which shows CEL routines are called first. The image that I uploaded corresponds to a test case where CEL routines are removed just to make sure JB routine is called by the solver.
What do your JB and CEL routines do and from where did you call 'em in transient case?
Antanas is offline   Reply With Quote

Old   October 28, 2015, 01:32
Default
  #14
Member
 
Araz
Join Date: Feb 2011
Location: Canada
Posts: 32
Rep Power: 15
Araz is on a distinguished road
JB routine gets the flow parameters from CFX and computes the displacement for the geometry. The computed displacement is stored in MMS and then called from within CEL routines to be sent back to CFX to adjust the mesh.
In transient run, the JB routine is first called at the start of time step, then CEL routines are called all before getting into the coefficient loops.
Araz is offline   Reply With Quote

Old   October 28, 2015, 03:48
Default
  #15
Senior Member
 
Join Date: Feb 2011
Posts: 496
Rep Power: 18
Antanas is on a distinguished road
Quote:
Originally Posted by Araz View Post
JB routine gets the flow parameters from CFX and computes the displacement for the geometry. The computed displacement is stored in MMS and then called from within CEL routines to be sent back to CFX to adjust the mesh.
In transient run, the JB routine is first called at the start of time step, then CEL routines are called all before getting into the coefficient loops.
Well. As quick solution you can try to set a flag indicating that data for CEL routine is ready...

Or change locations at which JB routine is called to adapt to existing situation. For ex:
1. JB called at User Input
2. Solver calls CEL routines
3. JB called at End of Coef. Loop
Antanas 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
[PyFoam] Problems with the new PyFoam release zfaraday OpenFOAM Community Contributions 13 December 9, 2014 18:58
[PyFoam] having problems with pyfoam Installation vitorspadetoventurin OpenFOAM Community Contributions 3 December 2, 2014 07:18
Constant velocity of the material Sas CFX 15 July 13, 2010 08:56
regarding steady state discrete phase calculations hajszan_gyula FLUENT 1 February 28, 2006 01:32
About the difference between steady and unsteady problems Lisa Main CFD Forum 11 July 5, 2000 14:37


All times are GMT -4. The time now is 08:31.