residualControl_: residualControl. probes_: probes. additionalParams_: List of solution parameters. Use solutionParameter component to create solutionParams. Returns: solutionParams: A list of solution parameters. """ ghenv.Component.Name = "Butterfly_Solution Parameters" ghenv.Component.NickName = "solutionParams" ghenv.Component.Message = 'VER 0.0.04\nNOV_19_2017' ghenv.Component.Category = "Butterfly" ghenv.Component.SubCategory = "06::Solution" ghenv.Component.AdditionalHelpFromDocStrings = "1" try: from butterfly.solution import SolutionParameter except ImportError as e: msg = '\nFailed to import butterfly:' raise ImportError('{}\n{}'.format(msg, e)) if controlDict_: controlDict_ = SolutionParameter.from_cpp_dictionary( 'controlDict', str(controlDict_)) if probes_: probes_ = SolutionParameter.from_cpp_dictionary('probes', str(probes_)) params = [controlDict_, probes_] + additionalParams_ solutionParams = (p for p in params if p)
""" Solution Parameter. Args: _filename: OpenFOAM filename that the values are belong to (e.g. blockMeshDict, fvSchemes). _values: new values as a valid OpenFOAM (c++) dictionary. t_range_: Temperature range. replace_: Set to True if you want the original dictionary to be replaced by new values. Default is False which means the original dictionary will be only updated by new values. Returns: solution_par: A solution parameter. """ ghenv.Component.Name = "Butterfly_Solution Parameter" ghenv.Component.NickName = "solutionParam" ghenv.Component.Message = 'VER 0.0.05\nJAN_12_2019' ghenv.Component.Category = "Butterfly" ghenv.Component.SubCategory = "06::Solution" ghenv.Component.AdditionalHelpFromDocStrings = "2" try: from butterfly.solution import SolutionParameter except ImportError as e: msg = '\nFailed to import butterfly:' raise ImportError('{}\n{}'.format(msg, e)) if _filename and _values: solution_par = SolutionParameter.from_cpp_dictionary( _filename, _values, replace_, t_range_)