PyFR Convergence History Output

Tuesday, 10 July 2014

Hi all,

I was curious whether writing L1 or L2 norm information for each equation in the system being solved along with any user-defined force/moment integration information could be output and/or collected for purposes of plotting rates of convergence once the simulation has completed running. I imagine this might incur a small performance hit, but is this something easily implemented and/or on the horizon? I’m working on a short write-up about running PyFR on Rescale, and it would be nice to have that sort of information available.

Best Regards,

Zach Davis

Hi Zach,

This is currently not possible with the current version of PyFR however
it is on the roadmap. The functionality will build on top of the
"completed step handler" mechanism that already exists within PyFR. An
example of such a handler is the NaN checker:

def nansweep(intg):
    if intg.nsteps % args.nansweep == 0:
        if any(np.isnan(np.sum(s)) for s in intg.soln):
            raise RuntimeError(f'NaNs detected at t = {intg.tcurr}')
solver.completed_step_handlers.append(nansweep)

with the idea being that after each time step a set of user-defined
functions can be invoked which can interrogate the solution without
having to write it out to disk.

Regards, Freddie.