KTH framework for Nek5000 toolboxes; testing version  0.0.1

Add white noise to velocity field at given time in a box. More...

+ Collaboration diagram for Noise box module:

Files

file  nseb.f
 Adding white noise in a box.
 

Functions

subroutine nseb_register ()
 Register noise box module. More...
 
subroutine nseb_init ()
 Initilise noise box module. More...
 
logical function nseb_is_initialised ()
 Check if module was initialised. More...
 
subroutine nseb_noise_add ()
 Add noise to velocity field in a box. More...
 

Detailed Description

Add white noise to velocity field at given time in a box.

This set of routines adds a white noise in the rectangular box performing global face averaging at the end. To keep the field independent on number of processors we use math_ran_dst insted or ran1 as a random number ganarator. At the end velocity field is smoothed at the element faces.

Module interface:
Global interface list:
Interface provided:
  1. nseb_register
  2. nseb_init
  3. nseb_noise_add
Global interface dependency:
Interface required:
  1. multiple interfaces from Runtime parameters and Monitoring module modules
  2. math_ran_dst from Math module
Module interface usage:
subroutine userchk
include 'TSTEP' ! ISTEP
! start framework
if (istep.eq.0) call frame_start
! monitor simulation
! add noise
! finalise framework
if (istep.ge.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 nseb_init
return
end subroutine
!======================================================================
subroutine frame_usr_end
implicit none
include 'SIZE'
include 'FRAMELP'
!-----------------------------------------------------------------------
return
end subroutine
!======================================================================
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 nseb_init()
Initilise noise box module.
Definition: nseb.f:128
subroutine nseb_register()
Register noise box module.
Definition: nseb.f:11
subroutine nseb_noise_add()
Add noise to velocity field in a box.
Definition: nseb.f:226
Module parameters:
Global parameter list:
Parameters provided by nseb module (include file - NSEBD):
Varaible Type Runtime parameter Default value Description
nseb_tim real _nseb:time 0.0 time to add noise
nseb_amp real _nseb:amplitude 0.0 noise amplitude
nseb_bmin(1) real _nseb:boxminx 0.0 position of lower left box corner; dimension X
nseb_bmin(2) real _nseb:boxminy 0.0 position of lower left box corner; dimension Y
nseb_bmin(3) real _nseb:boxminz 0.0 position of lower left box corner; dimension Z
nseb_bmax(1) real _nseb:boxmaxx 0.0 position of upper right box corner; dimension X
nseb_bmax(2) real _nseb:boxmaxy 0.0 position of upper right box corner; dimension Z
nseb_bmax(3) real _nseb:boxmaxz 0.0 position of upper right box corner; dimension Y
nseb_rfc(1,1) real _nseb:frc1_1 3.0e4 function coefficient for random number gnerator; cf. 1, vel. cmp. VX
nseb_rfc(2,1) real _nseb:frc2_1 3.0e4 function coefficient for random number gnerator; cf. 2, vel. cmp. VX
nseb_rfc(3,1) real _nseb:frc3_1 3.0e4 function coefficient for random number gnerator; cf. 3, vel. cmp. VX
nseb_rfc(1,2) real _nseb:frc1_2 3.0e4 function coefficient for random number gnerator; cf. 1, vel. cmp. VY
nseb_rfc(2,2) real _nseb:frc2_2 3.0e4 function coefficient for random number gnerator; cf. 2, vel. cmp. VY
nseb_rfc(3,2) real _nseb:frc3_2 3.0e4 function coefficient for random number gnerator; cf. 3, vel. cmp. VY
nseb_rfc(1,3) real _nseb:frc1_3 3.0e4 function coefficient for random number gnerator; cf. 1, vel. cmp. VZ
nseb_rfc(2,3) real _nseb:frc2_3 3.0e4 function coefficient for random number gnerator; cf. 2, vel. cmp. VZ
nseb_rfc(3,3) real _nseb:frc3_3 3.0e4 function coefficient for random number gnerator; cf. 3, vel. cmp. VZ
Module parameter usage:
[_NSEB] # Runtime paramere section for noise box module
TIME = 0.20000000E+01 # Time to add noise
AMPLITUDE = 0.10000000E-02 # Noise amplitude
BOXMINX = -0.50000000E+01 # Position of lower left box corner; dimension X
BOXMINY = -0.50000000E+01 # Position of lower left box corner; dimension Y
BOXMAXX = 0.50000000E+01 # Position of upper right box corner; dimension X
BOXMAXY = 0.50000000E+01 # Position of upper right box corner; dimension Y
FRC1_1 = 0.30000000E+05 # Function coefficient for random number gnerator
FRC2_1 = -0.15000000E+04 # Function coefficient for random number gnerator
FRC3_1 = 0.50000000E+05 # Function coefficient for random number gnerator
FRC1_2 = 0.23000000E+05 # Function coefficient for random number gnerator
FRC2_2 = 0.23000000E+04 # Function coefficient for random number gnerator
FRC3_2 = -0.20000000E+06 # Function coefficient for random number gnerator

Function Documentation

◆ nseb_init()

subroutine nseb_init

Initilise noise box module.

Note
This routine should be called in frame_usr_init
Remarks
This routine uses global scratch space SCRUZ

Definition at line 127 of file nseb.f.

References mntr_tmr_add(), mntr_warn(), and rprm_rp_get().

+ Here is the call graph for this function:

◆ nseb_is_initialised()

logical function nseb_is_initialised

Check if module was initialised.

Returns
nseb_is_initialised

Definition at line 212 of file nseb.f.

◆ nseb_noise_add()

subroutine nseb_noise_add

Add noise to velocity field in a box.

Definition at line 225 of file nseb.f.

References mntr_log(), mntr_tmr_add(), opcolv(), and opdssum().

+ Here is the call graph for this function:

◆ nseb_register()

subroutine nseb_register

Register noise box module.

Note
This routine should be called in frame_usr_register

Definition at line 10 of file nseb.f.

References 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(), and rprm_sec_set_act().

+ Here is the call graph for this function: