cape.pyfun.options.fun3dnmlopts
: FUN3D namelist options¶
This module provides a class to interpret JSON options that are
converted to Fortran namelist format for FUN3D. The module provides a
class, Fun3DNmlOpts
, which interprets the settings of the
"Fun3D"
section of the master JSON file. These settings are then
applied to the main FUN3D input file, the fun3d.nml
namelist.
An example JSON setting is shown below.
"Fun3D": { "nonlinear_solver_parameters": { "schedule_cfl": [[1.0, 5.0], [5.0, 20.0], [20.0, 20.0]], "time_accuracy": ["steady", "steady", "2ndorder"], "time_step_nondim": 2.0, "subiterations": 5 }, "boundary_output_variables": { "boundary_list": "7-52", "turres1": true, "p_tavg": [false, false, true] } }
This will cause the following settings to be applied to fun3d.00.nml
.
&nonlinear_solver_parameters schedule_cfl = 1.0 5.0 time_accuracy = 'steady' time_step_nondim = 2.0 subiterations = 5 / &boundary_output_variables boundary_list = '7-52' turres1 = .true. p_tavg = .false. /
The edits to fun3d.02.nml
are from the third entries of each list:
&nonlinear_solver_parameters schedule_cfl = 20.0 20.0 time_accuracy = '2ndorder' time_step_nondim = 2.0 subiterations = 5 / &boundary_output_variables boundary_list = '7-52' turres1 = .true. p_tavg = .true. /
Each setting and section in the "Fun3D"
section may be either
present in the template namelist or missing. It will be either edited or
added as appropriate, even if the specified section does not exist.
- See also:
- class cape.pyfun.options.fun3dnmlopts.DualFun3DNmlOpts(*args, **kw)¶
Dictionary-based interface for FUN3D namelists
- select_dual_namelist(j=0, **kw)¶
Sample “dual” namelist at particular conditions
- class cape.pyfun.options.fun3dnmlopts.Fun3DNmlOpts(*args, **kw)¶
Dictionary-based interface for FUN3D namelists
- get_grid_format(j=None, **kw)¶
Return the grid format
- get_namelist_var(sec, key, j=None, **kw)¶
Select a namelist key from a specified section
Roughly, this returns
opts[sec][key]
.
- get_project()¶
Return the
project
namelist- Call:
>>> d = opts.get_project(i=None)
- Inputs:
- opts:
Options
Options interface
- opts:
- Outputs:
- d:
pyFun.options.odict
Project namelist
- d:
- Versions:
2015-10-18
@ddalle
: v1.02023-05-13
@ddalle
: v2.0; useOptionsDict
- get_project_rootname(j=None, **kw)¶
Return the project root name
- get_raw_grid()¶
Return the
raw_grid
namelist- Call:
>>> d = opts.get_raw_grid(i=None)
- Inputs:
- opts:
Options
Options interface
- opts:
- Outputs:
- d:
pyFun.options.odict
Grid namelist
- d:
- Versions:
2015-10-18
@ddalle
: v1.02023-05-13
@ddalle
: v2.0; useOptionsDict
- select_namelist(j=0, **kw)¶
Sample namelist at particular conditions
- set_namelist_var(sec, key, val, j=None)¶
Set a namelist key for a specified phase or phases
Roughly, this sets
opts["Fun3D"][sec][key]
oropts["Fun3D"][sec][key][i]
equal to val