Diffusivity

Schema to define the diffusivity matrix

pigreads.schema.diffusivity.Diffusivity

The diffusivity matrix is a command to define the diffusivity matrix in the simulation.

One of:

class pigreads.schema.diffusivity.DiffusivityFile(**data)

Bases: BaseModel

Diffusivity matrix read from a file.

The file should contain a 4D array with the diffusivity values. The array should have shape (Nz, Ny, Nx, 6) where the last dimension corresponds to the six independent components of the diffusivity matrix.

See:

pigreads.diffusivity.diffusivity_matrix() and numpy.lib.format

Parameters:

data (Any)

__call__()

Read the diffusivity matrix from the file.

Return type:

ndarray[Any, Any]

Returns:

Diffusivity matrix.

file: Path

Path to the file containing the diffusivity matrix.

model_config: ClassVar[ConfigDict]

Configuration for pydantic.BaseModel.

class pigreads.schema.diffusivity.DiffusivityParams(**data)

Bases: BaseModel

Diffusivity matrix defined by parameters.

The parameters are passed on to pigreads.diffusivity.diffusivity_matrix().

Parameters:

data (Any)

Df: float

Diffusivity in the direction of the fibres.

Dn: float | None

Diffusivity in the direction normal to the fibre sheets.

Ds: float | None

Diffusivity in the fibre sheets.

__call__()

Create the diffusivity matrix from the parameters.

Return type:

ndarray[Any, Any]

Returns:

Diffusivity matrix.

f: Vector3D | None

Main direction of diffusion.

model_config: ClassVar[ConfigDict]

Configuration for pydantic.BaseModel.

n: Vector3D | None

Direction of weakest diffusion.