Difference between revisions of "V2fplanck.m"

From Spinach Documentation Wiki
Jump to: navigation, search
m (Spot-edit Spinach function page first-line NOTOC and template fields)
m (Rename Arguments section heading to Parameters)
Line 9: Line 9:
 
See IK's review of the subject (http://dx.doi.org/10.1016/j.jmr.2016.07.005) for a detailed description of how the Fokker-Planck spatial dynamics generator is built. This function builds the M matrix in Equation 7.  
 
See IK's review of the subject (http://dx.doi.org/10.1016/j.jmr.2016.07.005) for a detailed description of how the Fokker-Planck spatial dynamics generator is built. This function builds the M matrix in Equation 7.  
  
==Arguments==
+
==Parameters==
  
 
   parameters.u      - X components of the velocity vectors
 
   parameters.u      - X components of the velocity vectors

Revision as of 18:53, 5 June 2026

Translates a stationary 3D velocity field and a diffusion tensor field into a Fokker-Planck evolution generator.

Syntax

    F=v2fplanck(spin_system,parameters)

Description

See IK's review of the subject (http://dx.doi.org/10.1016/j.jmr.2016.07.005) for a detailed description of how the Fokker-Planck spatial dynamics generator is built. This function builds the M matrix in Equation 7.

Parameters

  parameters.u       - X components of the velocity vectors
                       for each voxel in the sample, m/s

  parameters.v       - Y components of the velocity vectors
                       for each voxel in the sample, m/s

  parameters.w       - Z components of the velocity vectors
                       for each voxel in the sample, m/s

  parameters.diff    - diffusion coefficient or 3x3 tensor, m^2/s
                       for situations when this parameter is the 
                       same in every voxel

  parameters.dxx     - Cartesian components of the diffusion
  parameters.dxy       tensor for each voxel of the sample
       ...
  parameters.dzz

  parameters.dims    - dimensions of the 3D box, meters

  parameters.npts    - number of points in each dimension
                       of the 3D box

  parameters.deriv   - {'fourier'} uses Fourier diffe-
                       rentiation matrices; {'period',n}
                       requests n-point central finite-
                       difference matrices with periodic
                       boundary conditions

Outputs

    F - spatial dynamics generator

Examples

See examples/imaging and examples/nmr_diffusion directories in the example set.

Notes

The direct product order is Z(x)Y(x)X(x)Spin, this corresponds to a column-wise vectorization of a 3D array with dimensions ordered as [X Y Z].

Polyadic objects are returned, use polyadic/inflate.m to get the corresponding sparse matrix.

See also

imaging.m, hydrodynamics.m, fourdif.m, fdmat.m, polyadic.m

Version 2.1, authors: Ilya Kuprov, Ahmed Allami