Skip to content

Unsteady heat support #2388

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

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

Unsteady heat support #2388

wants to merge 5 commits into from

Conversation

marc-flex
Copy link
Contributor

Adding support for unsteady heat simulations.

@marc-flex marc-flex self-assigned this Apr 17, 2025
@marc-flex marc-flex force-pushed the marc/unsteady-heat branch from 8c094ee to cdd748a Compare April 17, 2025 07:52
@marc-flex marc-flex marked this pull request as ready for review April 17, 2025 15:35
Copy link
Contributor

@dbochkov-flexcompute dbochkov-flexcompute left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a couple of big picture comments:

  • Not sure about having output frequency as a parameter in UnsteadySpec. I think it could be more useful if sampling frequency can be defined for each monitor separately, similar to fdtd time monitors. Say, if I want to have just few snapshots in time for a big monitor, but then also record temperature for each step at a given point.

  • For initial condition, I imagine at some point we might need to extend it to non-uniform distribution. While I would say this is out of scope for this PR, I think it would be worth ironing out how that would look like. I see two options

    • initial_temperature: Union[pd.PositiveFloat, SpatialDataArray, UnstructuredGridDataset]
    • initial_temperature: Union[UniformDistibution, CustomDistribution]

    probably the first option is a way to go, unless I am missing something that would require introduction of new specs?

@marc-flex
Copy link
Contributor Author

Thanks @daniil for looking into this. As per usual these are great suggestions.

Not sure about having output frequency as a parameter in UnsteadySpec. I think it could be more useful if sampling frequency can be defined for each monitor separately, similar to fdtd time monitors. Say, if I want to have just few snapshots in time for a big monitor, but then also record temperature for each step at a given point.

I'll implement this as done in fdtd. I guess my only comment is that depending on the simulation the amount of data generated during the run could be quite big since we'd be saving every time-step and then post-process only the required steps. On the other hand, once the simulation is done and post-processed, all those temp files are removed, so it is only a temporary problem?

For initial condition, I imagine at some point we might need to extend it to non-uniform distribution. While I would say this is out of scope for this PR, I think it would be worth ironing out how that would look like. I see two options...

I like this. This may be related to this issue where we want to interpolate data to a mesh. I guess once I resolve that issue we can revisit this?

@marc-flex marc-flex force-pushed the marc/unsteady-heat branch 4 times, most recently from 3752f68 to c27caa6 Compare April 29, 2025 10:16
@marc-flex marc-flex force-pushed the marc/unsteady-heat branch from c27caa6 to 5879960 Compare May 12, 2025 14:37
Copy link
Collaborator

@momchil-flex momchil-flex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

The main thing that I think remains (and can't entirely be done now) is imposing some restrictions similar to what we have for fdtd sims. Maybe the only one we can really do now is just setting a limit on the maximum number of time steps in the simulation (and maybe some ball park limits on the time step). Basically users will inevitably create something that has way too many time steps for some reason, unless we limit it.

@marc-flex marc-flex force-pushed the marc/unsteady-heat branch from 11afa77 to 9b8f8ea Compare May 15, 2025 10:31
@marc-flex marc-flex force-pushed the marc/unsteady-heat branch from 9b8f8ea to 1982da4 Compare May 15, 2025 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants