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

How to start the simulated lab model with a different ambient temperature #109

Open
billtubbs opened this issue Oct 26, 2019 · 5 comments
Open
Labels
enhancement New feature or request

Comments

@billtubbs
Copy link

I don't think there's an obvious way to set the ambient temperature for the TCLabModel (simulated version) so that the heater temperatures start at a temperature other than the default value (Ta = 21).

As far as I can tell, T1 and T2 are initialized in the __init__ method but there is no way to set Ta before this happens and no good way to change T1 and T2 after that (other than lab._T1 = ...).

Or am I missing something?

@billtubbs billtubbs changed the title How to reset the simulated lab model How to start the simulated lab model with a different ambient temperature Oct 26, 2019
@billtubbs
Copy link
Author

If this is true, I'm willing to help fix it.

@alchemyst
Copy link
Collaborator

Extending the model would be very useful, I think. In addition to the things you mention (changing ambient temperature and setting the temperatures), I can also think of changing the heat transfer coefficients to simulate blowing on the fins as a disturbance. Not having an easy disturbance is a major shortcoming of the model as it stands.

@jckantor How do you feel about extensions to the model?

@alchemyst alchemyst added the enhancement New feature or request label Oct 27, 2019
@billtubbs
Copy link
Author

billtubbs commented Oct 28, 2019

I agree there are a few improvements possible.

Quick fix to my immediate problem:

  1. Make Ta an argument of __init__ so user can specify ambient temperature. This would mean the template of TCLabModel is no longer identical to the real lab but at least it's fully substitutable.

Other easy enhancements:
2. Make Ta and possibly other parameters/constants into class properties so they can be varied during an experiment to simulate disturbances.

I would do these first.

I also thought this might be useful sometimes:
3. Add a reset() method which resets the model instance to it's startup conditions (i.e. T1 = T2 = Ta) - (although this makes the simulation model less realistic!)

This 3rd one might take some more thinking about...

Let me know, I could have a go at these tomorrow and submit a pull request if you like.

@alchemyst
Copy link
Collaborator

Exposing the parameters makes sense to me. Could you elaborate on why you would want a reset() method rather than simply creating a new object?

@billtubbs
Copy link
Author

True, you can always instantiate a new object. If I can set the ambient temperature every time I create a new one that would be fine. The scenario where a reset becomes more convenient is if you have adjusted a few parameters to certain non-default settings and want to repeat the experiment from the initial condition (T1 = T2 = Ta).

It's not a big deal though.

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

2 participants