cape.pyfun.options.Config: pyFun configurations options

This module provides options for defining some aspects of the surface configuration for a FUN3D run. It can point to a surface configuration file such as Config.xml or Config.json that reads an instance of cape.config.Config or cape.config.ConfigJSON, respectively. This surface configuration file is useful for grouping individual components into families using a format very similar to how they are defined for Cart3D.

The "Config" section also defines which components are requested by FUN3D for iterative force & moment history reporting. For the moment histories, this section also specifies the moment reference points (moment center in FUN3D nomenclature) for each component.

This is the section in which the user specifies which components to track forces and/or moments on, and in addition it defines a moment reference point for each component.

The reference area ("RefArea") and reference length ("RefLength") parameters are also defined in this section. FUN3D does have two separate reference lengths, so there is also a "RefSpan" parameter.

Many parameters are inherited from the cape.config.Config class, so readers are referred to that module for defining points by name along with several other methods.

Like other solvers, the "Config" section is also used to define the coordinates of named points. These can be specified as point sensors to be reported on directly by FUN3D and/or define named points for other sections of the JSON file.

See Also:
class cape.pyfun.options.Config.Config(fname=None, **kw)

Configuration options for Fun3D

Call:
>>> opts = Config(**kw)
Versions:
  • 2015-10-20 @ddalle: First version

get_BoundaryPointGroups()

Get list of "boundary_point" geometries

If Config>BoundaryPointGroups does not exist, this reads the Config>BoundaryPoints option and sorts the keys alphabetically.

Call:
>>> BP = opts.get_BoundaryPointGroups()
Inputs:
opts: pyFun.options.Options

Options interface

Outputs:
BP: list[str]

List of boundary point groups

Versions:
  • 2017-09-01 @ddalle: First version

get_BoundaryPoints(name=None)

Get points for boundary_point sampling geometry name

This corresponds to the namelist parameter

  • sampling_parameters>type_of_geometry(k) = “boundary_points”

It snaps point sensors to the surface. It requires the namelist parameters number_of_points and points and is modified by snap_output_xyz and dist_tolerance

Call:
>>> PS = opts.get_BoundaryPoints(name=None)
Inputs:
opts: pyFun.options.Options

Options interface

name: {None} | str

Name of boundary point group (geometry) to process

Outputs:
PS: list (list) | dict

List of points in boundary point group

Versions:
  • 2017-09-01 @ddalle: First version

get_ConfigInput(comp)

Return the input for a particular component

Call:
>>> inp = opts.get_ConfigInput(comp)
Inputs:
opts: pyFun.options.Options

Options interface

Outputs:
inp: str | list[int]

List of BCs in this component

Versions:
  • 2015-10-20 @ddalle: First version

get_KeepTemplateComponents()

Get the option to extend fun3d.nml component list

(instead of replacing it)

Call:
>>> qkeep = opts.get_KeepTemplateComponents()
Inputs:
opts: pyFun.options.Options

Options interface

Outputs:
qkeep: True | False

Whether to keep template components

Versions:
  • 2023-11-08 @ddalle: v1.0

get_KineticDataFile(j=None)

Get the kinetic_data file, if any

Call:
>>> fname = opts.get_KineticDataFile(j=None)
Inputs:
opts: pyFun.options.Options

Options interface

j: {None} | int

Phase number

Outputs:
fname: str

Name of file template

Versions:
  • 2018-04-12 @ddalle: First version

get_MovingBodyInputFile(j=None)

Get the moving_body.input file name

Call:
>>> fname = opts.get_MovingBodyInputFile(j=None)
Inputs:
opts: pyFun.options.Options

Options interface

j: {None} | int

Phase number

Outputs:
fname: str

Name of file template

Versions:
  • 2018-10-22 @ddalle: First version

get_RubberDataFile(j=None)

Get the rubber.data file name

Call:
>>> fname = opts.get_RubberFile(j=None)
Inputs:
opts: pyFun.options.Options

Options interface

j: {None} | int

Phase number

Outputs:
fname: str

Name of file template

Versions:
  • 2016-04-27 @ddalle: First version

  • 2018-04-11 @ddalle: Moved to Config section

get_SpeciesThermoDataFile(j=None)

Get the species_thermo_data file, if any

Call:
>>> fname = opts.get_SpeciesThermoDataFile(j=None)
Inputs:
opts: pyFun.options.Options

Options interface

j: {None} | int

Phase number

Outputs:
fname: str

Name of file template

Versions:
  • 2018-04-12 @ddalle: First version

get_TDataFile(j=None)

Get the tdata file name

Call:
>>> fname = opts.get_TDataFile(j=None)
Inputs:
opts: pyFun.options.Options

Options interface

j: {None} | int

Phase number

Outputs:
fname: str

Name of file template

Versions:
  • 2018-04-11 @ddalle: First version

set_BoundaryPointGroups(BP=[])

Set list of "boundary_point" geometries

Call:
>>> pts.set_BoundaryPointGroups(BP=[])
Inputs:
opts: pyFun.options.Options

Options interface

BP: {[]} | list[str]

List of boundary point groups

Versions:
  • 2017-09-01 @ddalle: First version

set_BoundaryPoints(PS, name=None)

Set points for boundary_point sampling geometry name

Call:
>>> opts.set_BoundaryPoints(PS, name=None)
Inputs:
opts: pyFun.options.Options

Options interface

PS: list (list) | dict

List of points in boundary point group

name: {None} | str

Name of boundary point group (geometry) to process

Versions:
  • 2017-09-01 @ddalle: First version

set_ConfigInput(comp, inp)

Set the input for a particular component

Call:
>>> opts.set_ConfigInput(comp, nip)
Inputs:
opts: pyFun.options.Options

Options interface

inp: str | list[int]

List of BCs in this component

Versions:
  • 2015-10-20 @ddalle: First version

set_KeepTemplateComponents()

Set the option to extend fun3d.nml component list

(instead of replacing it)

Call:
>>> opts.get_KeepTemplateComponents(qkeep)
Inputs:
opts: pyFun.options.Options

Options interface

qkeep: True | False

Whether to keep template components

Versions:
  • 2023-11-08 @ddalle: v1.0