1. Original Work
The interaction between a lightning flash and an aircraft in flight (Larsson, 2002) is a seminal work that presents models related to the aircraft lightning swept stroke.
The paper describes a model for the swept stroke and applications of the model for the zoning of aircraft.
We will replicate figure 18, which illustrates a numerical simulation of the model in a Blasius boundary layer.
This involves relatively complex math and physics, but remains a tractable and simple analytical problem with a clear, reproducible plot as the result.
2. Reproduction
- Used
GPT 5.6 Solto read the PDF and create a plan, followingtdd - Reviewed the plan and corrected the figure styling using
Haiku 4.6(Using Haiku was a bad idea) - Cleaned up the plan using
GPT 5.6 Terra - Implemented the plan (first pass) using
GPT 5.6 Terra - Reviewed results and noticed small discrepancy. Asked
Terrato review
- Provided
Terrawith more papers, having realized the original paper was missing information - Realized the information is not provided in any references. This is a gap in the literature, and the figure is not easily reproducible with the given information
- I developed an empirical estimate for the missing information and asked
Terrato implement it. This did not work either. Gave up and stuck with the first reproduction.
3. Evaluation
This assignment proved that agents can be a very powerful tool for reproducing work and implementing well-described physics models. They are also useful for identifying gaps in literature that would prevent reproduction. I spent a good amount of time checking that the agent was correct that there wasn't sufficient information to reproduce the figure.
The reproduced figure does mostly match the original figure, except for a small discrepancy that can be attributed to the papers' lack of a complete description of how the figure was produced.
I plan to spend more time experimenting with skills (especially tdd and grill-me-docs), and sandboxing. In particular, I should create new nono profiles that allow read access to uv and other tools that I want my agents to be able to use. I'd also like to explore backlog.md and other tools for managing sub-agents for my more complex project ambitions.
4. Prompts
All of the prompts I used to reproduce the result.
Session · 2026-09-23 · GPT 5.6 Sol
Read @Paper.pdf and then make a plan to implement code that will reproduce figure 18: numerical simulation of a swept stroke along a painted surface with flow velocity of 52 m/s and current 600 A using a Blasius boundary layer profile in two dimensions. The figure extents are from 0.0 to 3.0 m along the surface and the distance from the surface (Y-axis) is from 0.00 to 0.05 m. Plan the model physics and implementation but do not implement it yet. Use /skill:tdd and create a clear skeleton of the codebase. Keep it lightweight. Use the uv package manager and implement the simulation using Python. Plan to implement physical property based tests and provide examples in the skeleton, but don't fully implement the tests yet. Focus on nailing down a robust, elegant, and accurate plan for the simulations. After making the plan, review it for errors, inconsistencies, or inefficiencies and resolve them. Please modify the test plan so that it creates both a monochrome plot that looks like the original figure (the current plan) *and* a plot that follows the styling in the figure styling skill, /skill:figure-styling Session · 2026-09-23 · Haiku 4.6
Please read the /tdd test plan in this repository and tidy it up so that it's clearer, and the docs include clear instructions for next steps, through to completion. Keep it simple. Session · 2026-09-23 · GPT 5.6 Terra
Please check if you can call the uv package manager here. Session · 2026-09-23 · GPT 5.6 Terra
Please follow the TDD (test-driven development) plan that we have already created in this repository and implement the codebase. Start by designing the tests, then implement the code. Keep it elegant. Ask if you have questions. Stop when you have too many questions, or when the implementation is complete. If you complete it in one pass, provide me with the command I need to run to execute the code. You should have access to uv and the PyPI stuff now. Please run the tests (some of them are failing) and fix any issues. Report back when the codebase works, and you have executed it Great work. Can you make the plot aspect ratios closer to 1:1.5 (h:w)? The results look more jaggesd after the first reattachment, as if the blasius profile is not being enforced, or time steps are too large. Can you fix this please? Much better. Please make the plot line thickness for the monochrome case half as thick, and where the dotted lines overlap please just show one dotted line (they're overlapping to form a solid line, which is misleading) Session · 2026-09-23 · GPT 5.6 Terra
Failed attempt to fix the discrepancy. No changes from this conversation were kept.
The implementation in this codebase creates a figure that is very similar to Figure 18 in the paper we are trying to replicate, but there is a subtle difference in the curvature of the time snapshots near the wall. Our implementation is more sharply curved (so it sits slightly below the original paper's implementation just in the near wall region). Everything else lines up great, although this does seem to have a subtle impact on reattachment during the later time steps. Can you identify what the cause of this could be? If it's a parameter we don't know, that is ok, just let me know and tell me how I could manually explore changing that parameter. If it could be implementation-related, highlight potential discrepancies and list solutions, but do not implement anything Good thoughts. I provided reference [17] in @Paper_2.pdf. Please read it and make sure that we have included everything needed to replicate figure 7 of paper 2 (which is the same as figure 18 in paper 1). If paper 2 contains enough information to fill in our missing knowledge, use that and implement the fix. If it doesn't contain enough information, just report back to me with a brief summary of what we don't know. See if @Paper_3.pdf (the precursor to paper 2) has the missing information. I think it does, but again if this still doesn't answer everything we need to know to reproduce the plot, just report back. Otherwise, please implement the fix. Can you implement the anti-bending effect using standard/ estimated vales for k, n, and C_p (note, k is the inverse of curvature radius, which we can calculate from our simulation, n is the number density which is around 2.55x10^25 m^-3 in air, and C_p is around 1.005 kJ/kg.K in air) Let's see if those values give us something close to the figure and we'll go from there. Ok looks like that didn't change anything. Please delete the exploratory figure and never create figures in the tmp directory. Remove the anti bending function too. I reviewed the papers and think we should try re-implementing the anti-bending velocity, using this relationship instead (I calculated it myself, don't worry about where it came from, just implement it): Anti-bending velocity v_a = 0.9k (where k is the curvature = 1/ radius of curvature). Implement that. This is towards the centre of curvature (option 1). And whoops, the parameter should 0.09, not 0.9! Try implementing that - we shouldn't need to significantly change time stepping Can you try implementing it with a limiter to neglect the non-physical corners caused by the reattachment logic (since the real arc wouldn't behave like that), by only applying the curvature velocity where curvature is less than 2000 m^-1 (0.5mm radius of curvature). If the curvature is tighter than that, just set v_a to zero. See if that works Sorry, let's just remove that. It doesn't work. I think the original work is the closest we're going to get to the paper figure.