Skip to content

Comments

New tutorial: Partitioned Burgers eq. 1D #670

Open
vidulejs wants to merge 35 commits intodevelopfrom
partitioned-burgers-1d
Open

New tutorial: Partitioned Burgers eq. 1D #670
vidulejs wants to merge 35 commits intodevelopfrom
partitioned-burgers-1d

Conversation

@vidulejs
Copy link
Collaborator

@vidulejs vidulejs commented Sep 29, 2025

New tutorial case: Partitioned Burgers' Equation in 1D solved with SciPy Finite Volume implementation and a Neural Network surrogate model !

  • Fix README.md to comply with the standard
  • How to run surrogate,
  • Improve README.md further
  • Clean up the scripts in base directory
  • What to do with the initial condition generation? Steps are too complex currently
  • How to reproduce the offline model, i.e., training scripts
  • Either remove old .solver-nutils-dgalerkin or fix
  • Read through again https://precice.org/community-contribute-to-precice.html
  • Allow skipping venv setup

Checklist:

  • I added a summary of any user-facing changes (compared to the last release) in the changelog-entries/<PRnumber>.md.
  • I will remember to squash-and-merge, providing a useful summary of the changes of this PR.

@vidulejs vidulejs requested a review from uekerman September 29, 2025 15:15
… in visualize_partitioned_domain.py. Wrap boundary conditions in new class BoundaryWrapper because they are dependent on the solver iterations. Implement implicit Euler (and Jacobian and residual for the root finding iteration. Initialize participants. Zero gradient condition on the outside boundaries.
@vidulejs vidulejs changed the title Partitioned Burgers eq. 1D New tutorial: Partitioned Burgers eq. 1D Oct 1, 2025
…-surrogate.sh, generate-training-data.sh. Fix floating point issue in t_index. Add --savefile argument to solver-scipy-fvolumes.py to save data for training.
…n scripts. Fix requirements.txt for scipy and surrogate solvers. Add example images for README
…ipt to check for initial conditions after installing environment.
@vidulejs vidulejs marked this pull request as ready for review October 15, 2025 13:04
Copy link
Member

@uekerman uekerman left a comment

Choose a reason for hiding this comment

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

Thanks for the very nice addition already! I only had brief look in this first iteration and did not yet try to run things. Please see comments below.

Let's indeed remove the Nutils solver. Could always be added later again.

Copy link
Member

@uekerman uekerman left a comment

Choose a reason for hiding this comment

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

I was able to run the cases and got meaningful results. We are probably close to merging this. Mainly cosmetics now.

I think a few scripts of utils could go into solver-scipy. Only keep those in utils that are used by neumann-surrogate as well.

## Visualization

After both participants (and/or monolithic simulation) have finished, you can run the visualization script.
`visualize_partitioned_domain.py` generates plots comparing the partitioned and monolithic solutions. You can specify which timestep to plot:
Copy link
Member

Choose a reason for hiding this comment

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

How can I compare partitioned and monolithic solutions? If I just run it after one setup, I only get that one setup.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. You have to run both the partitioned and monolithic cases first. The visualize script will draw the monolithic solution conditionally if it exists. For this reason I have the helper scripts to run everything with one command.

@vidulejs vidulejs requested review from MakisH and uekerman February 20, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants