Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The 0D Solver svZeroDCalibrator section #37

Open
1 task done
ktbolt opened this issue Nov 22, 2024 · 0 comments
Open
1 task done

The 0D Solver svZeroDCalibrator section #37

ktbolt opened this issue Nov 22, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@ktbolt
Copy link
Contributor

ktbolt commented Nov 22, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant