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

Interrupt Control Conditions for Coefficient Loops

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 28, 2018, 18:01
Default Interrupt Control Conditions for Coefficient Loops
  #1
New Member
 
Lloyd A. Sullivan
Join Date: Jun 2018
Location: UK
Posts: 9
Rep Power: 8
Lloyd Sullivan is on a distinguished road
Hi There,


I want to create a logical stop criteria expression that reads
if(1.1*abs(CEL value from current coefficient loop)>abs(CEL value from previous coefficient loop), 1, 0)


However, there are two issues.
1. the stopping criteria only works for time steps and not coefficient loops
2. I can't call back the previous coefficient loop, nor use a derived variable as they only can only calculate things from time steps (i.e. standard deviation, etc) not coefficient loops

Is there any way to get around these problems without using a Fortran Junction Box routine, and if a junction box is the only way, then can anyone give some sort of idea of how to monitor a variable from a coefficient loop and implement a stop criterion for the solver. I've had a look at the example User Fortran files, but they're a little bit vague.


Thanks in advance for any help on the matter.


Best regards,

Lloyd
Lloyd Sullivan is offline   Reply With Quote

Old   August 28, 2018, 19:42
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,864
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
There is no supported way of doing this in CEL. You will need User Fortran.

But do a search on the forum for TRANS_LOOP. That is the only way I know to recall values from previous, and it is a bit unreliable (which is why it is not supported).
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   August 30, 2018, 10:34
Default
  #3
New Member
 
Lloyd A. Sullivan
Join Date: Jun 2018
Location: UK
Posts: 9
Rep Power: 8
Lloyd Sullivan is on a distinguished road
Hi Glenn,


Thanks for the reply. I guess User fortran is the only way forward then.

Do you know have any experience with User Fortran scripting, or possibly any useful examples besides those in the examples folder?
Lloyd Sullivan is offline   Reply With Quote

Old   August 30, 2018, 20:02
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,864
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Your resources for user fortran are the documentation, anything you can find on the web (there is a little bit) and ANSYS support. They have examples of many cases of user fortran so they are a good resource as well.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   August 31, 2018, 05:16
Default
  #5
Senior Member
 
urosgrivc
Join Date: Dec 2015
Location: Slovenija
Posts: 365
Rep Power: 12
urosgrivc is on a distinguished road
if I understand you want to have a steady state solution but trans_loop only works in transient.

why not do a transient analysis with the same parameters, it would be like using a fixed timescale in steady state.
The solution should be the same. So your trans_loop would run probably every 3 or so iterations when timestep is converged.
urosgrivc is offline   Reply With Quote

Reply

Tags
fortran code, interrupt control, stop criteria

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
Centrifugal fan j0hnny CFX 13 October 1, 2019 14:55
Using Windkessel model to control outlet boundary conditions meganstevens ANSYS 1 September 9, 2019 19:01
Centrifugal fan-reverse flow in outlet lesds to a mass in flow field xiexing CFX 3 March 29, 2017 11:00
Overflow Error in Multiphase Modelling with Two Continuous Fluids ashtonJ CFX 6 August 11, 2014 15:32
logical expression for cfx interrupt control wjy-c CFX 0 November 29, 2013 05:30


All times are GMT -4. The time now is 10:58.