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

Newton's Law of cooling #533

Merged
merged 8 commits into from
Jun 7, 2024
Merged

Newton's Law of cooling #533

merged 8 commits into from
Jun 7, 2024

Conversation

rimjhimittal
Copy link
Contributor

@rimjhimittal rimjhimittal commented May 30, 2024

This PR contains python file, notebook, plot, graph, json, yaml and changes in test file and Readme demonstrating Newton's Law of Cooling with MDF

@pgleeson
Copy link
Member

Thanks @rimjhimittal. Can you add the example to https://github.com/ModECI/MDF/blob/main/examples/MDF/README.mdwith a short description and saying it demonstrates the use of time_derivative?

@rimjhimittal
Copy link
Contributor Author

Hi @pgleeson , I have made the required changes, Please check.

@pgleeson
Copy link
Member

pgleeson commented Jun 4, 2024

Thanks @rimjhimittal, looks good. Just for consistency though, could you move the notebook to the examples dir, and the png images to the images dir. See https://github.com/ModECI/MDF/blob/main/test_all.sh#L49.

Also, for the final committed notebook, think about a reader who wants to see all the steps as clearly and quickly as possible. Most of the notebook is a printout of the output of the simulation at every timestep. Useful for debugging, but slightly inconvenient when you have to scroll through it all. Maybe put an optional if verbose==True: ... in there so this can be switched on/off when required, but the default setting produces a nice compact resource to read.

@rimjhimittal
Copy link
Contributor Author

Hi,
if i change the code to if verbose: print... for optionally hiding output of simulation, i would still get the following in the output which is declared in execution_engine.py-

Init graph: cooling_process
Evaluating graph: cooling_process, root nodes: ['cool_node'], with array format numpy
Evaluating graph: cooling_process, root nodes: ['cool_node'], with array format numpy
Evaluating graph: cooling_process, root nodes: ['cool_node'], with array format numpy
Evaluating graph: cooling_process, root nodes: ['cool_node'], with array format numpy
Evaluating graph: cooling_process, root nodes: ['cool_node'], with array format numpy......

Should i do something to hide this too?

@rimjhimittal
Copy link
Contributor Author

made the required changes

@pgleeson
Copy link
Member

pgleeson commented Jun 7, 2024

Looks good, thanks @rimjhimittal

@pgleeson pgleeson merged commit 7819333 into ModECI:development Jun 7, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants