Source code configurable defaults

The following routines contain hardwired defaults which can be modified at compile time by the user. Scroll down for a list and description of the configurable parameters.
 
common_dynamic.f
init_io.f
set_lim_values.f
 
------------------------------------------------------------
common_dynamic.f
This file contains some hardwired dimensions for NSU3D memory allocation. Although the current values should be best for most applications, occasionally these may be modified for special cases:
 
     parameter(mmesh=10)             ---> Maximum number of meshes in multigrid
     parameter(mpart_files=2048)     ---> Maximum number of partitions in grid file
     parameter(mpart_loc=512)        ---> Maximum number of partitions per processor
     parameter(mbctyp=40)            ---> Maximum number of boundary condition instances
     parameter(mstage=10)            ---> Maximum number of Runge-Kutta stages
     parameter(mbclist=8)            ---> Maximum number of boundary condition types
     parameter(mcwords=25)           ---> Maximum number of words in mpi buffers (fixed)
     parameter(mcount_ires=1000)     ---> Maximum buffer size for iteration based histories
     parameter(mcount_istep=1000)    ---> Maximum buffer size for time-step based histories
     parameter(mcount_comp_force=1000) --> Maximum buffer size for storing force histories
 
Note that the buffer sizes for ires, istep and component forces contain numerous entries (values to be stored) per iteration
of time step, therefore these should not be set indefinitely large since this will require large memory resources.
 
 
------------------------------------------------------------------------------------------
init_io.f
 
This routine contains parameters and file names for I/O related functions in NSU3D.
Configurable parameters:
 
IRESTART_LOG = 1 -->    Log Restart Names by Local(=0) or Global(=1) step/cycle number When intermediate restart/solution files are output, these are given the name restart.# where # corresponds to the time step or iteration number (depending on whether this is a time dependent or steady-state run, respectively). The numbering scheme can be based on the local time step or iteration number, meaning the number based on the current run alone (starting at 1 in the current run) or the global number meaning the number including all restart time steps/iterations which proceeded the current run in cases where the current run has been restarted from a previous solution.
 
IO_SYSTEMCALL = 2 !Possible Values: 0,1,2
NSU3D performs various system calls principally for I/O functions, such as creating directories and copying/appending history files.  This parameter either suppresses any information concerning system calls (=0) or writes out information to standard out concerning these system calls (=1,=2). When set =2, each message will be prefaced by ">>Syscall: " in order to more clearly identify these messages.
 
IO_CLEAN      = 1 !Possible Values: 0=No Clean, 1=Clean
When set =1, this causes all history files (i.e. rplot.out, rplot.history.out etc..) to be removed from the current working directory at the end of the run, since these are logged in the restart.out subdirectory.  Files are left in both restart.out and the current working directory for IO_CLEAN=0.  Files with names which do not correspond to any of these history files are not removed from the working directory in either case.
 
IO_SLEEP      = 2
On various hardware platforms there can be a delay in the NSF file system cache updating procedure which may cause NSU3D to fail when trying to write to a directory which was created by one processor, but which has not been cached in NFS and is thus still not visible to all other processors.  This parameter causes NSU3D to wait for IO_SLEEP seconds after creating the directory to allow NFS to catch up and cache the directory.  If NSU3D fails on I/O operations try increasing this value.  The value will be hardware dependent.
 
kflush_ires       = 300
History information based on iteration count is periodically flushed to the history files written in the current working directory (and ultimately copied to the restart.out subdirectory).  This parameter determines the flushing frequency (i.e. flush very 300 iterations).
 
kflush_istep      = 2
History information based on time-step count (for time-dependent simulations) is periodically flushed to the history files written in the current working directory (and ultimately copied to the restart.out subdirectory).  This parameter determines the flushing frequency (i.e. flush very 2 time steps). Since a time step contains numerous subiterations, the time-step flushing frequency is typically smaller than the iteration-based flushing frequency, thus allowing a suitable wall-clock update frequency of the history files.
 
kflush_comp_force = 300
History information for component based forces is periodically flushed to the history files written in the current working directory (and ultimately copied to the restart.out subdirectory).  This parameter determines the flushing frequency (i.e. flush very 300 iterations).
 
 
OUTPUT_WRK_DIRNAME1 = './WRK'
The working directory name is set using this parameter.  Default is ./WRK which creates a working directory WRK under the current directory. All history and restart files will be written to this directory. This directory is also overwritten for new runs if it exists previously.
 
     RESTART_DIRNAME1    = 'restart.out'
     RESTART_DIRNAME2    = 'restart.aux.out'
     SOLUTION_DIRNAME1   = 'solution.out'
     SPARSE_DIRNAME1     = 'sparse.out'
 
 
The names for the directories for restart and solution files are set here. All other file names are also set in init_io.f Descriptions of these files are self explanatory or are covered elsewhere in the documentation.
Other file names:
     FILENAME0(11)  = 'rplot.out'
     FILENAME0(12)  = 'rplot.restart.out'
     FILENAME0(13)  = 'force1.out'
     FILENAME0(14)  = 'force2.out'
     FILENAME0(15)  = 'force3.out'
     FILENAME0(16)  = 'force1.restart.out'
     FILENAME0(17)  = 'force2.restart.out'
     FILENAME0(18)  = 'force3.restart.out'
     FILENAME0(19)  = 'history_ires.out'
     FILENAME0(20)  = 'history_ires.restart.out'
     FILENAME0(21)  = 'history_istep.out'
     FILENAME0(22)  = 'history_istep.restart.out'
     FILENAME0(23)  = 'comp_force.xyz.out'
     FILENAME0(24)  = 'comp_force.wind.out'
     FILENAME0(25)  = 'comp_force.xyz.restart.out'
     FILENAME0(26)  = 'comp_force.wind.restart.out'
     FILENAME0(27)  = 'ibl.stations.tec.proc.'
     FILENAME0(28)  = 'ibl.log.proc.'
     FILENAME0(29)  = 'massflobc.'
 
     FILENAME0(51)  = 'input.postnsu3d'
     FILENAME0(52)  = 'input.turb.postnsu3d'
     FILENAME0(53)  = 'endstat1'
     FILENAME0(54)  = 'endstat2'
 
--Actuator Disk Files (optional)
     FILENAME0(61)  = 'smemrd_nodes.nam'
     FILENAME0(62)  = 'smemrd_nodes.p3d'
     FILENAME0(63)  = 'smemrd_grid.p3d'
     FILENAME0(64)  = 'smemrd_q.p3d'
     FILENAME0(65)  = 'smemrd_force.p3d'
     FILENAME0(66)  = 'smemrd_data.nam'
     FILENAME0(67)  = 'smemrd_data_'
     FILENAME0(68)  = 'smemrd_flow.nam'
     FILENAME0(69)  = 'smemrd_flow_'
 
-------------------------------------------------------------------------------------------
set_lim_values.f
 
This routine sets the default values for all optional parameters. Because all optional parameters can be specified in the nsu3d input file, a description of these parameters is contained here.
Please refer to this description for each parameter.