Difference between revisions of "Hydrodynamics.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:
 
The function returns finite difference or Fourier differentiation matrices for first derivatives, correctly normalised to account for physical sample dimensions.  
 
The function returns finite difference or Fourier differentiation matrices for first derivatives, correctly normalised to account for physical sample dimensions.  
  
==Arguments==
+
==Parameters==
  
 
   parameters.dims    - dimensions of the sample (meters),
 
   parameters.dims    - dimensions of the sample (meters),

Revision as of 18:49, 5 June 2026

A basic hydrodynamics infrastructure provider, returns first derivative operators with respect to the three sample coordinates. Periodic boundary conditions are used.

Syntax

    [Fx,Fy,Fz]=hydrodynamics(parameters)

Description

The function returns finite difference or Fourier differentiation matrices for first derivatives, correctly normalised to account for physical sample dimensions.

Parameters

  parameters.dims    - dimensions of the sample (meters),
                       one, two, or three-element row
                       vector

  parameters.npts    - number of points in each dimension
                       of the sample, one, two, or three-
                       element row vector

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

Returns

  Fx, Fy, Fz         - derivative matrices, SI units

Examples

This function is used by imaging.m context in situations when spatial dynamics, such as diffusion and flow, is present in the sample.

Notes

Empty arrays are returned for inactive dimensions. 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].

See also

imaging.m, fdmat.m, v2fplanck.m, fourdif.m

Version 1.10, authors: Ahmed Allami, Ilya Kuprov