New tutorial: Partitioned Burgers eq. 1D #670
Conversation
… 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.
…-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.
uekerman
left a comment
There was a problem hiding this comment.
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.
…arate from images directory.
… versions in requirements. Remove commented out code from solvers.
uekerman
left a comment
There was a problem hiding this comment.
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.
…he other data exchange?
…tion to Post-processing. Remove unused initial-condition.png
MakisH
left a comment
There was a problem hiding this comment.
Some first comments on the structure/scripts - I will continue later.
After relaxing the requirements.txt, I could install and run all participant options and the post-processing scripts.
There was a problem hiding this comment.
These files could be named/described in the README.md, as well as how they are generated. I think this is half-way there already.
| `visualize_partitioned_domain.py` generates plots comparing the partitioned and monolithic solutions. You can specify which timestep to plot. Call from the root of the tutorial: | ||
|
|
||
| ```bash | ||
| python3 utils/visualize_partitioned_domain.py --neumann neumann-surrogate/surrogate.npz [timestep] |
There was a problem hiding this comment.
An example would be useful here, I am not sure if I should add an integer here and what good values would be.
Similarly in other places.
|
@vidulejs it would be great to be able to include this in the upcoming distribution release. With a quick look, I think that most/all of the open points here are rather easy to resolve. Let me know if I can help; I could also resolve some of these (but not all) directly. |
|
@vidulejs I applied as much of the feedback as I could. Only a few comments are still missing:
It would be great if you could quickly add these comments, so that we can finally get this one merged and published. |
New tutorial case: Partitioned Burgers' Equation in 1D solved with SciPy Finite Volume implementation and a Neural Network surrogate model !
Checklist:
changelog-entries/<PRnumber>.md.