Page 1 of 1

UDF - iteration number

Posted: 12 Mar 2023, 00:26
by Remy
Hello

I would like to get information about the number of steady state iteration and temperature iteration form the level of user defined function. Any suggestions?
MAIN:
MAIN: -------------------------------------
MAIN: Steady state iteration: 2
MAIN: -------------------------------------
MAIN:
HeatSolve:
HeatSolve:
HeatSolve: -------------------------------------
HeatSolve: TEMPERATURE ITERATION 1
HeatSolve: -------------------------------------
HeatSolve:

Re: UDF - iteration number

Posted: 12 Mar 2023, 14:36
by kevinarden
When I looked at ElmerSolver and HeatSolve these were internal counters and I could not see if they were saved anywhere. However I developed how to count them in the UDF. Steady State iteration was easy it is passed as time when the UDF is called in a Steady State analysis. Since the UDF is called for every node on the BC I called it from, I ony update the iteration for the first node.

Boundary Condition 2
Target Boundaries(1) = 2
Name = "BoundaryCondition 2"
Temperature = Variable Time
Real Procedure "test" "Tester"
End
test.F90
(1 KiB) Downloaded 73 times

Re: UDF - iteration number

Posted: 12 Mar 2023, 14:48
by Remy
Kevin, thanks a lot! I will try it.