Hi Dr. Cox and Dr. Treeby,
I am trying to use the kspaceFirstOrder3D function to simulate wave propagation in media with varying sound speed and with a time varying pressure source term s(r,t) and zero initial conditions. So I wonder using kspaceFirstOrder3D is equivalent to solve which of the following 2nd order wave equations:
1. (∂^2/∂t^2 - c(r)^2∇^2)p(r,t) = s(r,t) subjects to p(r,0)=0, ∂p/∂t|t=0 = 0;
2. (∇^2 - 1/c(r)^2∂^2/∂t^2)p(r,t) = -s(r,t) subjects to p(r,0)=0, ∂p/∂t|t=0 = 0;
Also, are the following settings for the input structure source correct for my case?
source.p0=0;
source.p=s;
source.p_mask=s_mask;
source.p_mode='additive';
Thanks a lot for your time and Happy New Year!
Best,
Chao