Skip to content

#255 Add particle velocity recording tutorial - #256

Open
zcemcyu wants to merge 1 commit into
ucl-bug:developfrom
zcemcyu:255-particle-velocity-tutorial
Open

zcemcyu wants to merge 1 commit into
ucl-bug:developfrom
zcemcyu:255-particle-velocity-tutorial

Conversation

@zcemcyu

@zcemcyu zcemcyu commented Sep 29, 2026

Copy link
Copy Markdown

Summary

  • Adds a new 2D initial-value-problem tutorial demonstrating how to record acoustic pressure and particle velocity using AcousticSensor.
  • Uses four point sensors arranged around a circular initial pressure source.
  • Demonstrates access to the x- and y-components of sensor.velocity.
  • Adds plots for recorded pressure, x-component particle velocity, and y-component particle velocity.
  • Adds the new tutorial to +kwave/+tutorials/+initialvalueproblems/Tutorials.m.

Testing

  • Tested locally in MATLAB R2026a.
  • Ran:
    run('kwave.tutorials.initialvalueproblems.t05_RecordingParticleVelocity2D.m')
  • Simulation completed successfully and generated the expected plots.
  • Verified:
    • size(sensor.pressure) = [4 321]
    • size(sensor.velocity) = [4 2 321]
    • size(sensor.times) = [1 321]
  • Ran pre-commit run -a; all hooks passed.

Related Issues

Contributor Agreement

  • By submitting this pull request, I confirm I have read the Legal and Licensing section in CONTRIBUTING.md, and I agree that my contributions may be redistributed under the k-Wave-II open-source license.

Peer Review

Review summary (complete before merge):

  • New (unit) test/s implemented
  • All (unit) test/s pass
  • New code is documented
  • Documentation builds and looks right
  • Examples/Tutorials added (if applicable)
  • Linting tests pass
  • Code review:
    • Implementation is sensible
    • Code meets coding standard
    • Issue description is complete

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tutorial for recording particle velocity in 2D

2 participants