-
Notifications
You must be signed in to change notification settings - Fork 42
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
Enabling electrostatic simulations #1561
Conversation
Personally I am leaning towards the second path. But we can iron that out offline. |
Didn't have an idea in mind and doing it on the webapi seemed easy. I can try doing it on the backend. This possibly makes more sense since I'm going to refactor everything.
I think I prefer this option too. I will start form here and tailor the rest towards this. This will also avoid code duplication, I wasn't really happy with the version I had but I wanted a starting point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! I think it's getting close. Some general comments:
- this is not currently allowed, but for when we have coupled current/heat simulation, what do you think about plotting boundary conditions for different equations? because those can be defined on the same boundaries. Maybe just display either only heat or only electrical bc depending on plot arguments?
- All new classes/components and different ways of using them will need to be covered by tests
36c485c
to
9935efe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @marc-flex, this is a really huge PR and I really appreciate all of the hard work you put into it.
I think the biggest question is whether we want to name this stuff Device simulation. I made a comment maybe we can discuss in a thread.
At a high level, if we can simplify any of the internals by using properties or defining things in the class datastructures, that will help us in the long run to cut down on the code complexity. I made comments where I noticed things.
Overall it looks quite good, thanks again!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a few more comments after the big renaming
boundaries = self._construct_heat_charge_boundaries( | ||
structures=structures, | ||
plane=plane, | ||
boundary_spec=self.boundary_spec, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will this plot heat and condution bc at the same time? That's probably will not be very useful as they will overlap with each other generally. Probably we should add a parameter in plot_boundaries
which tells whether to plot heat or charge bcs, so that when plot_property
is called, only corresponding bcs are plotted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking of changing all the features plot based on property
so that if property="heat_conductivity"
, sources, bcs and monitors will be plotted for the HEAT setup, whereas it property="electric_conductivity"
then all features will be CONDUCTION.
"Electric BC were specified but not all " | ||
"structures have a '.medium' with `.electric_spec` present" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we checking here for all structures to have electric_spec
or just at least one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it checks that at least one has electric_spec
@@ -128,22 +128,27 @@ def plot_field( | |||
""" | |||
|
|||
monitor_data = self[monitor_name] | |||
property_to_plot = None | |||
|
|||
if isinstance(monitor_data, TemperatureData): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really interesting! I guess in the future we'll be able to also plot any specific overlapped relationships between the monitors too at the field level, although maybe this would be user-specific rather than provided possibly
Coupling between these simulations is currently limited to 1-way coupling between | ||
heat and conduction simulations. Coupling is specified by defining a heat source of | ||
type 'HeatFromElectricSource'. With this coupling, joule heating is calculated as part | ||
of the solution to a CONDUCTION simulation and then read in to the HEAT simulation. | ||
When using coupling we anticipate two scenarios: | ||
1. one in which BCs and sources are specified for both HEAT and CONDUCTION simulations. | ||
In this case one mesh will be generated and used for both the CONDUCTION and HEAT | ||
simulations. | ||
2. only heat BCs/sources are provided. In this case, only the HEAT equation will be solved. | ||
Before the simulation starts, it will try to load the heat source from file so a | ||
previously run CONDUCTION simulations must have run previously. Since the CONDUCTION |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just future improvement ideas: maybe we can make a little diagram to just illustrate this for people scrolling through the docs. Happy to help when I get some time as I've got the lucidchart available, or can share too!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that idea! I'll try to prepare something, thought maybe for another PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks for such an incredible effort! Only API docs implementations are missing in the PR I believe.
Lots to think about of what this this will enable! It'd be interesting to do a demo of a standard basic CMOS electronic device (eg. MOScapacitor, etc) for that crowd too to some level - especially for parametric design.
@daquinteroflex If you have an example/paper I'll be happy to work on a notebook! |
9434c89
to
cf6abb8
Compare
389259f
to
c20557c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure to update the CHANGELOG.md as well! including all of the relevant changes that a user might need to know. Thanks!
1f91455
to
91381b5
Compare
Hey @marc-flex when this looks all ready to merge, let me know and I will merge into pre/2.8! or you can do it if you have access. |
Added test for HeatChargeSimulation Added functionality to compute heat source from conduction simulation
91381b5
to
5310696
Compare
No description provided.