Repository navigation
docs/tutorials: four beginner tutorials updated to run as notebooks (#944) - #1293
Merged
Merged
Conversation
…944) - 8-Timestepping-coupled: estimate_dt() returns a float; no .squeeze(). - 9-Unsteady_Flow: the output folder is made before the loop writes to it. - 10-Particle_Swarms: the mesh is moved by mesh.deform on a copy of its coordinates (it wrote into mesh.X.coords and called _deform_mesh, which the library refuses on a mesh with variables). - 12-Units_System: the initial temperature is 300 K + 2.6 K/m * y as quantities (in metres, its sum was refused as a temperature), and the velocity is set by component with quantities. It then stops at non_dimensionalise(temperature / velocity[0]), which the library does not take yet (UNFILED 41, the units desk). Underworld development team with AI support from Claude Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The beginner tutorials, part of #944, executed as notebooks on development the way a reader runs them (
jupyter nbconvert --execute, 300 s per cell, macOS 12-core Apple M4, serial).Outcome on development (1e10c63)
11 of 18 pass: 1, 2, 4, 5, 6, 7, 13, 14, 16, 17 and Notebook_Index. The 7 that fail:
estimate_dt().squeeze(): it returns a floatExample_output/, which does not existmesh.X.coordsand calls_deform_mesh, refused on a mesh with variablesmesh.deformon a copy), passes300 + 2.6 * yin metres, assigned to a temperature; a plain velocity assigned to a field with unitsnon_dimensionalise(temperature / velocity[0]), a library gap (UNFILED 41, units desk)s.diff(x) + s.diff(y):UnitAwareDerivativeMatrixhas no arithmeticnon_dimensionaliserefuses auw.expressionholding a quantityuw.pause(...), which stops automated execution by designThe edits
They are made in the notebooks' JSON source lines only: 9 lines added and 7 removed, with no output cells, metadata or formatting touched.
Tolerances and coordinate matches
None.
Tests
Notebooks 8, 9 and 10 executed after the change: all pass. Notebook 12 executed: it passes the two fixed cells and stops at the library gap above. The five cheapest passing tutorials join the docs examples gate (#944 part C) in a follow-up.
Underworld development team with AI support from Claude Code