Hi all,
I am running the convection-box cookbook and I wish to have the run stop when it has reached steady state. I am actually interested in getting a reliable number of digits for the steady state vrms, heat flux, avrg T, etc … and since I wish to push it to Ra=1e6 and may be higher with higher and higher resolutions I do not want to set an arbitrary end time.

I am therefore trying to use the steady state Termination criterion as follows (which I copy-pasted and adapted from the box_steady_state_terminate.prm test):

subsection Termination criteria
set Maximum relative deviation = 1e-5
set Time in steady state = 0.1
set Boundary indicators = top,bottom
end
set Maximum relative deviation = 1e-5
set Time in steady state = 0.1
end
set Maximum relative deviation = 1e-5
set Time in steady state = 0.1
end
end

My problem is as follows: the run stops at time 0.1 no matter the relative deviation values that I input (1e-5 or 1e-11). By the way my end time is set at 0.5. This means that either I don’t understand what “Time in steady state” mean or there is a bug.

Looking at the manual, the definition for “Time in steady state” is “The minimum length of simulation time that the system should be in steady state before termination” which I interpret as the required time interval during which steady state has been reached according to the relative deviation. However, if my run stops at t=0.1, this would mean that it has been at steady state all along, which is nonsense.

Any idea/comment on what I am doing wrong?

Here is the entire prm file:

set Dimension = 2
set Use years in output instead of seconds = false
set End time = 0.5
set Output directory = output
set Pressure normalization = surface
set Surface pressure = 0

until the end time is reached.

subsection Termination criteria
set Maximum relative deviation = 1e-5
set Time in steady state = 0.1
set Boundary indicators = top,bottom
end
set Maximum relative deviation = 1e-5
set Time in steady state = 0.1
end
set Maximum relative deviation = 1e-5
set Time in steady state = 0.1
end

end

subsection Geometry model
set Model name = box
subsection Box
set X extent = 1
set Y extent = 1
end
end

subsection Initial temperature model
set Model name = function
subsection Function
set Variable names = x,z
set Function constants = p=0.01, L=1, pi=3.1415926536, k=1
set Function expression = (1.0-z) - pcos(kpi*x/L)sin(piz)
end
end

subsection Boundary temperature model
set Fixed temperature boundary indicators = bottom, top
set List of model names = box
subsection Box
set Bottom temperature = 1
set Top temperature = 0
end
end

subsection Boundary velocity model
set Tangential velocity boundary indicators = left, right, bottom, top
end

subsection Gravity model
set Model name = vertical
subsection Vertical
set Magnitude = 1
end
end

subsection Material model
set Model name = simple
subsection Simple model
set Reference density = 20
set Reference specific heat = 0.01
set Reference temperature = 0
set Thermal conductivity = 1
set Thermal expansion coefficient = 2.5e-3
set Viscosity = 1e-7
end
end

subsection Formulation
set Formulation = custom
set Mass conservation = incompressible
set Temperature equation = reference density profile
end
subsection Heating model
set List of model names = shear heating, adiabatic heating

set Use simplified adiabatic heating = true

#end
end

subsection Mesh refinement
set Initial global refinement = 4
set Initial adaptive refinement = 0
set Time steps between mesh refinement = 0
end

subsection Postprocess
set List of postprocessors = velocity statistics, temperature statistics, heat flux statistics, visualization, depth average, viscous dissipation statistics, heating statistics
subsection Visualization
set List of output variables = density, viscosity, strain rate, heat flux map, artificial viscosity, strain rate tensor, vertical heat flux
set Time between graphical output = 0.05
subsection Heat flux map
set Output point wise heat flux = true
end
#set Interpolate output = true
end
subsection Depth average
set Number of zones = 127
set Time between graphical output = 0.05
set List of output variables = temperature, velocity magnitude, adiabatic density
end
end

subsection Solver parameters
set Temperature solver tolerance = 1e-10
end

Hi Cedric,

I think you understand the “Time in steady state” correctly, or at least this is also how I have used it in the past.

I didn’t try to run your input file, but here’s one idea: The steady state heat flux postprocessor will compute the integrated heat flux over the boundaries you list (instead of taking them into account individually). You list both the top and bottom boundary, so maybe the integrated heat flux doesn’t change much because it is pretty much zero anyway?

I also think if you specify several termination criteria, the model stops as soon as any of them is fulfilled. So based on your input file, it would stop if either temperature, or velocity, or heat flux reach a steady state.

Does the model still stop at a time of 0.1 if you for example only use the steady state velocity and set it to 1e-11? If so, that would really be a problem we will need to look into.

-Juliane

hi,
well spotted! in my case q_bottom and q_top are near identical so that the sum is below the threshold. I did not realize these were summed together
All fixed now using only q_top. Thanks!