KTH framework for Nek5000 toolboxes; testing version  0.0.1

Time stepper for Nek5000. More...

+ Collaboration diagram for Time stepper routines:

Modules

 Arnoldi algorithm using parpack
 Arnoldi algorithm with PARPACK.
 
 Power itertion routines
 Power iteration submodule.
 

Files

file  tstpr.f
 Set of subroutines to use time steppers for e.g. power iterations or solution of eigenvalue problem with Arnoldi algorithm.
 

Functions

subroutine tstpr_register ()
 Register time stepper module. More...
 
subroutine tstpr_init ()
 Initilise time stepper module. More...
 
logical function tstpr_is_initialised ()
 Check if module was initialised. More...
 
subroutine tstpr_main ()
 Control time stepper after every nek5000 step and call suitable stepper_vsolve of required submodule. More...
 
subroutine tstpr_dssum
 Average velocity and temperature at element faces. More...
 

Detailed Description

Time stepper for Nek5000.

This module implements time stepper method for linear solver in Nek5000 using the userchk interface. It allows to perform a number of constant length cycles providing the result vector to the submodule. There are two possible submodules: power iteration and spectra calculation using the Arnoldi algorithm implemented in PARPACK. The initial condition for the next stepping cycle is provided by the submodule. Three stepper modes are supported: direct, adjoint, direct+adjoint.

There are two parameters in TSTRP include file that heve to be adjusted for the given setup. These parameters are tstpr_pr and tstpr_ht defining whetere pressure ro themperature are included in the simlulation vector. These parameters can be equal 0 or 1. The pressure is never included in the vector inner product, however for tstpr_pr=0 it is reset to zero at the beginning of each cycle. On the other hand tstpr_ht should be set to 1 for all simulations including temperature.

Todo:
Finish temperature. Check pressure treatment
Module interface:
Global interface list:
Interface provided:
  1. tstpr_register
  2. tstpr_init
  3. tstpr_is_initialised
  4. tstpr_main
Global interface dependency:
Interface required:
  1. multiple interfaces from Runtime parameters and Monitoring module modules
  2. cnht_register, cnht_init, cnht_is_initialised, cnht_glsc2_wt, cnht_cpfld_set and cnht_opcmult from Conjugated heat transfer tools module (automatically registered)
  3. stepper_register; provided by a submodule
  4. stepper_init; provided by a submodule
  5. stepper_vsolve; provided by a submodule
Module interface usage:
!======================================================================
subroutine userchk
include 'TSTEP'
if (istep.eq.0) then
! start framework
endif
! monitor simulation
! call time stepper
call tstpr_main()
! finalise framework
if (istep.eq.nsteps.or.lastep.eq.1) then
call frame_end
endif
return
end
!======================================================================
subroutine frame_usr_register
implicit none
include 'SIZE'
include 'FRAMELP'
!-----------------------------------------------------------------------
! register modules
return
end subroutine
!======================================================================
subroutine frame_usr_init
implicit none
include 'SIZE'
include 'FRAMELP'
!-----------------------------------------------------------------------
! initialise modules
call tstpr_init()
return
end subroutine
!======================================================================
subroutine frame_usr_end
implicit none
include 'SIZE'
include 'FRAMELP'
!-----------------------------------------------------------------------
return
end subroutine
!======================================================================
subroutine chkpt_init()
Initilise checkpointing module.
Definition: chkpt.f:87
subroutine chkpt_register()
Register checkpointing module.
Definition: chkpt.f:11
subroutine frame_monitor
Simulataion monitoring.
Definition: frame.f:59
subroutine frame_start
Start framework.
Definition: frame.f:12
subroutine frame_end
Finalise framework.
Definition: frame.f:76
subroutine tstpr_main()
Control time stepper after every nek5000 step and call suitable stepper_vsolve of required submodule.
Definition: tstpr.f:259
subroutine tstpr_init()
Initilise time stepper module.
Definition: tstpr.f:108
subroutine tstpr_register()
Register time stepper module.
Definition: tstpr.f:12
Module parameters:
Global parameter list:
Parameters provided by time stepper module (include file - TSTPRD):
Varaible Type Runtime parameter Description
tstpr_mode integer _tstpr:mode simulation mode (1-direct, 2-adjoint, 3-direct+adjoint)
tstpr_step integer _tstpr:steps frequency of calling stepper_vsolve (number of time steps)
tstpr_cmax integer _tstpr:maxcycles maximal number of stepper cycles
tstpr_tol real _tstpr:tol convergence tolerance (e.g. PARPACK tolerance for Ritz values)
Module parameters:
Global parameter dependency:
Parameters required by time stepper module:
  1. Nek5000 PARAM array and logical flags:
    • PARAM(12) - time step dt
    • IFTRAN, IFPERT, IFBASE, IFHEAT, NSTEPS, NPERT
Module parameter usage:
[_TSTPR] # Runtime paramere section for time stepper module
MODE = DIR # Simulation mode
STEPS = 40 # Length of stepper phase
MAXCYC = 10 # Max number of stepper cycles
TOL = 0.10000000E-05 # Convergence threshold

Function Documentation

◆ tstpr_dssum()

subroutine tstpr_dssum

Average velocity and temperature at element faces.

Definition at line 386 of file tstpr.f.

References col2(), dssum(), h1_proj(), opcolv(), and opdssum().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tstpr_init()

subroutine tstpr_init

Initilise time stepper module.

Note
This routine should be called in frame_usr_init

Definition at line 107 of file tstpr.f.

References cnht_cpfld_set(), cnht_init(), mntr_abort(), mntr_log(), mntr_tmr_add(), mntr_warn(), rprm_rp_get(), rzero(), and stepper_init().

+ Here is the call graph for this function:

◆ tstpr_is_initialised()

logical function tstpr_is_initialised

Check if module was initialised.

Returns
tstpr_is_initialised

Definition at line 244 of file tstpr.f.

◆ tstpr_main()

subroutine tstpr_main

Control time stepper after every nek5000 step and call suitable stepper_vsolve of required submodule.

Definition at line 258 of file tstpr.f.

References cmult(), cnht_cpfld_set(), cnht_opcmult(), mntr_log(), mntr_logi(), mntr_tmr_add(), rzero(), and stepper_vsolve().

+ Here is the call graph for this function:

◆ tstpr_register()

subroutine tstpr_register

Register time stepper module.

Note
This routine should be called in frame_usr_register

Definition at line 11 of file tstpr.f.

References cnht_register(), mntr_abort(), mntr_mod_is_name_reg(), mntr_mod_reg(), mntr_tmr_add(), mntr_tmr_is_name_reg(), mntr_tmr_reg(), mntr_warn(), rprm_rp_reg(), rprm_sec_reg(), rprm_sec_set_act(), and stepper_register().

+ Here is the call graph for this function: