cape.pylava.yamlfile: Custom class for LAVA input YAML files¶
This module provides the class RunYAMLFile that interacts with
the YAML (Yet Another Markup Language) files used to control settings
for the various LAVA solvers.
- class cape.pylava.yamlfile.RunYAMLFile(*args, **kw)¶
Custon YAML file control class
- Call:
>>> obj = RunYAMLFile(fname=None)
- Inputs:
- fname: {
None} |str Name of file to read
- fname: {
- Outputs:
- obj:
RunYAMLFile YAML file interface instance
- obj:
- Versions:
2024-10-10
@ddalle: v1.0
- get_alpha() float¶
Get the angle of attack
- Call:
>>> alpha = opts.get_alpha()
- Inputs:
- opts:
RunYAMLFile LAVA YAML file interface
- opts:
- Outputs:
- alpha:
float Angle of attack [deg]
- alpha:
- Versions:
2024-10-10
@ddalle: v1.0
- get_beta() float¶
Get the sideslip angle
- Call:
>>> beta = opts.get_beta()
- Inputs:
- opts:
RunYAMLFile LAVA YAML file interface
- opts:
- Outputs:
- beta:
float Sideslip angle [deg]
- beta:
- Versions:
2024-10-10
@ddalle: v1.0
- get_gamma() float¶
Get the ratio of specific heats (gamma)
- Call:
>>> gam = opts.get_gamma()
- Inputs:
- opts:
RunYAMLFile LAVA YAML file interface
- opts:
- Outputs:
- gam:
float Ratio of specific heats
- gam:
- Versions:
2024-10-10
@ddalle: v1.0
- get_lava_subopt(sec: str, opt: str) Any¶
Get option from a LAVA subsection
- Call:
>>> v = opts.get_lava_subopt(sec, opt)
- Inputs:
- opts:
RunYAMLFile LAVA YAML file interface
- sec:
str Name of section
- opt:
str Name of option within section
- opts:
- Outputs:
- v:
object Value of the option
- v:
- Versions:
2024-10-10
@ddalle: v1.0
- get_pressure() float¶
Get the freestream/farfield pressure [Pa]
- Call:
>>> p = opts.get_pressure()
- Inputs:
- opts:
RunYAMLFile LAVA YAML file interface
- opts:
- Outputs:
- p:
float Static pressure [Pa]
- p:
- Versions:
2024-10-10
@ddalle: v1.0
- get_refcond(opt: str) Any¶
Get option from
"referenceconditions"section- Call:
>>> v = opts.get_lava_subopt(sec, opt)
- Inputs:
- opts:
RunYAMLFile LAVA YAML file interface
- opt:
str Name of option within section
- opts:
- Outputs:
- v:
object Value of the option
- v:
- Versions:
2024-10-10
@ddalle: v1.0
- get_temperature() float¶
Get the freestream/farfield temperature [K]
- Call:
>>> tinf = opts.get_temperature()
- Inputs:
- opts:
RunYAMLFile LAVA YAML file interface
- opts:
- Outputs:
- tinf:
float Static temperature [K]
- tinf:
- Versions:
2024-10-10
@ddalle: v1.0
- get_umag() float¶
get the velocity magnitude [m/s]
- Call:
>>> u = opts.get_umag()
- Inputs:
- opts:
RunYAMLFile LAVA YAML file interface
- opts:
- Outputs:
- u:
float Velocity magnitude
- u:
- Versions:
2024-10-10
@ddalle: v1.0
- make_section(sec: str) OptionsDict¶
Get or create a subsection as on
OptionsDict- Call:
>>> d = opts.make_section(sec)
- Inputs:
- opts:
RunYAMLFile LAVA YAML file interface
- sec:
str Name of section
- opts:
- Outputs:
- d:
OptionsDict Contents of that section; added to opts
- d:
- Versions:
2024-10-10
@ddalle: v1.0
- set_alpha(alpha: float)¶
Set the angle of attack
- Call:
>>> opts.set_alpha(alpha)
- Inputs:
- opts:
RunYAMLFile LAVA YAML file interface
- alpha:
float Angle of attack [deg]
- opts:
- Versions:
2024-10-10
@ddalle: v1.0
- set_beta(beta: float)¶
Set the sideslip angle
- Call:
>>> opts.set_beta(beta)
- Inputs:
- opts:
RunYAMLFile LAVA YAML file interface
- beta:
float Sideslip angle [deg]
- opts:
- Versions:
2024-10-10
@ddalle: v1.0
- set_gamma(gam: float)¶
Set the ratio of specific heats (gamma)
- Call:
>>> opts.get_gam(gam)
- Inputs:
- opts:
RunYAMLFile LAVA YAML file interface
- gam:
float Ratio of specific heats
- opts:
- Versions:
2024-10-10
@ddalle: v1.0
- set_lava_subopt(sec: str, opt: str, v: Any)¶
Set option in a LAVA subsection
- Call:
>>> opts.set_lava_subopt(sec, opt, v)
- Inputs:
- opts:
RunYAMLFile LAVA YAML file interface
- sec:
str Name of section
- opt:
str Name of option within section
- v:
object Value of the option
- opts:
- Versions:
2024-10-10
@ddalle: v1.0
- set_pressure(p: float)¶
Set the freestream/farfield pressure [Pa]
- Call:
>>> opts.set_pressure(p)
- Inputs:
- opts:
RunYAMLFile LAVA YAML file interface
- p:
float Static pressure [Pa]
- opts:
- Versions:
2024-10-10
@ddalle: v1.0
- set_refcond(opt: str, v: Any)¶
Set option in
"referenceconditions"section- Call:
>>> v = opts.get_lava_subopt(sec, opt)
- Inputs:
- opts:
RunYAMLFile LAVA YAML file interface
- opt:
str Name of option within section
- opts:
- Outputs:
- v:
object Value of the option
- v:
- Versions:
2024-10-10
@ddalle: v1.0
- set_temperature(tinf: float)¶
Get the freestream/farfield temperature [K]
- Call:
>>> opts.set_temperature(tinf)
- Inputs:
- opts:
RunYAMLFile LAVA YAML file interface
- tinf:
float Static temperature [K]
- opts:
- Versions:
2024-10-10
@ddalle: v1.0
- set_umag(u: float)¶
Set the velocity magnitude [m/s]
- Call:
>>> opts.set_umag(u)
- Inputs:
- opts:
RunYAMLFile LAVA YAML file interface
- u:
float Velocity magnitude
- opts:
- Versions:
2024-10-10
@ddalle: v1.0