Hi Andrea,
A couple of things to keep in mind.
(1) As k-Wave is a time domain solver, to simulate the pressure field at a single frequency, you need to run the simulation for some time, e.g., to allow the waves from all parts of the transducer to propagate to all parts of the domain.
(2) If you record p_max_all
for the complete simulation, you will be taking the maximum pressure not just in steady state, but also over the transient parts while the steady state fields builds up.
Some things you can try:
- Increase the simulation time
- Set sensor.record_start_index
to only take p_max_all
when the field has reached steady state
- Record sensor.p
over an integer number of cycles in steady state, and then extract the amplitude using extractAmpPhase
, e.g., as in the Heating By A Focused Ultrasound Transducer. This is the best option if you want the field precisely, although using p_max_all
will give a similar result provided you set sensor.record_start_index
and have a small enough time step such that the wave is well sampled.
Brad.