-
Notifications
You must be signed in to change notification settings - Fork 5
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
Better interface for thermal models #57
Comments
I like to use these kind of "config classes" which allow me to easy get/set the options on the fly during the run (there is a use example at the bottom of the file). Else, happy to check out your solution for this. :) |
Oh interesting, I haven't heard of config classes before... Is this pattern documented somewhere? Sure, it would be cool to be able to register the elements in the T array. Do you mean the (x, y, z) coordinates of each grid point for all the skin layers? I added a new class with the start of this idea. See Let me know what you think of this interface. |
I got it from some
Yes, precisely. In the example I posted above, for example, I store all E(t,x,y,z) and T(z,t,x,y,z) to the same array (until you have a memory issue, that is), whose elements can then be compared, plotted, or easily dumped to a GTiff. |
I get this error message when using your latest commit with
|
This seems like a great feature to have for people actually doing work, but doesn't seem necessary to prove out the method in Paper #1. Please feel free to add this if you like, but I am going to focus on completing the paper for the time being... Hard to stay focused otherwise!
Ugh, sorry. Yes, that's probably the problem. The "pickle" format is not a good long-term solution if the code is going to change. If the interfaces of the functions change, things can go off the rails. Apologies for any inconvenience caused. The solution to this is to put together some kind of persistent file format for the compressed form factor matrix. Thankfully, the "real" contents of a compressed form factor matrix are not likely to change even if the API changes (it's just a tree of matrices + some associated data), so this shouldn't be too hard to do. I'll figure this out now. |
See #58. |
Ok, I'll maybe set up a smaller FF this time, if I want to actually get something done! ^^ And both problems are probably not relevant for the paper, as you say: good to keep them noted somewhere, but no hurry. |
Yeah actually I think you're right. This is an ambitious task for right now. |
Nice, but It's not very "backward-compatible" ... this change broke all of my scripts calling the
to avoid getting
? |
So, for your example, you would first set up appropriately sized arrays with constant values, then call: Q0 = Qabs0.astype(np.float64)
model = PccThermalModel1D(z, T0, ti, rhoc, emiss, Fgeotherm, Q0, Tsurfprev) # bcond='Q' by default If you look at lines 108 through 156, you can see the assumptions about the array sizes for now. But I will write this up as a docstring for Of course it would be helpful to have a way to construct |
Ah ok, then I'll convert everything to arrays ... it was a bit late to realize that yesterday. :) |
Oops, I forgot I actually did make |
Yes, I actually copied those lines to my script and adapted them a bit, to make it work. I still got stuck somewhere when simply using your updated interface, I can check where and see if it's an easy fix. |
Feel free to send errors here and I will help debug |
I think we are all using your new class w/o trouble now. I'm closing this, but feel free to reopen if still needed. |
@steo85it @nschorgh
I think we should try to improve the interface to the time-dependent thermal models a bit.
We have a few different ideas at this point for how to do the time-dependent simulation (basically Norbert's "just do one MVP" approach vs solving the full radiosity system twice at each step). I think it's worth doing a direct comparison of these. But I'm getting lost in the details of how to set them up.
I would like to be able to write something like:
The variable
thermal_model
should then be a Python iterator or generator. That is, we should be able to do things like:I'm going to put together a rough draft of this hopefully today or tomorrow and then it would be helpful to get you guys' feedback.
The text was updated successfully, but these errors were encountered: