CFD Online Discussion Forums

CFD Online Discussion Forums (
-   CFX (
-   -   Interrupt control condition CFX-Pre (

Cecco July 3, 2013 11:25

Interrupt control condition CFX-Pre
Hi everybody,
I would like terminate my simulation when a specific variable became stable with accumulated time step.

In order to do this I would like write a conditions like this:

Interrupt when VARIABLE1(valuated on last time step) - VARIABLE1(valuated on last time step-100)< (a certain constant like 10)

How can I write a condition like this? Is it possible?


ghorrocks July 3, 2013 19:07

Not easily, CFX does not have good access to previous time steps in CEL. It is most easily implemented with user fortran.

Cecco July 4, 2013 08:47

mmmh quite hard.
I know F90 language, but never tried to implement a subroutine in CFX. I will try. If someone wanna help me thanks in advance.

Thanks ghorrocks

ghorrocks July 4, 2013 20:01

Yes, it is unfortunate that CEL does not support data at other time steps. It is a very frequently asked for feature.

TrII4d December 4, 2013 05:20

hey ... i have a similar problem like cecco ... is there any solution in cfx 14.5 or 15 ?

otherwise how is ur progress cecco?

my idea is to create a perl script ... u can open the "mon.old" file ... write out the residuals and create ur own convergence criteria ...

Lance December 4, 2013 06:25

In Pre you can set time derivatives of additional variables. For example myAV.Time Derivative is possible to compute during the solution, and could maybe be used as an indicator of a stable variable. See the manuals, especially cfx_ref.pdf.

TrII4d December 4, 2013 09:23

hi lance ... thanks for ur answer ... let me explain my problem more in detail:

i'm calculating heat flux from a cylinder to a fluid ... in the volumetric cylinder i defined a heat flux q = const. = 20 W

i want to implement the following interrupt criteria:

\frac{q - areaInt(Wall Heat Flux)@CYLINDER}{q} < 0.005

so i want to be sure that the simulation ends only when the the heat flux is equal to the BC (20 W)

i can implement the formula as an expression at set this expression as interrupt control condition, e.g. :
((myHeatFlux - abs(areaInt(Wall Heat Flux)@FLSO_CYLINDER_SHELL Side 2))/myHeatFlux) <= 0.005)

but what i want additional is, that after the criteria reached the solver has to calculate 100 iterations additionally (to be very sure)

thanks for any hints!

ghorrocks December 4, 2013 17:38

Why not just activate the imbalances as a convergence criterion? Also, the global imbalances are in the results file as well.

What you are doing appears to already be an option in CFX, so no need to write any code.

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