Skip to content

The 0D Solver svZeroDCalibrator section #37

@ktbolt

Description

@ktbolt

Use Case

The 0D Solver svZeroDCalibrator section is a bit unclear about how to use the Python interface to svzerodcalibrator

Screenshot 2024-11-22 at 1 26 47 PM

Problem

A new user may have difficulty understanding what the my_unoptimized_config variable actually represents in the In Python example

my_unoptimized_config = {...}
my_optimized_config = pysvzerod.calibrate(my_unoptimized_config)

Actually running this produces

>>> import pysvzerod
>>> my_unoptimized_config = {...}
>>> my_optimized_config = pysvzerod.calibrate(my_unoptimized_config)
Traceback (most recent call last):
  File "<python-input-2>", line 1, in <module>
    my_optimized_config = pysvzerod.calibrate(my_unoptimized_config)
TypeError: calibrate(): incompatible function arguments. The following argument types are supported:
    1. (arg0: dict) -> json

Solution

The svZeroDCalibrator section needs to be improved. The initial discussion lacks very little useful detail.

The section should be reorganized, first discussing what the data to the svZeroDCalibrator is and its format.

A Python example can then be shown using an input variable with meaningful values for the configuration or show how to read a configuration file from the test cases

import pysvzerod
import json

with open("steadyFlow_calibration.json") as config_file:
     config = json.load(config_file)

optimized_config = pysvzerod.calibrate(config)

And also

  1. There is also no discussion about what the output of pysvzerod.calibrate() is
  2. There is no discussion about how to use the C++ interface

Alternatives considered

none

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct and Contributing Guidelines

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions